commit c2b900b593cf6fcf675612b2648d351da36a3d0b Author: lzCodeGarden <3159933846@qq.com> Date: Mon May 27 09:32:25 2024 +0800 Initial commit diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ac486d2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: 👀 Github论坛 | GitHub Discussions + url: https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/discussions + about: 如果您的问题不是功能或者错误,请转到讨论面板并在提交之前检索您的问题是否已经存在。 diff --git a/.github/ISSUE_TEMPLATE/question-report.md b/.github/ISSUE_TEMPLATE/question-report.md new file mode 100644 index 0000000..69d97ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question-report.md @@ -0,0 +1,22 @@ +--- +name: 🙋 问题交流 | Question Report +about: 在文档或讨论中没有回答的使用问题 | Usage question that isn't answered in docs or discussion +title: "🙋 问题交流。。。 | [Question] Some question..." +labels: [ "question" ] +--- + +## Question Report + +- 搜索打开和关闭的 [GitHub 问题](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/issues) + +请在提交问题之前回答这些问题,谢谢。 | Please answer these questions before submitting them. Thank you. + +### 你使用了哪个版本? | Which version did you use? + +### 预期行为 | Expected behavior + +### 实际行为 | Actual behavior + +### 原因分析(如果可以) | Cause analysis (if possible) + +### 问题重现步骤 | Steps to reproduce the problem diff --git a/.github/ISSUE_TEMPLATE/template-bug.md b/.github/ISSUE_TEMPLATE/template-bug.md new file mode 100644 index 0000000..a0bed30 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/template-bug.md @@ -0,0 +1,18 @@ +--- +name: 🐛 错误报告 | Bug Report +about: 请详细描述您使用过程中遇到的问题。| Please describe in detail the problems you encountered in the process of using. +title: "🐛 一些问题。。。 | [Bug] Some problem..." +labels: [ "bug" ] +--- + + + +#### 您使用的版本? | Your usage version? + +#### 您使用的场景? | Your usage scenarios? + +#### 您做了什么操作? | What did you do? + +#### 您遇到了什么问题? | What are your problems? + +#### 您期望的结果是怎样的? | What is your expected outcome? diff --git a/.github/ISSUE_TEMPLATE/template-feature.md b/.github/ISSUE_TEMPLATE/template-feature.md new file mode 100644 index 0000000..2f3c2b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/template-feature.md @@ -0,0 +1,12 @@ +--- +name: 🚀 功能请求 | Feature Request +about: 请详细描述您期望的功能。 | Please describe in detail the features you expect. +title: "🚀 一些功能。。。 | [Feature]Some feature..." +labels: [ "enhancement" ] +--- + + + +#### 您使用的场景? | 1. Your usage scenarios? + +#### 您期望的结果是怎样的? | 2. What is your expected outcome? diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md new file mode 100644 index 0000000..56ae6b6 --- /dev/null +++ b/.github/pull-request-template.md @@ -0,0 +1,14 @@ + + +**在提出此拉取请求时,我确认了以下几点(请复选框):** + +- [ ] 我已阅读并理解[贡献者指南]()。 +- [ ] 我已检查没有与此请求重复的拉取请求。 +- [ ] 我已经考虑过,并确认这份呈件对其他人很有价值。 +- [ ] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。 + +**填写PR内容:** + +- +- +- diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..9f13672 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,43 @@ +# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter +name-template: 'v$NEXT_PATCH_VERSION 🌈' +tag-template: 'v$NEXT_PATCH_VERSION' +version-template: $MAJOR.$MINOR.$PATCH +autolabeler: + - label: 'chore' + files: + - '*.md' + - label: 'bug' + branch: + - '/fix.+/' + - label: 'enhancement' + branch: + - '/feat.+/' + - '/perf.+/' + - label: 'cicd' + branch: + - '/cicd.+/' + - label: 'refactor' + branch: + - '/refactor.+/' +# Emoji reference: https://gitmoji.carloscuesta.me/ +categories: + - title: '🚀 Features' + labels: + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'bug' + - title: '🧰 Maintenance' + labels: + - 'cicd' + - 'chore' + - 'refactor' +exclude-labels: + - reverted + - no-changelog + - skip-changelog + - invalid +change-template: '- $TITLE (#$NUMBER) @$AUTHOR' +template: | + ## What’s Changed + $CHANGES diff --git a/.github/workflows/maven-dependency-tree.yml b/.github/workflows/maven-dependency-tree.yml new file mode 100644 index 0000000..ada9360 --- /dev/null +++ b/.github/workflows/maven-dependency-tree.yml @@ -0,0 +1,23 @@ +name: Update Maven Dependency Graph + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + types: [ opened, reopened, synchronize ] + +permissions: + contents: read + +jobs: + update_maven_dependency_graph: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Submit Dependency Snapshot + uses: advanced-security/maven-dependency-submission-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b091dd1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release Drafter + +on: + push: + branches: + - main + pull_request: + types: [ opened, reopened, synchronize ] + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + contents: write # for release-drafter/release-drafter to create a github release + pull-requests: write # for release-drafter/release-drafter to add label to PR + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eae4b35 --- /dev/null +++ b/.gitignore @@ -0,0 +1,102 @@ +### Maven template +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# https://github.com/takari/maven-wrapper#usage-without-binary-jar +.mvn/wrapper/maven-wrapper.jar + +# Eclipse m2e generated files +# Eclipse Core +.project +# JDT-specific (Eclipse Java Development Tools) +.classpath + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +.idea + +**/src/main/resources/proto/**/*.java + diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..035e581 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,25 @@ +# +# MIT License +# +# Copyright (c) 2023 OrdinaryRoad +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ade31f5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 OrdinaryRoad + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..90a45b4 --- /dev/null +++ b/README.md @@ -0,0 +1,507 @@ +# ordinaryroad-live-chat-client + +![license](https://img.shields.io/github/license/OrdinaryRoad-Project/ordinaryroad-live-chat-client) ![release](https://img.shields.io/github/v/release/OrdinaryRoad-Project/ordinaryroad-live-chat-client?include_prereleases) ![Maven Central](https://img.shields.io/maven-central/v/tech.ordinaryroad/live-chat-client) + +> This project is in progress... 👨‍💻,有问题欢迎[提交issuse](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/issues/new/choose), +> 觉得有用的话可以点个小星星⭐️鼓励一下,感谢 +> +> 如果对项目感兴趣也欢迎[加入QQ频道](https://pd.qq.com/s/3id0n7fvs)交流讨论, +> 提交PR +> +> ToDo List: [https://github.com/orgs/OrdinaryRoad-Project/projects/1](https://github.com/orgs/OrdinaryRoad-Project/projects/1) +> +> **更新日志:**[https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/releases](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/releases) + +--- + +Live room WebSocket chat client + +- Feature 0: Netty +- Feature 1: 消息中的未知属性统一放到单独的MAP中(JSON格式消息) +- Feature 2: 支持自动重连 +- Feature 3: 支持同时监听多个直播间 +- Feature 4: 支持短直播间id +- Feature 5*: 支持弹幕发送、为主播点赞 +- Feature 6*: 内置收到弹幕、收到礼物、收到醒目留言、用户入房、收到点赞、状态变化回调 +- Feature 7: 支持消息转发 +- Feature 8: 支持单独引入编解码模块 +- Feature 9: 支持网络代理 + +> *存在平台差异 +> - ✅: 平台支持且已完成 +> - ☑️️: 平台支持但未实现 +> - ❌: 平台网页端暂不支持 + +平台适配情况表 + +| 平台 | LiveChatClient | Cookie | 短直播间id | 发送弹幕 | 为主播点赞 | +|-------------|----------------|--------|--------|------|-------| +| Bilibili B站 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| Douyu 斗鱼 | ✅ | ✅ | ✅ | ✅ | ❌ | +| Huya 虎牙 | ✅ | ✅ | ✅ | ✅ | ❌ | +| Douyin 抖音 | ✅ | ☑️️ | ✅ | ☑️ | ☑️️ | +| Kuaishou 快手 | ✅ | ✅ | ✅ | ✅ | ✅ | + +平台直播间消息适配情况表 + +| 平台 | 弹幕 | 礼物 | 醒目留言 | 进入房间 | 点赞 | 状态变化 | 统计信息 | +|-------------|----|-----------|------|---------|---------|------|--------------------| +| Bilibili B站 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅(点赞数、当前人数、累计观看人数) | +| Douyu 斗鱼 | ✅ | ✅ | ☑️ | ✅ | ❌ | ☑️ | ❌ | +| Huya 虎牙 | ✅ | ✅ | ❌ | ✅(高级用户) | ❌ | ☑️ | ❌ | +| Douyin 抖音 | ✅ | ✅ | ❌ | ✅ | ✅(点赞个数) | ✅ | ✅(点赞数、当前人数) | +| Kuaishou 快手 | ✅ | ✅(礼物信息不全) | ❌ | ❌ | ✅(首次点赞) | ❌ | ✅(点赞数、当前人数) | + +消息接口内置的方法见 [https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/tree/main/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/tree/main/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg) + +运行效果图 +![运行效果](assets/运行效果.png) + +--- + +[//]: # ([在线文档](https://ordinaryroad.tech/or_module/live-chat-client/)) + +## [⭐BarrageFly——让弹幕飞](https://barragefly.ordinaryroad.tech/),基于该项目的一个弹幕转发、过滤、处理平台 + +## 0 原理 + +抓取浏览器的WebSocket二进制流,然后分析模拟浏览器的行为;这种方式的优点是不需要开发者认证,缺点是没有官方文档,分析过程比较费时费力,并且需要适配不同平台的流程变化(不会经常变化) + +以后可能会考虑支持平台的开放协议 + +## 1 安装 + +> JDK ≥ 8 + +### B站 + +```xml + + + tech.ordinaryroad + live-chat-client-bilibili + + ${ordinaryroad-live-chat-client.version} + +``` + +> Gradle用户注意:自从`0.3.2`版本开始,B站Client配置中,压缩方式默认为`NORMAL_BROTLI`,当使用Gradle引入时,还需要引入操作系统对应的brotli4j native包,详见:https://github.com/hyperxpro/Brotli4j?tab=readme-ov-file#gradle + +例如: + +```groovy +val liveChatClientBrotliVersion = "1.16.0" +// Windows +implementation("com.aayushatharva.brotli4j:native-windows-x86_64:$liveChatClientBrotliVersion") +implementation("com.aayushatharva.brotli4j:native-windows-aarch64:$liveChatClientBrotliVersion") +// Linux +implementation("com.aayushatharva.brotli4j:native-linux-armv7:$liveChatClientBrotliVersion") +implementation("com.aayushatharva.brotli4j:native-linux-aarch64:$liveChatClientBrotliVersion") +implementation("com.aayushatharva.brotli4j:native-linux-x86_64:$liveChatClientBrotliVersion") +implementation("com.aayushatharva.brotli4j:native-linux-s390x:$liveChatClientBrotliVersion") +implementation("com.aayushatharva.brotli4j:native-linux-riscv64:$liveChatClientBrotliVersion") +implementation("com.aayushatharva.brotli4j:native-linux-ppc64le:$liveChatClientBrotliVersion") +// Mac +implementation("com.aayushatharva.brotli4j:native-osx-aarch64:$liveChatClientBrotliVersion") +implementation("com.aayushatharva.brotli4j:native-osx-x86_64:$liveChatClientBrotliVersion") +``` + +如果引入后仍无法使用,请修改protover配置项,例如改为`NORMAL_ZLIB`:`BilibiliLiveChatClientConfig.builder().protover(ProtoverEnum.NORMAL_ZLIB).roomId("xxx").build()` + +### 斗鱼 + +```xml + + + tech.ordinaryroad + live-chat-client-douyu + + ${ordinaryroad-live-chat-client.version} + +``` + +### 虎牙 + +```xml + + + tech.ordinaryroad + live-chat-client-huya + + ${ordinaryroad-live-chat-client.version} + +``` + +### 抖音 + +```xml + + + tech.ordinaryroad + live-chat-client-douyin + + ${ordinaryroad-live-chat-client.version} + +``` + +### 快手 + +```xml + + + tech.ordinaryroad + live-chat-client-kuaishou + + ${ordinaryroad-live-chat-client.version} + +``` + +## 2 使用 + +> 测试类包含了多种样例,可供参考 + +### 2.0 不同平台的CMD定义 + +- B站:[BilibiliCmdEnum](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/blob/main/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/BilibiliCmdEnum.java) +- 斗鱼:[DouyuCmdEnum](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/blob/main/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/constant/DouyuCmdEnum.java) +- 虎牙:[HuyaCmdEnum](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/blob/main/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaCmdEnum.java) +- 抖音:[DouyinCmdEnum](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/blob/main/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinCmdEnum.java) +- 快手:[PayloadTypeOuterClass](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/blob/main/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PayloadTypeOuterClass.java) + +可以重写`onCmdMsg(收到的所有CMD消息)`或`onOtherCmdMsg(框架未处理的CMD消息)`回调方法,判断CMD来监听框架已经定义的CMD类型 + +如果要监听的消息枚举类中未定义,可以考虑重写`onUnknownCmdMsg(未知CMD消息)`方法 + +ICmdMsg类型转换对应关系 + +- B站:MessageMsg +- 斗鱼:DouyuCmdMsg +- 虎牙:WSPushMessage 或 WSMsgItem +- 抖音:DouyinCmdMsg 或 DouyinSocialMsg(计划下个版本增加ISocialMsg) +- 快手:KuaishouCmdMsg + +```java +@Override +public void onOtherCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + switch (cmd) { + case GUARD_BUY: { + // 有人上舰 + MessageMsg messageMsg = (MessageMsg) cmdMsg; + ... + break; + } + case SUPER_CHAT_MESSAGE_DELETE: { + // 删除醒目留言 + MessageMsg messageMsg = (MessageMsg) cmdMsg; + ... + break; + } + default: { + // ignore + } + } +} +``` + +### 2.1 Client模式 + +> Spring Boot 示例 [client-example](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/tree/main/live-chat-client-examples/client-example) + +1. 创建配置 +2. 创建Client并传入配置、添加消息回调 +3. 开始监听直播间 + +> 如果需要查看其他平台的效果,请将`Bilibili`改为其他平台对应的英文,并修改消息回调接口的函数签名 + +```java +public class ClientModeExample { + public static void main(String[] args) { + String cookie = System.getenv("cookie"); + // 1. 创建配置 + BilibiliLiveChatClientConfig config = BilibiliLiveChatClientConfig.builder() + // TODO 消息转发地址 + .forwardWebsocketUri("") + // TODO 浏览器Cookie + .cookie(cookie) + // TODO 直播间id(支持短id) + .roomId(7777) + .build(); + + // 2. 创建Client并传入配置、添加消息回调 + BilibiliLiveChatClient client = new BilibiliLiveChatClient(config, new IBilibiliMsgListener() { + @Override + public void onDanmuMsg(BilibiliBinaryFrameHandler binaryFrameHandler, DanmuMsgMsg msg) { + IBilibiliMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + System.out.printf("%s 收到弹幕 %s %s(%s):%s\n", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SendGiftMsg msg) { + IBilibiliMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + System.out.printf("%s 收到礼物 %s %s(%s) %s %s(%s)x%s(%s)\n", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getData().getAction(), msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onSuperChatMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SuperChatMessageMsg msg) { + IBilibiliMsgListener.super.onSuperChatMsg(binaryFrameHandler, msg); + System.out.printf("%s 收到醒目留言 %s(%s):%s\n", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onEnterRoomMsg(InteractWordMsg msg) { + System.out.printf("%s %s(%s) 进入直播间\n", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onLikeMsg(BilibiliBinaryFrameHandler binaryFrameHandler, LikeInfoV3ClickMsg msg) { + IBilibiliMsgListener.super.onLikeMsg(binaryFrameHandler, msg); + System.out.printf("%s 收到点赞 %s %s(%s)\n", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onLiveStatusMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliLiveStatusChangeMsg msg) { + IBilibiliMsgListener.super.onLiveStatusMsg(binaryFrameHandler, msg); + System.out.printf("%s 状态变化 %s\n", binaryFrameHandler.getRoomId(), msg.getLiveStatusAction()); + } + + @Override + public void onRoomStatsMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliRoomStatsMsg msg) { + IBilibiliMsgListener.super.onRoomStatsMsg(binaryFrameHandler, msg); + System.out.printf("%s 统计信息 累计点赞数: %s, 当前观看人数: %s, 累计观看人数: %s\n", binaryFrameHandler.getRoomId(), msg.getLikedCount(), msg.getWatchingCount(), msg.getWatchedCount()); + } + }); + + // 添加客户端连接状态回调 + client.addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.CONNECTED) { + // TODO 要发送的弹幕内容,请注意控制发送频率;框架内置支持设置发送弹幕的最少时间间隔,小于时将忽略该次发送 + client.sendDanmu("666666" + RandomUtil.randomNumbers(1)); + } + }); + + // 3. 开始监听直播间 + client.connect(); + } +} +``` + +#### 2.1.1 Client相关API + +- 连接 + - `void connect(Runnable success, Consumer failed)` + - `void connect(Runnable success)` + - `void connect()` +- 断开连接 + - `void disconnect(boolean cancelReconnect)` + - `void disconnect()` +- 销毁 + - `void destroy()` +- 发送消息 + - `void send(Object msg, Runnable success, Consumer failed)` + - `void send(Object msg, Runnable success)` + - `void send(Object msg, Consumer failed)` + - `void send(Object msg)` +- 发送弹幕 + - `void sendDanmu(Object danmu, Runnable success, Consumer failed)` + - `void sendDanmu(Object danmu, Runnable success)` + - `void sendDanmu(Object danmu, Consumer failed)` + - `void sendDanmu(Object danmu)` +- 为主播点赞 + - `void clickLike(int count, Runnable success, Consumer failed)` + - `void clickLike(int count, Runnable success)` + - `void clickLike(int count, Consumer failed)` + - `void clickLike(int count)` +- 添加消息监听器 + - `boolean addMsgListener(MsgListener msgListener)` + - `boolean addMsgListeners(List msgListeners)` +- 移除消息监听器 + - `boolean removeMsgListener(MsgListener msgListener)` + - `boolean removeMsgListeners(List msgListeners)` +- 获取当前状态 + - `ClientStatusEnums getStatus()` +- 添加状态变化监听器 + - `void addStatusChangeListener(IClientStatusChangeListener listener)` +- 移除状态变化监听器 + - `void removeStatusChangeListener(IClientStatusChangeListener listener)` + +### 2.2 高级模式 + +> 参考 [BilibiliHandlerModeExample](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/tree/main/live-chat-client-examples/handler-example/src/main/java/tech/ordinaryroad/live/chat/client/example/handler/BilibiliHandlerModeExample.java) + +### 2.3 单独引入编解码模块 + +> 参考 [codec-example](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/tree/main/live-chat-client-examples/codec-example/src/main/java/tech/ordinaryroad/live/chat/client/example/codec/BilibiliCodecExample.java) + +B站示例,其他平台只需修改`bilibili`即可 +> 使用Gradle引入B站编解码模块时,参考[#B站](#B站) + +```xml + + + tech.ordinaryroad + live-chat-client-codec-bilibili + + ${ordinaryroad-live-chat-client.version} + +``` + +### 2.4 设置代理 + +> 生效范围:仅项目自身,不会影响引用该项目的父项目 + +在代码中修改Config`socks5ProxyHost("127.0.0.1")`, `socks5ProxyPort("1080")` + +身份认证(暂未测试) + +- `socks5ProxyUsername("username")`, `socks5ProxyPassword("password")` + +[![image](https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client/assets/43869694/8d62ffe3-7ce1-4c72-bbd8-b7b98f68e757)【极光HTTP代理】企业级代理IP云服务商,48小时线下技术支持,仅0.006元/IP- 无效IP不计费](https://www.jghttp.com/?invitation_code=8888956353) + +## 3 项目说明 + +### 3.1 commons模块 + +主要是抽象接口、抽象类的定义 + +#### 3.1.1 commons-base + +定义了一些基础的接口、抽象类:消息、消息监听器、连接连监听器 + +- 消息接口 + - IMsg:所有msg都应该实现该接口 + - ICmdMsg:有些平台的一些消息正文中没有消息类型cmd字段,例如B站的心跳包,因此再细分为cmdMsg + - IDanmuMsg: 内置获取用户ID、用户名、用户头像、粉丝牌名称、粉丝牌等级、弹幕内容等方法 + - ISuperChatMsg:醒目留言,内置获取持续时间方法 + - IGiftMsg: 内置获取发送方ID、发送方用户名、发送方头像、接收方ID、接收方用户名、礼物名称、礼物图片、礼物ID、礼物个数、礼物单价等方法 + - IEnterRoomMsg: 内置获取用户ID、用户名、用户头像、粉丝牌名称、粉丝牌等级方法 + - ILikeMsg: 内置获取用户ID、用户名、用户头像、粉丝牌名称、粉丝牌等级、点赞数方法 + - ILiveStatusChangeMsg: 内置获取状态变化方法 +- 消息监听器 + - IBaseMsgListener(所有平台都支持,其他消息监听器存在平台差异) + - onMsg:所有消息(不管消息内容)都会调用,不包括由该消息的某个字段派生出的消息,例如快手的弹幕礼物等消息是`SC_FEED_PUSH`中的字段,因此onMsg中不会出现处理后的弹幕、礼物消息,而是包含弹幕、礼物等的`SCWebFeedPush`CMD消息 + - onCmdMsg:cmd消息(消息体中有表示消息类型的字段时),并且该类型需要处理(例如心跳回复包不需要处理)时调用 + - onOtherCmdMsg:该消息类型不需要处理(例如PK、点赞数更新等类型)时调用 + - onUnknownCmd:该消息类型未知(没有对应的枚举类)时调用 + - IDanmuMsgListener(所有平台) + - onDanmuMsg:收到弹幕消息 + - IGiftMsgListener(所有平台,快手礼物消息不全,缺少礼物单价、接收方信息) + - onGiftMsg:收到礼物消息(抖音、快手平台需要判断礼物个数是否大于0) + - ISuperChatMsgListener(B站) + - onSuperChatMsg:收到醒目留言 + - IEnterRoomMsgListener(B站、斗鱼、抖音,虎牙只能接收到高级用户的入房回调) + - onEnterRoomMsg:进入房间消息回调 + - ILikeMsgListener(B站、快手、抖音支持获取点赞的个数) + - onLikeMsg:收到点赞消息 + - ILiveStatusChangeListener(B站、抖音测试只有下播消息) + - onLiveStatusMsg:收到状态变化消息 + - IRoomStatsMsgListener(B站,抖音和快手没有累计观看人数信息) + - onRoomStatsMsg:收到信息统计消息 + +#### 3.1.2 commons-client + +- 定义了Client的配置:连接地址、房间id、Cookie、心跳、自动重连等相关参数 +- 定义了Client的一些方法:初始化、销毁、连接、断开、添加消息回调、移除消息回调、发送弹幕、为主播点赞等 +- 定义了Client的生命周期 + +#### 3.1.3 commons-util + +- 一些工具类:时间、反射、Cookie + +### 3.2 servers模块 + +对所使用的连接工具的抽象 + +#### 3.2.1 servers-netty + +- 定义了连接处理Handler +- 定义了数据处理Handler + +#### 3.2.2 servers-netty-client + +基于`Netty`实现的Client + +- 扩展了Client、ClientConfig +- 扩展Handler增加了Client成员变量 + +### 3.3 clients模块 + +对使用`Netty`作为连接工具的`servers-netty-client`的具体实现 + +- client-bilibili +- client-douyu +- client-huya +- client-douyin +- client-kuaishou +- client-websocket + +### 3.4 codec模块 + +1. 解码decode:根据平台协议,对收到的二进制流进行解码 +2. 编码encode:根据平台协议,将消息编码为二进制流 + +- codec-bilibili + - BilibiliCodecUtil + - BilibiliMsgFactory +- codec-douyu + - DouyuCodecUtil + - DouyuMsgFactory +- codec-huya + - HuyaCodecUtil + - HuyaMsgFactory +- codec-douyin +- codec-kuaishou + +> 由于抖音和快手使用的都是Protobuf协议,目前版本暂未实现CodecUtil工具类,可以参考`DouyinCodecHandler`和`KuaishouCodecHandler`中的编解码实现 + +## 交流讨论 + +扫描二维码 +或点击链接加入QQ频道【OrdinaryRoad】:https://pd.qq.com/s/3id0n7fvs + +## 捐赠 + +> 开源不易,您的认可与支持是我不断更新的最大动力! +> +> 扫码或者访问[https://dwz.tax/ucWb](https://dwz.tax/ucWb)进行捐赠 +> +> + +| 日期 | 捐赠人 | 金额 | 留言 | 渠道 | +|------------|----:|------:|:-----|-----| +| 2024-03-06 | **睿 | 88.88 | 佬 加油 | ZFB | +| 2024-03-10 | **豪 | 88.8 | 大佬加油 | ZFB | +| 2024-03-25 | **波 | 188.8 | / | ZFB | +| 2024-04-02 | **豪 | 30 | / | ZFB | +| 2024-04-30 | *h | 100 | 大佬牛逼 | WX | +| ... | ... | ... | ... | ... | + +## Star History + + + + + + + Star History Chart + + + +## 感谢 + +- [douyu-crawler-demo](https://github.com/cj1128/douyu-crawler-demo)(斗鱼登录状态的请求包构建) +- [Kain-90/huya-danmu](https://github.com/Kain-90/huya-danmu) + (虎牙流程参考,最新lib库[vplayerUI.js](https://a.msstatic.com/huya/h5player/room/2309271152/vplayerUI.js)、[taf-signal.global.0.0.4.prod.js](https://hd2.huya.com/fedbasic/huyabaselibs/taf-signal/taf-signal.global.0.0.4.prod.js)) +- [saermart/DouyinLiveWebFetcher](https://github.com/saermart/DouyinLiveWebFetcher)(抖音流程参考) +- https://blog.ordinaryroad.tech/1/article/1743829866426630144 (快手直播间WebSocket的Protobuf协议分析) + +## 免责声明 + +免责声明:仅供学术研究使用。对于违反相关法律、造成危害的滥用行为,开发者不负任何责任。 + +## 另附各个平台的开放平台地址 + +- B站开放平台:https://openhome.bilibili.com +- 斗鱼开放平台:https://open.douyu.com +- 虎牙开放平台:https://open.huya.com +- 快手开放平台:https://open.kuaishou.com +- 抖音开放平台:https://open.douyin.com diff --git a/assets/QQ频道.jpg b/assets/QQ频道.jpg new file mode 100644 index 0000000..2066482 Binary files /dev/null and b/assets/QQ频道.jpg differ diff --git a/assets/donate.png b/assets/donate.png new file mode 100644 index 0000000..f454354 Binary files /dev/null and b/assets/donate.png differ diff --git a/assets/运行效果.png b/assets/运行效果.png new file mode 100644 index 0000000..bdf6674 Binary files /dev/null and b/assets/运行效果.png differ diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/pom.xml b/live-chat-client-codec/live-chat-client-codec-bilibili/pom.xml new file mode 100644 index 0000000..c6ae321 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/pom.xml @@ -0,0 +1,55 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client-codec + 0.7.0 + + jar + + live-chat-client-codec-bilibili + live-chat-client-codec-bilibili + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-commons-base + + + tech.ordinaryroad + live-chat-client-commons-util + + + + io.netty + netty-codec + + + + com.aayushatharva.brotli4j + brotli4j + + + + com.google.protobuf + protobuf-java + + + + ch.qos.logback + logback-classic + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/BilibiliApis.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/BilibiliApis.java new file mode 100644 index 0000000..3c0dc50 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/BilibiliApis.java @@ -0,0 +1,355 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.api; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpResponse; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.*; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.request.BilibiliLikeReportV3Request; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.request.BilibiliSendMsgRequest; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliLiveStatusEnum; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatHttpUtil; + +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + + +/** + * B站API简易版 + * + * @author mjz + * @date 2023/5/5 + */ +@Slf4j +public class BilibiliApis { + + public static final TimedCache GIFT_IMG_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1)); + public static final String KEY_COOKIE_CSRF = "bili_jct"; + public static final String KEY_UID = "DedeUserID"; + public static final String PATTERN_REAL_ROOM_ID = "\\\"roomInitRes\\\".+\\{\\\"room_id\\\":(\\d+)"; + + private static final String API_FRONTEND_FINGER_SPI = "https://api.bilibili.com/x/frontend/finger/spi"; + private static final String API_V = "https://data.bilibili.com/v/"; + private static final String API_WEB_INTERFACE_NAV = "https://api.bilibili.com/x/web-interface/nav"; + private static final String API_DANMU_INFO = "https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo"; + private static final String API_ROOM_PLAY_INFO = "https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo"; + + @SneakyThrows + public static RoomInitResult roomInit(long roomId, String cookie) { + RoomPlayInfoResult roomPlayInfo = getRoomPlayInfo(roomId, cookie); + long realRoomId = roomPlayInfo.room_id; + // frontendFingerSpi(); + String b_3 = OrLiveChatCookieUtil.getCookieByName(cookie, "buvid3", BilibiliApis::v); + // webInterfaceNav(cookie); + DanmuinfoResult danmuInfo = getDanmuInfo(realRoomId, cookie); + return new RoomInitResult.RoomInitResultBuilder() + .buvid3(b_3) + .uid(OrLiveChatCookieUtil.getCookieByName(cookie, "DedeUserID", () -> "0")) + .danmuinfoResult(danmuInfo) + .roomPlayInfoResult(roomPlayInfo) + .build(); + } + + public static JsonNode roomGiftConfig(long roomId, String cookie) { + @Cleanup + HttpResponse response = OrLiveChatHttpUtil.createGet("https://api.live.bilibili.com/xlive/web-room/v1/giftPanel/roomGiftConfig?platform=pc&source=live&build=0&global_version=0&room_id=" + roomId) + .cookie(cookie) + .execute(); + return responseInterceptor(response.body()); + } + + /** + * { + * "code": 0, + * "data": { + * "b_3": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxBAC9C3C049561infoc", + * "b_4": "xxxxxxx-xxxx-xxxx-xxxx-xxxx0EE06EC549561-xxxx32009-xxxxgQAMrcCGKkaytpzZwg==" + * }, + * "message": "ok" + * } + */ + @SneakyThrows + public static JsonNode frontendFingerSpi() { + @Cleanup + HttpResponse response = OrLiveChatHttpUtil.createGet(API_FRONTEND_FINGER_SPI).execute(); + return responseInterceptor(response.body()); + } + + /** + * 返回buvid3 + */ + @SneakyThrows + public static String v() { + @Cleanup + HttpResponse response = OrLiveChatHttpUtil.createGet(API_V).execute(); + return response.getCookieValue("buvid3"); + } + + @SneakyThrows + public static void webInterfaceNav(String cookie) { + @Cleanup + HttpResponse response = OrLiveChatHttpUtil.createGet(API_WEB_INTERFACE_NAV) + .cookie(cookie) + .execute(); + } + + /** + * @param roomId + * @param type 直播间用0 + * @return
{@code
+     * {
+     * 	"group": "live",
+     * 	"business_id": 0,
+     * 	"refresh_row_factor": 0.125,
+     * 	"refresh_rate": 100,
+     * 	"max_delay": 5000,
+     * 	"token": "-wm5-Qo4BBAztd1qp5ZJpgyTMRBhCc7yikz5d9rAd63PV46G9BMwl0R10kMM8Ilb-UieZGjLtipPrz4Cvi0DdhGFwOi8PJpFN9K-LoXh6Z_4yjEIwgRerDiMIstHzJ80J3B7wnRisAYkWA==",
+     * 	"host_list": [{
+     * 		"host": "ali-bj-live-comet-09.chat.bilibili.com",
+     * 		"port": 2243,
+     * 		"wss_port": 443,
+     * 		"ws_port": 2244
+     *        }, {
+     * 		"host": "ali-gz-live-comet-02.chat.bilibili.com",
+     * 		"port": 2243,
+     * 		"wss_port": 443,
+     * 		"ws_port": 2244
+     *    }, {
+     * 		"host": "broadcastlv.chat.bilibili.com",
+     * 		"port": 2243,
+     * 		"wss_port": 443,
+     * 		"ws_port": 2244
+     *    }]
+     * }
+     * }
+ */ + @SneakyThrows + public static DanmuinfoResult getDanmuInfo(long roomId, int type, String cookie) { + @Cleanup + HttpResponse response = OrLiveChatHttpUtil.createGet(API_DANMU_INFO + "?id=" + roomId + "&type=" + type) + .cookie(cookie) + .execute(); + return OrJacksonUtil.getInstance().readValue(responseInterceptor(response.body()).toString(), DanmuinfoResult.class); + } + + @SneakyThrows + public static DanmuinfoResult getDanmuInfo(long roomId, String cookie) { + return getDanmuInfo(roomId, 0, cookie); + } + + @SneakyThrows + public static RoomPlayInfoResult getRoomPlayInfo(long roomId, int no_playurl, String cookie) { + @Cleanup + HttpResponse response = OrLiveChatHttpUtil.createGet(API_ROOM_PLAY_INFO + "?room_id=" + roomId + "&no_playurl=" + no_playurl + "&mask=1&qn=0&platform=web&protocol=0,1&format=0,1,2&codec=0,1,2&dolby=5&panorama=1") + .cookie(cookie) + .execute(); + return OrJacksonUtil.getInstance().readValue(responseInterceptor(response.body()).toString(), RoomPlayInfoResult.class); + } + + @SneakyThrows + public static RoomPlayInfoResult getRoomPlayInfo(long roomId, String cookie) { + return getRoomPlayInfo(roomId, 1, cookie); + } + + public static String getGiftImgById(long giftId, long roomId) { + if (!GIFT_IMG_CACHE.containsKey(giftId)) { + ThreadUtil.execAsync(() -> { + updateGiftImgCache(roomId, null); + }); + } + + return GIFT_IMG_CACHE.get(giftId); + } + + /** + * 更新礼物图片缓存 + */ + public static void updateGiftImgCache(long roomId, String cookie) { + JsonNode jsonNode = roomGiftConfig(roomId, cookie); + for (JsonNode node : jsonNode.get("global_gift").get("list")) { + long giftId = node.get("id").asLong(); + String giftImgUrl = node.get("webp").asText(); + GIFT_IMG_CACHE.put(giftId, giftImgUrl); + } + } + + /** + * 发送弹幕 + * + * @param request {@link BilibiliSendMsgRequest} + * @param cookie Cookie + */ + public static void sendMsg(BilibiliSendMsgRequest request, String cookie) { + if (StrUtil.isBlank(cookie)) { + throw new BaseException("发送弹幕接口cookie不能为空"); + } + Map stringObjectMap = BeanUtil.beanToMap(request); + @Cleanup HttpResponse execute = OrLiveChatHttpUtil.createPost("https://api.live.bilibili.com/msg/send") + .cookie(cookie) + .form(stringObjectMap) + .execute(); + responseInterceptor(execute.body()); + } + + /** + * 发送弹幕 + * + * @param msg 内容 + * @param realRoomId 真实房间id + * @param cookie Cookie + */ + public static void sendMsg(String msg, long realRoomId, String cookie) { + String biliJct = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_CSRF, () -> { + throw new BaseException("cookie中缺少参数" + KEY_COOKIE_CSRF); + }); + BilibiliSendMsgRequest request = new BilibiliSendMsgRequest(msg, StrUtil.toString(ZonedDateTime.now(ZoneId.of("Asia/Shanghai")).toEpochSecond()), realRoomId, biliJct, biliJct); + sendMsg(request, cookie); + } + + /** + * 为主播点赞 + * + * @param request {@link BilibiliLikeReportV3Request} + * @param cookie Cookie + */ + public static void likeReportV3(BilibiliLikeReportV3Request request, String cookie) { + if (StrUtil.isBlank(cookie)) { + throw new BaseException("为主播点赞接口cookie不能为空"); + } + Map stringObjectMap = BeanUtil.beanToMap(request); + @Cleanup HttpResponse execute = OrLiveChatHttpUtil.createPost("https://api.live.bilibili.com/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3") + .cookie(cookie) + .form(stringObjectMap) + .execute(); + responseInterceptor(execute.body()); + } + + /** + * 为主播点赞 + * + * @param anchor_id 主播Uid {@link RoomPlayInfoResult#uid} + * @param realRoomId 真实房间Id {@link RoomPlayInfoResult#room_id} + * @param cookie Cookie + */ + public static void likeReportV3(long anchor_id, long realRoomId, String cookie) { + String uid = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_UID, () -> { + throw new BaseException("cookie中缺少参数" + KEY_UID); + }); + String biliJct = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_CSRF, () -> { + throw new BaseException("cookie中缺少参数" + KEY_COOKIE_CSRF); + }); + BilibiliLikeReportV3Request request = new BilibiliLikeReportV3Request(realRoomId, uid, anchor_id, biliJct, biliJct); + likeReportV3(request, cookie); + } + + private static JsonNode responseInterceptor(String responseString) { + try { + JsonNode jsonNode = OrJacksonUtil.getInstance().readTree(responseString); + int code = jsonNode.get("code").asInt(); + if (code == 0) { + // 成功 + return jsonNode.get("data"); + } else { + throw new BaseException(jsonNode.get("message").asText()); + } + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class DanmuinfoResult { + private String group; + private int business_id; + private double refresh_row_factor; + private int refresh_rate; + private int max_delay; + private String token; + private List host_list; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class Host_list { + private String host; + private int port; + private int wss_port; + private int ws_port; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class RoomPlayInfoResult { + private long room_id; + private int short_id; + private long uid; + private boolean is_hidden; + private boolean is_locked; + private boolean is_portrait; + private BilibiliLiveStatusEnum live_status; + private int hidden_till; + private int lock_till; + private boolean encrypted; + private boolean pwd_verified; + private long live_time; + private int room_shield; + private List all_special_types; + private JsonNode playurl_info; + private int official_type; + private int official_room_id; + private int risk_with_delay; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class RoomInitResult { + private String buvid3; + private String uid; + + private DanmuinfoResult danmuinfoResult = new DanmuinfoResult(); + private RoomPlayInfoResult roomPlayInfoResult = new RoomPlayInfoResult(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/request/BilibiliLikeReportV3Request.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/request/BilibiliLikeReportV3Request.java new file mode 100644 index 0000000..e7d56b0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/request/BilibiliLikeReportV3Request.java @@ -0,0 +1,74 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.api.request; + +import cn.hutool.core.util.StrUtil; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author mjz + * @date 2024/1/31 + */ +@Data +@NoArgsConstructor +public class BilibiliLikeReportV3Request { + /** + * 本次点赞次数 + */ + private int click_time = 1; + /** + * 房间真实ID + */ + private long room_id; + /** + * Cookie中的DedeUserID + */ + private String uid; + /** + * RoomInitResult中的uid + */ + private long anchor_id; + /** + * Cookie中的bili_jct + */ + private String csrf; + /** + * Cookie中的bili_jct + */ + private String csrf_token; + /** + * 暂时留空 + */ + private String visit_id = StrUtil.EMPTY; + + public BilibiliLikeReportV3Request(long room_id, String uid, long anchor_id, String csrf, String csrf_token) { + this.room_id = room_id; + this.uid = uid; + this.anchor_id = anchor_id; + this.csrf = csrf; + this.csrf_token = csrf_token; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/request/BilibiliSendMsgRequest.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/request/BilibiliSendMsgRequest.java new file mode 100644 index 0000000..9a5a655 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/request/BilibiliSendMsgRequest.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.api.request; + +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author mjz + * @date 2023/9/7 + */ +@Data +@NoArgsConstructor +public class BilibiliSendMsgRequest { + private String bubble = "0"; + /** + * 弹幕内容 + */ + private String msg; + /** + * 弹幕颜色 + */ + private String color = "16777215"; + private String mode = "1"; + private String room_type = "0"; + private String jumpfrom = "0"; + /** + * 字体大小 + */ + private String fontsize = "25"; + /** + * 时间戳(秒) + */ + private String rnd; + /** + * 房间真实ID + */ + private long roomid; + /** + * Cookie中的bili_jct + */ + private String csrf; + /** + * Cookie中的bili_jct + */ + private String csrf_token; + + public BilibiliSendMsgRequest(String msg, String rnd, long roomid, String csrf, String csrf_token) { + this.msg = msg; + this.rnd = rnd; + this.roomid = roomid; + this.csrf = csrf; + this.csrf_token = csrf_token; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/BilibiliCmdEnum.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/BilibiliCmdEnum.java new file mode 100644 index 0000000..aa0bd62 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/BilibiliCmdEnum.java @@ -0,0 +1,297 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@RequiredArgsConstructor +public enum BilibiliCmdEnum { + + // region 最新CMD + BIG_R_WELCOME, + CHANGE_ROOM_INFO, + /** + * 礼物连击 + */ + COMBO_SEND, + CUT_OFF, + DANMU_GIFT_LOTTERY_START, + DANMU_GIFT_LOTTERY_END, + DANMU_GIFT_LOTTERY_AWARD, + WARNING, + /** + * 收到礼物 + */ + DANMU_MSG, + /** + * 游客状态下,5分钟后会出现登录提示,弹幕中的用户名、用户id等信息将不再可见 + */ + LOG_IN_NOTICE, + USER_TOAST_MSG, + GUARD_ACHIEVEMENT_ROOM, + /** + * 开始直播 + */ + LIVE, + REENTER_LIVE_ROOM, + MESSAGEBOX_USER_GAIN_MEDAL, + MESSAGEBOX_USER_MEDAL_CHANGE, + MESSAGEBOX_USER_MEDAL_COMPENSATION, + LITTLE_TIPS, + LITTLE_MESSAGE_BOX, + NOTICE_MSG, + PK_MATCH, + PK_PRE, + PK_START, + PK_PROCESS, + PK_END, + PK_SETTLE, + PK_AGAIN, + PK_MIC_END, + PK_BATTLE_PRE_NEW, + PK_BATTLE_START_NEW, + PK_BATTLE_PROCESS_NEW, + PK_BATTLE_FINAL_PROCESS, + PK_BATTLE_PRO_TYPE, + PK_BATTLE_GIFT, + PK_BATTLE_SPECIAL_GIFT, + PK_BATTLE_CRIT, + PK_BATTLE_VOTES_ADD, + PK_BATTLE_END, + PK_BATTLE_SETTLE_NEW, + PK_BATTLE_PUNISH_END, + PK_BATTLE_VIDEO_PUNISH_BEGIN, + PK_BATTLE_VIDEO_PUNISH_END, + PK_BATTLE_RANK_CHANGE, + PK_BATTLE_ABNORMAL, + PK_BATTLE_MULTIPLE_BEGIN, + PK_BATTLE_MULTIPLE_RES, + PK_BATTLE_MULTIPLE_DRAW_RES, + PK_BATTLE_MULTIPLE_AWARD, + /** + * 主播准备中 + */ + PREPARING, + ROOM_REFRESH, + ROOM_SKIN_MSG, + TV_START, + RAFFLE_START, + TV_END, + RAFFLE_END, + PK_LOTTERY_START, + GUARD_LOTTERY_START, + ROOM_BLOCK_INTO, + ROOM_BLOCK_MSG, + ROOM_KICKOUT, + ROOM_LOCK, + ROOM_LIMIT, + ROOM_SILENT_ON, + ROOM_SILENT_OFF, + /** + * 收到礼物 + */ + SEND_GIFT, + SEND_GIFT_V2, + SEND_TOP, + SPECIAL_GIFT, + GIFT_PANEL_PLAN, + INTERACT_WORD, + /** + * 欢迎高能用户、(舰长?待验证)特殊消息 + */ + ENTRY_EFFECT, + ENTRY_EFFECT_MUST_RECEIVE, + BOX_ACTIVITY_START, + WIN_ACTIVITY, + WIN_ACTIVITY_USER, + ROOM_RANK, + HOUR_RANK_AWARDS, + LOL_ACTIVITY, + ROOM_REAL_TIME_MESSAGE_UPDATE, + VOICE_JOIN_STATUS, + ROOM_CHANGE, + /** + * 醒目留言 + */ + SUPER_CHAT_MESSAGE, + /** + * 删除醒目留言 + */ + SUPER_CHAT_MESSAGE_DELETE, + SUPER_CHAT_ENTRANCE, + SUPER_CHAT_AUDIT, + ANCHOR_LOT_CHECKSTATUS, + ANCHOR_LOT_START, + ANCHOR_LOT_END, + ANCHOR_LOT_AWARD, + ANCHOR_LOTTERY_ACTIVITY, + CHASE_FRAME_SWITCH, + WATCH_LPL_EXPIRED, + VIDEO_CONNECTION_JOIN_START, + VIDEO_CONNECTION_JOIN_END, + VIDEO_CONNECTION_MSG, + ROOM_BANNER, + WIDGET_BANNER, + ONLINE_RANK_V2, + ONLINE_RANK_TOP3, + HOT_RANK_CHANGED_V2, + HOT_RANK_SETTLEMENT_V2, + POPULAR_RANK_CHANGED, + AREA_RANK_CHANGED, + VTR_GIFT_LOTTERY, + COMMON_NOTICE_DANMAKU, + RED_POCKET_START, + FULL_SCREEN_SPECIAL_EFFECT, + POPULARITY_RED_POCKET_V2_START, + POPULARITY_RED_POCKET_V2_WINNER_LIST, + POPULARITY_RED_POCKET_V2_NEW, + USER_PANEL_RED_ALARM, + SHOPPING_CART_SHOW, + Revenue_PayLimit, + THERMAL_STORM_DANMU_BEGIN, + THERMAL_STORM_DANMU_UPDATE, + THERMAL_STORM_DANMU_CANCEL, + THERMAL_STORM_DANMU_OVER, + MILESTONE_UPDATE_EVENT, + WEB_REPORT_CONTROL, + RANK_REM, + LIVE_PLAYER_LOG_RECYCLE, + LIVE_INTERNAL_ROOM_LOGIN, + LIVE_OPEN_PLATFORM_GAME, + /** + * 观看人数变化 + */ + WATCHED_CHANGE, + USER_TITLE_GET, + GUARD_BENEFIT_RECEIVE, + GUARD_HONOR_THOUSAND, + PLAY_TOGETHER, + LIVE_OPEN_PLATFORM_CLOUD_GAME, + DANMU_AGGREGATION, + GIFT_STAR_PROCESS, + WIDGET_GIFT_STAR_PROCESS, + WIDGET_WISH_LIST, + COLLECTION_PRAISE_STATUS, + COLLECTION_PRAISE_UPDATE_PROCESS, + USER_VIRTUAL_MVP, + ROOM_SWITCH_INFO_CONFIG_CHANGE, + LIKE_SO_HOT, + /** + * 点赞数更新 + */ + LIKE_INFO_V3_UPDATE, + /** + * 为主播点赞 + */ + LIKE_INFO_V3_CLICK, + LIKE_GUIDE_USER, + STARLIVE_PK_MSG, + MULTI_VOICE_STATUS_SYNC, + LIVE_PANEL_ICON_INFO, + PLAYTOGETHER_SERVICE_CARD_CHANGE, + OFFICIAL_ROOM_EVENT, + MULTI_VOICE_PK_STATUS, + MULTI_VOICE_OPERATIN, + VOICE_CHAT_UPDATE, + MULTI_VOICE_PK_HAT_STATUS, + MULTI_VOICE_OWNER_LEAVE, + MULTI_VOICE_SEND_EMOJI, + WEALTH_NOTIFY, + REDIRECT_EMPTY_PAGE, + INTERACT_JOIN, + INTERACT_OPERATION, + MULTI_VOICE_APPLICATION, + INTERACT_LEAVE, + LPL_REALTIME_STATUS_CHANGED, + SUPER_VIP_CONNECT_DIG, + DM_INTERACTION, + POPULAR_RANK_GUIDE_CARD, + MULTI_CONN_BEHAVIOR, + LIVE_INTERACT_GAME_STATE_CHANGE, + GUARD_LEADER_NOTICE, + PK_INFO, + UNIVERSAL_EVENT_GIFT, + + SYS_MSG, + SYS_GIFT, + GUARD_MSG, + END, + CLOSE, + BLOCK, + ROUND, + WELCOME, + REFRESH, + ACTIVITY_RED_PACKET, + HOT_ROOM_NOTIFY, + PLAY_TAG, + PLAY_PROGRESS_BAR, + // endregion + + // region 旧版CMD,可能已经无效 + /** + * 有人上舰 + */ + GUARD_BUY, + /** + * 欢迎舰长 + */ + WELCOME_GUARD, + HOT_RANK_CHANGED, + LIVE_INTERACTIVE_GAME, + /** + * 高能榜数量更新 + */ + ONLINE_RANK_COUNT, + PK_BATTLE_PROCESS, + PK_BATTLE_SETTLE, + PK_BATTLE_SETTLE_USER, + PK_BATTLE_SETTLE_V2, + /** + * 停止直播的房间ID列表 + */ + STOP_LIVE_ROOM_LIST, + SUPER_CHAT_MESSAGE_JPN, + LIVE_MULTI_VIEW_CHANGE, + RECOMMEND_CARD, + PK_BATTLE_ENTRANCE, + PK_BATTLE_START, + PK_BATTLE_PRE, + // endregion + ; + + public static BilibiliCmdEnum getByString(String cmd) { + try { + return BilibiliCmdEnum.valueOf(cmd); + } catch (Exception e) { + return null; + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/BilibiliLiveStatusEnum.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/BilibiliLiveStatusEnum.java new file mode 100644 index 0000000..a928bdb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/BilibiliLiveStatusEnum.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.constant; + +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2024/3/11 + */ +@Getter +@RequiredArgsConstructor +public enum BilibiliLiveStatusEnum { + + /** + * 未开播 + */ + STOPPED(0), + + /** + * 直播中 + */ + LIVING(1), + + /** + * 投稿视频轮播 + */ + CAROUSEL(2), + ; + + @JsonValue + private final int code; + + public static BilibiliLiveStatusEnum getByCode(int code) { + for (BilibiliLiveStatusEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/OperationEnum.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/OperationEnum.java new file mode 100644 index 0000000..6f13012 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/OperationEnum.java @@ -0,0 +1,89 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/1/5 + */ +@Getter +@RequiredArgsConstructor +public enum OperationEnum { + + /** + * 心跳包 + */ + HEARTBEAT(2), + + /** + * 心跳包回复(人气值) + */ + HEARTBEAT_REPLY(3), + + /** + * 普通包(命令) + */ + MESSAGE(5), + + /** + * 认证包 + */ + USER_AUTHENTICATION(7), + + /** + * 认证包回复 + */ + CONNECT_SUCCESS(8), + + HANDSHAKE(0), + HANDSHAKE_REPLY(1), + SEND_MSG(4), + DISCONNECT_REPLY(6), + RAW(9), + PROTO_READY(10), + PROTO_FINISH(11), + CHANGE_ROOM(12), + CHANGE_ROOM_REPLY(13), + REGISTER(14), + REGISTER_REPLY(15), + UNREGISTER(16), + UNREGISTER_REPLY(17), + ; + + private final int code; + + public static OperationEnum getByCode(int code) { + for (OperationEnum value : OperationEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/ProtoverEnum.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/ProtoverEnum.java new file mode 100644 index 0000000..87c6061 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/constant/ProtoverEnum.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/1/5 + */ +@Getter +@RequiredArgsConstructor +public enum ProtoverEnum { + /** + * 普通包正文不使用压缩 + */ + NORMAL_NO_COMPRESSION(0), + /** + * 心跳及认证包正文不使用压缩 + */ + HEARTBEAT_AUTH_NO_COMPRESSION(1), + /** + * 普通包正文使用zlib压缩 + */ + NORMAL_ZLIB(2), + /** + * 普通包正文使用brotli压缩,解压为一个带头部的协议0普通包 + */ + NORMAL_BROTLI(3), + ; + + private final int code; + + + public static ProtoverEnum getByCode(int code) { + for (ProtoverEnum value : ProtoverEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/BilibiliLiveStatusChangeMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/BilibiliLiveStatusChangeMsg.java new file mode 100644 index 0000000..13a8966 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/BilibiliLiveStatusChangeMsg.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import cn.hutool.core.lang.Pair; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ArrayNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.constant.LiveStatusAction; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILiveStatusChangeMsg; + +/** + * @author mjz + * @date 2024/3/11 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BilibiliLiveStatusChangeMsg extends BaseBilibiliCmdMsg implements ILiveStatusChangeMsg { + + /** + * 保存房间号和短房间号 + */ + private Pair roomIdPair; + + private JsonNode data; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } + + @Override + public LiveStatusAction getLiveStatusAction() { + switch (getCmdEnum()) { + case LIVE: { + return LiveStatusAction.BEGIN; + } + case STOP_LIVE_ROOM_LIST: { + Object roomId = roomIdPair.getKey(); + Object shortRoomId = roomIdPair.getValue(); + if (data == null || !data.has("room_id_list")) { + return null; + } + ArrayNode roomIdList = data.withArray("room_id_list"); + for (JsonNode jsonNode : roomIdList) { + long aLong = jsonNode.asLong(); + if (aLong == NumberUtil.parseLong(StrUtil.toStringOrNull(roomId)) || aLong == NumberUtil.parseLong(StrUtil.toStringOrNull(shortRoomId))) { + return LiveStatusAction.END; + } + } + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/BilibiliRoomStatsMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/BilibiliRoomStatsMsg.java new file mode 100644 index 0000000..dad35fc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/BilibiliRoomStatsMsg.java @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IRoomStatsMsg; + +/** + * BilibiliRoomStatsMsg + * + * @author mjz + * @date 2024/4/24 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BilibiliRoomStatsMsg extends BaseBilibiliCmdMsg implements IRoomStatsMsg { + + private JsonNode data; + + @Override + public String getWatchingCount() { + if (getCmdEnum() == BilibiliCmdEnum.ONLINE_RANK_COUNT) { + if (data != null && data.has("online_count")) { + return data.get("online_count").asText(); + } + } + return null; + } + + @Override + public String getWatchedCount() { + if (getCmdEnum() == BilibiliCmdEnum.WATCHED_CHANGE) { + if (data != null && data.has("num")) { + return data.get("num").asText(); + } + } + return null; + } + + @Override + public String getLikedCount() { + if (getCmdEnum() == BilibiliCmdEnum.LIKE_INFO_V3_UPDATE) { + if (data != null && data.has("click_count")) { + return data.get("click_count").asText(); + } + } + return null; + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/ConnectSuccessMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/ConnectSuccessMsg.java new file mode 100644 index 0000000..b78d02a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/ConnectSuccessMsg.java @@ -0,0 +1,63 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ConnectSuccessMsg extends BaseBilibiliMsg { + + /** + * 0: OK,-101: TOKEN_ERROR + */ + private int code; + + @JsonIgnore + private int protover; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.CONNECT_SUCCESS; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/DanmuMsgMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/DanmuMsgMsg.java new file mode 100644 index 0000000..184fffc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/DanmuMsgMsg.java @@ -0,0 +1,108 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.DmV2; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DanmuMsgMsg extends BaseBilibiliMsg implements IDanmuMsg { + + private JsonNode info; + private String dm_v2; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } + + @Override + public String getBadgeName() { + JsonNode jsonNode3 = info.get(3); + if (jsonNode3.isEmpty()) { + return ""; + } + return jsonNode3.get(1).asText(); + } + + @Override + public byte getBadgeLevel() { + JsonNode jsonNode3 = info.get(3); + if (jsonNode3.isEmpty()) { + return 0; + } + return (byte) jsonNode3.get(0).asInt(); + } + + @Override + public String getUid() { + JsonNode jsonNode2 = info.get(2); + return jsonNode2.get(0).asText(); + } + + @Override + public String getUsername() { + JsonNode jsonNode2 = info.get(2); + return jsonNode2.get(1).asText(); + } + + @Override + public String getUserAvatar() { + String avatar = null; + try { + DmV2.dm_v2 dmV2 = DmV2.dm_v2.parseFrom(Base64.decode(dm_v2)); + avatar = dmV2.getDmV220().getAvatar(); + + if (StrUtil.isBlank(avatar)) { + avatar = info.get(0).get(15).get("user").get("base").get("face").asText(); + } + } catch (Exception e) { + // ignore + } + return avatar; + } + + @Override + public String getContent() { + JsonNode jsonNode1 = info.get(1); + return jsonNode1.asText(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/HeartbeatMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/HeartbeatMsg.java new file mode 100644 index 0000000..22bc1ef --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/HeartbeatMsg.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class HeartbeatMsg extends BaseBilibiliMsg { + + @JsonIgnore + private int protover; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.HEARTBEAT; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/HeartbeatReplyMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/HeartbeatReplyMsg.java new file mode 100644 index 0000000..0c25b36 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/HeartbeatReplyMsg.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class HeartbeatReplyMsg extends BaseBilibiliMsg { + + private int popularity; + + @JsonIgnore + private int protover; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.HEARTBEAT_REPLY; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/InteractWordMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/InteractWordMsg.java new file mode 100644 index 0000000..17884ef --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/InteractWordMsg.java @@ -0,0 +1,396 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2023/12/26 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class InteractWordMsg extends BaseBilibiliMsg implements IEnterRoomMsg { + + private Data data; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } + + @Override + public String getBadgeName() { + if (data == null || data.fans_medal == null) { + return null; + } + return data.fans_medal.medal_name; + } + + @Override + public byte getBadgeLevel() { + if (data == null || data.fans_medal == null) { + return 0; + } + return data.fans_medal.medal_level; + } + + @Override + public String getUid() { + if (data == null) { + return null; + } + return Long.toString(data.uid); + } + + @Override + public String getUsername() { + if (data == null) { + return null; + } + return data.uname; + } + + @Override + public String getUserAvatar() { + if (data == null || data.uinfo == null || data.uinfo.base == null) { + return null; + } + return data.uinfo.base.face; + } + + @lombok.Data + public static class Data { + + private Contribution contribution; + private Contribution_v2 contribution_v2; + private int core_user_type; + private int dmscore; + private Fans_medal fans_medal; + private String group_medal; + private List identities; + private boolean is_mystery; + private int is_spread; + private int msg_type; + private int privilege_type; + private long roomid; + private long score; + private String spread_desc; + private String spread_info; + private int tail_icon; + private String tail_text; + private long timestamp; + private long trigger_time; + private long uid; + private Uinfo uinfo; + private String uname; + private String uname_color; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Contribution { + + private int grade; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Contribution_v2 { + + private int grade; + private String rank_type; + private String text; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Fans_medal { + + private long anchor_roomid; + private int guard_level; + private int icon_id; + private int is_lighted; + private long medal_color; + private long medal_color_border; + private long medal_color_end; + private long medal_color_start; + private byte medal_level; + private String medal_name; + private long score; + private String special; + private long target_id; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Origin_info { + + private String face; + private String name; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Risk_ctrl_info { + + private String face; + private String name; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Official_info { + + private int role; + private String title; + private String desc; + private int type; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Base { + + private String face; + private boolean is_mystery; + private String name; + private int name_color; + private Origin_info origin_info; + private Risk_ctrl_info risk_ctrl_info; + private Official_info official_info; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Medal { + + private String name; + private int level; + private long color_start; + private long color_end; + private long color_border; + private long color; + private int id; + private int typ; + private int is_light; + private long ruid; + private int guard_level; + private int score; + private String guard_icon; + private String honor_icon; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Guard { + + private int level; + private String expired_str; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + + @lombok.Data + public static class Uinfo { + + private long uid; + private Base base; + private Medal medal; + private JsonNode wealth; + private String title; + private Guard guard; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/LikeInfoV3ClickMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/LikeInfoV3ClickMsg.java new file mode 100644 index 0000000..b6e1c89 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/LikeInfoV3ClickMsg.java @@ -0,0 +1,158 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILikeMsg; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2024/1/31 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LikeInfoV3ClickMsg extends BaseBilibiliMsg implements ILikeMsg { + + private Data data; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } + + @Override + public String getBadgeName() { + if (this.data == null || this.data.getFans_medal() == null) { + return null; + } + + return this.data.getFans_medal().getMedal_name(); + } + + @Override + public byte getBadgeLevel() { + if (this.data == null || this.data.getFans_medal() == null) { + return 0; + } + + return this.data.getFans_medal().getMedal_level(); + } + + @Override + public String getUid() { + if (this.data == null) { + return null; + } + + return Long.toString(this.data.getUid()); + } + + @Override + public String getUsername() { + if (this.data == null) { + return ""; + } + + return this.data.getUname(); + } + + @Override + public String getUserAvatar() { + if (this.data == null || this.data.getUinfo() == null || this.data.getUinfo().getBase() == null) { + return ""; + } + + return this.data.getUinfo().getBase().getFace(); + } + + @lombok.Data + public static class Data { + + private int show_area; + private int msg_type; + private String like_icon; + private long uid; + private String like_text; + private String uname; + private String uname_color; + private List identities; + private InteractWordMsg.Fans_medal fans_medal; + private Contribution_info contribution_info; + private int dmscore; + private String group_medal; + private boolean is_mystery; + private InteractWordMsg.Uinfo uinfo; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Contribution_info { + + private int grade; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/MessageMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/MessageMsg.java new file mode 100644 index 0000000..099ec24 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/MessageMsg.java @@ -0,0 +1,81 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliCmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MessageMsg extends BaseBilibiliCmdMsg { + + private Long id; + + private String name; + + private JsonNode full; + + private JsonNode half; + + private JsonNode side; + + private JsonNode data; + + private JsonNode info; + + private JsonNode msg_common; + + private JsonNode msg_self; + + private JsonNode link_url; + + private JsonNode msg_type; + + private JsonNode shield_uid; + + private JsonNode business_id; + + private JsonNode scatter; + + private long roomid; + + private long real_roomid; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/SendGiftMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/SendGiftMsg.java new file mode 100644 index 0000000..91cc032 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/SendGiftMsg.java @@ -0,0 +1,351 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.dto.MedalInfo; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendGiftMsg extends BaseBilibiliMsg implements IGiftMsg { + + private Data data; + + /** + * 额外属性,获取礼物图片时可能会用到 + */ + private long roomId; + + @Override + public String getBadgeName() { + if (data == null || data.medal_info == null) { + return IGiftMsg.super.getBadgeName(); + } + + return data.medal_info.getMedal_name(); + } + + @Override + public byte getBadgeLevel() { + if (data == null || data.medal_info == null) { + return IGiftMsg.super.getBadgeLevel(); + } + + return data.medal_info.getMedal_level(); + } + + @Override + public String getUid() { + if (this.data == null) { + return null; + } + + return Long.toString(this.data.getUid()); + } + + @Override + public String getUsername() { + if (this.data == null) { + return ""; + } + + return this.data.getUname(); + } + + @Override + public String getUserAvatar() { + if (this.data == null) { + return ""; + } + + return this.data.getFace(); + } + + @Override + public String getGiftName() { + if (this.data == null) { + return "未知礼物"; + } + + return this.data.getGiftName(); + } + + @Override + public String getGiftImg() { + return BilibiliApis.getGiftImgById(this.data.giftId, this.roomId); + } + + @Override + public String getGiftId() { + if (this.data == null) { + return null; + } + + return Long.toString(data.getGiftId()); + } + + @Override + public int getGiftCount() { + if (this.data == null) { + return 0; + } + + return data.getNum(); + } + + @Override + public int getGiftPrice() { + if (this.data == null) { + return -1; + } + + return data.getPrice(); + } + + @Override + public String getReceiveUid() { + if (this.data == null || this.data.getReceive_user_info() == null) { + return null; + } + + return Long.toString(data.getReceive_user_info().getUid()); + } + + @Override + public String getReceiveUsername() { + if (this.data == null || this.data.getReceive_user_info() == null) { + return ""; + } + + return data.getReceive_user_info().getUname(); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } + + @lombok.Data + public static class Data { + + private int draw; + private int gold; + private int silver; + private int num; + private int total_coin; + private int effect; + private int broadcast_id; + private int crit_prob; + private int guard_level; + private long rcost; + private long uid; + private long timestamp; + private int giftId; + private int giftType; + @JsonProperty("super") + private int _super; + private int super_gift_num; + private int super_batch_gift_num; + private int remain; + private int discount_price; + private int price; + private String beatId; + private String biz_source; + private String action; + private String coin_type; + private String uname; + private String face; + private String batch_combo_id; + private String rnd; + private String giftName; + private String original_gift_name; + private Combo_send combo_send; + private Batch_combo_send batch_combo_send; + private String tag_image; + private String top_list; + private String send_master; + private boolean is_first; + private int demarcation; + private int combo_stay_time; + private int combo_total_coin; + private String tid; + private int effect_block; + private int is_special_batch; + private int combo_resources_id; + private int magnification; + private String name_color; + private MedalInfo medal_info; + private int svga_block; + private JsonNode blind_gift; + private int float_sc_resource_id; + @JsonProperty("switch") + private boolean _switch; + private int face_effect_type; + private int face_effect_id; + private boolean is_naming; + private Receive_user_info receive_user_info; + private boolean is_join_receiver; + private Bag_gift bag_gift; + private int wealth_level; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Combo_send { + + private long uid; + private int gift_num; + private int combo_num; + private int gift_id; + private String combo_id; + private String gift_name; + private String action; + private String uname; + private String send_master; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Receive_user_info { + + private String uname; + private long uid; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Batch_combo_send { + + private long uid; + private int gift_num; + private int batch_combo_num; + private int gift_id; + private String batch_combo_id; + private String gift_name; + private String action; + private String uname; + private String send_master; + private JsonNode blind_gift; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Bag_gift { + + private int show_price; + private int price_for_show; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/SuperChatMessageMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/SuperChatMessageMsg.java new file mode 100644 index 0000000..4cb974b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/SuperChatMessageMsg.java @@ -0,0 +1,202 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.dto.MedalInfo; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ISuperChatMsg; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/24 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SuperChatMessageMsg extends BaseBilibiliMsg implements ISuperChatMsg { + + private long roomid; + private Data data; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.MESSAGE; + } + + @Override + public String getUid() { + if (this.data == null) { + return null; + } + + return Long.toString(this.data.uid); + } + + @Override + public String getUsername() { + if (this.data == null || this.data.getUser_info() == null) { + return ""; + } + + return this.data.user_info.uname; + } + + @Override + public String getUserAvatar() { + if (this.data == null || this.data.getUser_info() == null) { + return ""; + } + + return this.data.user_info.face; + } + + @Override + public String getContent() { + if (this.data == null) { + return ""; + } + + return this.data.message; + } + + @Override + public int getDuration() { + if (this.data == null) { + return 0; + } + + return this.data.time; + } + + @lombok.Data + public static class Data { + private String background_bottom_color; + private String background_color; + private String background_color_end; + private String background_color_start; + private String background_icon; + private String background_image; + private String background_price_color; + private double color_point; + private int dmscore; + private long end_time; + private Gift gift; + private long id; + private int is_ranked; + private int is_send_audit; + private MedalInfo medal_info; + private String message; + private String message_font_color; + private String message_trans; + private int price; + private int rate; + private long start_time; + private int time; + private String token; + private int trans_mark; + private long ts; + private long uid; + private User_info user_info; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Gift { + private int gift_id; + private String gift_name; + private int num; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class User_info { + private String face; + private String face_frame; + private int guard_level; + private int is_main_vip; + private int is_svip; + private int is_vip; + private String level_color; + private int manager; + private String name_color; + private String title; + private String uname; + private int user_level; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/UserAuthenticationMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/UserAuthenticationMsg.java new file mode 100644 index 0000000..8ced5b0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/UserAuthenticationMsg.java @@ -0,0 +1,92 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@RequiredArgsConstructor +public class UserAuthenticationMsg extends BaseBilibiliMsg { + + /** + * 用户uid,0代表游客 + */ + private long uid; + + /** + * 房间id room_id,不是短id short_id + * 可以通过将url参数id改为直播地址中的数字来查询房间真实id + * example: https://api.live.bilibili.com/room/v1/Room/room_init?id=6 + */ + private final long roomid; + + /** + * 协议版本 + * + * @see ProtoverEnum#getCode() + */ + private final int protover; + + /** + * 平台标识 + */ + private String platform = "web"; + private int type = 2; + + /** + * 必须字段 + * + * @since 2023-08-19 + */ + private final String buvid; + + /** + * 认证秘钥(必须字段) + * + * @since @since 2023-08-19 + */ + private final String key; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(this.protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.USER_AUTHENTICATION; + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/BaseBilibiliCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/BaseBilibiliCmdMsg.java new file mode 100644 index 0000000..8a78619 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/BaseBilibiliCmdMsg.java @@ -0,0 +1,68 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base; + + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseBilibiliCmdMsg extends BaseBilibiliMsg implements ICmdMsg { + + private int protover; + private String cmd; + + @Override + public String getCmd() { + return this.cmd; + } + + @Override + public void setCmd(String cmd) { + this.cmd = cmd; + } + + @Override + public BilibiliCmdEnum getCmdEnum() { + return BilibiliCmdEnum.getByString(getCmd()); + } + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(this.protover); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/BaseBilibiliMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/BaseBilibiliMsg.java new file mode 100644 index 0000000..db18166 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/BaseBilibiliMsg.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseBilibiliMsg implements IBilibiliMsg { + + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + private int protover; + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } + + @Override + public String toString() { + try { + return OBJECT_MAPPER.writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/IBilibiliMsg.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/IBilibiliMsg.java new file mode 100644 index 0000000..b7e591c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/base/IBilibiliMsg.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IBilibiliMsg extends IMsg { + + @JsonIgnore + ProtoverEnum getProtoverEnum(); + + @JsonIgnore + OperationEnum getOperationEnum(); + +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/dto/MedalInfo.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/dto/MedalInfo.java new file mode 100644 index 0000000..a1693eb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/dto/MedalInfo.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +@Data +public class MedalInfo { + + private long target_id; + private String special; + private int icon_id; + private String anchor_uname; + private int anchor_roomid; + private byte medal_level; + private String medal_name; + private String medal_color; + private long medal_color_start; + private long medal_color_end; + private long medal_color_border; + private int is_lighted; + private int guard_level; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/factory/BilibiliMsgFactory.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/factory/BilibiliMsgFactory.java new file mode 100644 index 0000000..808e0e8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/msg/factory/BilibiliMsgFactory.java @@ -0,0 +1,93 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.msg.factory; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.util.NumberUtil; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.UserAuthenticationMsg; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class BilibiliMsgFactory { + + private static final TimedCache FACTORY_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1), new ConcurrentHashMap<>()); + private static final TimedCache HEARTBEAT_MSG_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1), new ConcurrentHashMap<>()); + + /** + * 浏览器地址中的房间id,支持短id + */ + private final long roomId; + + public BilibiliMsgFactory(long roomId) { + this.roomId = roomId; + } + + public static BilibiliMsgFactory getInstance(long roomId) { + if (!FACTORY_CACHE.containsKey(roomId)) { + FACTORY_CACHE.put(roomId, new BilibiliMsgFactory(roomId)); + } + return FACTORY_CACHE.get(roomId); + } + + /** + * 创建认证包 + * + * @param protover {@link ProtoverEnum} + * @return AuthWebSocketFrame + */ + public UserAuthenticationMsg createAuth(ProtoverEnum protover, BilibiliApis.RoomInitResult roomInitResult) { + try { + String buvid3 = roomInitResult.getBuvid3(); + long realRoomId = roomInitResult.getRoomPlayInfoResult().getRoom_id(); + UserAuthenticationMsg userAuthenticationMsg = new UserAuthenticationMsg(realRoomId, protover.getCode(), buvid3, roomInitResult.getDanmuinfoResult().getToken()); + userAuthenticationMsg.setUid(NumberUtil.parseLong(roomInitResult.getUid())); + return userAuthenticationMsg; + } catch (Exception e) { + throw new BaseException(String.format("认证包创建失败,请检查房间号是否正确。roomId: %d, msg: %s", roomId, e.getMessage())); + } + } + + /** + * 创建心跳包 + * + * @param protover {@link ProtoverEnum} + * @return AuthWebSocketFrame + */ + public HeartbeatMsg createHeartbeat(ProtoverEnum protover) { + if (!HEARTBEAT_MSG_CACHE.containsKey(protover)) { + HEARTBEAT_MSG_CACHE.put(protover, new HeartbeatMsg(protover.getCode())); + } + return HEARTBEAT_MSG_CACHE.get(protover); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/protobuf/DmV2.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/protobuf/DmV2.java new file mode 100644 index 0000000..fbeaf4c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/protobuf/DmV2.java @@ -0,0 +1,1252 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dm_v2.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf; + +public final class DmV2 { + private DmV2() {} + 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 dm_v2OrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2) + com.google.protobuf.MessageOrBuilder { + + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + * @return Whether the dmV220 field is set. + */ + boolean hasDmV220(); + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + * @return The dmV220. + */ + dm_v2.dm_v2_20 getDmV220(); + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + dm_v2.dm_v2_20OrBuilder getDmV220OrBuilder(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2} + */ + public static final class dm_v2 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2) + dm_v2OrBuilder { + private static final long serialVersionUID = 0L; + // Use dm_v2.newBuilder() to construct. + private dm_v2(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private dm_v2() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new dm_v2(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2.class, Builder.class); + } + + public interface dm_v2_20OrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20) + com.google.protobuf.MessageOrBuilder { + + /** + * string avatar = 4; + * @return The avatar. + */ + String getAvatar(); + /** + * string avatar = 4; + * @return The bytes for avatar. + */ + com.google.protobuf.ByteString + getAvatarBytes(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20} + */ + public static final class dm_v2_20 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20) + dm_v2_20OrBuilder { + private static final long serialVersionUID = 0L; + // Use dm_v2_20.newBuilder() to construct. + private dm_v2_20(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private dm_v2_20() { + avatar_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new dm_v2_20(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2_20.class, Builder.class); + } + + public static final int AVATAR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile Object avatar_ = ""; + /** + * string avatar = 4; + * @return The avatar. + */ + @Override + public String getAvatar() { + Object ref = avatar_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + avatar_ = s; + return s; + } + } + /** + * string avatar = 4; + * @return The bytes for avatar. + */ + @Override + public com.google.protobuf.ByteString + getAvatarBytes() { + Object ref = avatar_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + avatar_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatar_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, avatar_); + } + getUnknownFields().writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatar_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, avatar_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof dm_v2_20)) { + return super.equals(obj); + } + dm_v2_20 other = (dm_v2_20) obj; + + if (!getAvatar() + .equals(other.getAvatar())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AVATAR_FIELD_NUMBER; + hash = (53 * hash) + getAvatar().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static dm_v2_20 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2_20 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2_20 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2_20 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2_20 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2_20 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2_20 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2_20 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 dm_v2_20 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static dm_v2_20 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 dm_v2_20 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2_20 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(dm_v2_20 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20) + dm_v2_20OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2_20.class, Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.DmV2.dm_v2.dm_v2_20.newBuilder() + private Builder() { + + } + + private Builder( + BuilderParent parent) { + super(parent); + + } + @Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatar_ = ""; + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor; + } + + @Override + public dm_v2_20 getDefaultInstanceForType() { + return dm_v2_20.getDefaultInstance(); + } + + @Override + public dm_v2_20 build() { + dm_v2_20 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public dm_v2_20 buildPartial() { + dm_v2_20 result = new dm_v2_20(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(dm_v2_20 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.avatar_ = avatar_; + } + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof dm_v2_20) { + return mergeFrom((dm_v2_20)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(dm_v2_20 other) { + if (other == dm_v2_20.getDefaultInstance()) return this; + if (!other.getAvatar().isEmpty()) { + avatar_ = other.avatar_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: { + avatar_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private Object avatar_ = ""; + /** + * string avatar = 4; + * @return The avatar. + */ + public String getAvatar() { + Object ref = avatar_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + avatar_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string avatar = 4; + * @return The bytes for avatar. + */ + public com.google.protobuf.ByteString + getAvatarBytes() { + Object ref = avatar_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + avatar_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string avatar = 4; + * @param value The avatar to set. + * @return This builder for chaining. + */ + public Builder setAvatar( + String value) { + if (value == null) { throw new NullPointerException(); } + avatar_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string avatar = 4; + * @return This builder for chaining. + */ + public Builder clearAvatar() { + avatar_ = getDefaultInstance().getAvatar(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string avatar = 4; + * @param value The bytes for avatar to set. + * @return This builder for chaining. + */ + public Builder setAvatarBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatar_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20) + private static final dm_v2_20 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new dm_v2_20(); + } + + public static dm_v2_20 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public dm_v2_20 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public dm_v2_20 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int _DM_V2_20_FIELD_NUMBER = 20; + private dm_v2_20 DmV220_; + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + * @return Whether the dmV220 field is set. + */ + @Override + public boolean hasDmV220() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + * @return The dmV220. + */ + @Override + public dm_v2_20 getDmV220() { + return DmV220_ == null ? dm_v2_20.getDefaultInstance() : DmV220_; + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + @Override + public dm_v2_20OrBuilder getDmV220OrBuilder() { + return DmV220_ == null ? dm_v2_20.getDefaultInstance() : DmV220_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(20, getDmV220()); + } + getUnknownFields().writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getDmV220()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof dm_v2)) { + return super.equals(obj); + } + dm_v2 other = (dm_v2) obj; + + if (hasDmV220() != other.hasDmV220()) return false; + if (hasDmV220()) { + if (!getDmV220() + .equals(other.getDmV220())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDmV220()) { + hash = (37 * hash) + _DM_V2_20_FIELD_NUMBER; + hash = (53 * hash) + getDmV220().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static dm_v2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2 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 dm_v2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static dm_v2 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 dm_v2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(dm_v2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2) + dm_v2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2.class, Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.DmV2.dm_v2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDmV220FieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + DmV220_ = null; + if (DmV220Builder_ != null) { + DmV220Builder_.dispose(); + DmV220Builder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor; + } + + @Override + public dm_v2 getDefaultInstanceForType() { + return dm_v2.getDefaultInstance(); + } + + @Override + public dm_v2 build() { + dm_v2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public dm_v2 buildPartial() { + dm_v2 result = new dm_v2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(dm_v2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.DmV220_ = DmV220Builder_ == null + ? DmV220_ + : DmV220Builder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof dm_v2) { + return mergeFrom((dm_v2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(dm_v2 other) { + if (other == dm_v2.getDefaultInstance()) return this; + if (other.hasDmV220()) { + mergeDmV220(other.getDmV220()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 162: { + input.readMessage( + getDmV220FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 162 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private dm_v2_20 DmV220_; + private com.google.protobuf.SingleFieldBuilderV3< + dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder> DmV220Builder_; + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + * @return Whether the dmV220 field is set. + */ + public boolean hasDmV220() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + * @return The dmV220. + */ + public dm_v2_20 getDmV220() { + if (DmV220Builder_ == null) { + return DmV220_ == null ? dm_v2_20.getDefaultInstance() : DmV220_; + } else { + return DmV220Builder_.getMessage(); + } + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + public Builder setDmV220(dm_v2_20 value) { + if (DmV220Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + DmV220_ = value; + } else { + DmV220Builder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + public Builder setDmV220( + dm_v2_20.Builder builderForValue) { + if (DmV220Builder_ == null) { + DmV220_ = builderForValue.build(); + } else { + DmV220Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + public Builder mergeDmV220(dm_v2_20 value) { + if (DmV220Builder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + DmV220_ != null && + DmV220_ != dm_v2_20.getDefaultInstance()) { + getDmV220Builder().mergeFrom(value); + } else { + DmV220_ = value; + } + } else { + DmV220Builder_.mergeFrom(value); + } + if (DmV220_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + public Builder clearDmV220() { + bitField0_ = (bitField0_ & ~0x00000001); + DmV220_ = null; + if (DmV220Builder_ != null) { + DmV220Builder_.dispose(); + DmV220Builder_ = null; + } + onChanged(); + return this; + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + public dm_v2_20.Builder getDmV220Builder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDmV220FieldBuilder().getBuilder(); + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + public dm_v2_20OrBuilder getDmV220OrBuilder() { + if (DmV220Builder_ != null) { + return DmV220Builder_.getMessageOrBuilder(); + } else { + return DmV220_ == null ? + dm_v2_20.getDefaultInstance() : DmV220_; + } + } + /** + * .tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder> + getDmV220FieldBuilder() { + if (DmV220Builder_ == null) { + DmV220Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder>( + getDmV220(), + getParentForChildren(), + isClean()); + DmV220_ = null; + } + return DmV220Builder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2) + private static final dm_v2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new dm_v2(); + } + + public static dm_v2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public dm_v2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public dm_v2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\013dm_v2.proto\022:tech.ordinaryroad.live.ch" + + "at.client.codec.bilibili.protobuf\"\202\001\n\005dm" + + "_v2\022]\n\t_dm_v2_20\030\024 \001(\0132J.tech.ordinaryro" + + "ad.live.chat.client.codec.bilibili.proto" + + "buf.dm_v2.dm_v2_20\032\032\n\010dm_v2_20\022\016\n\006avatar" + + "\030\004 \001(\tB<\n:tech.ordinaryroad.live.chat.cl" + + "ient.codec.bilibili.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor, + new String[] { "DmV220", }); + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor = + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor.getNestedTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor, + new String[] { "Avatar", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/util/BilibiliCodecUtil.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/util/BilibiliCodecUtil.java new file mode 100644 index 0000000..71dbb20 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/codec/bilibili/util/BilibiliCodecUtil.java @@ -0,0 +1,264 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.bilibili.util; + +import cn.hutool.core.util.StrUtil; +import com.aayushatharva.brotli4j.Brotli4jLoader; +import com.aayushatharva.brotli4j.decoder.BrotliInputStream; +import com.fasterxml.jackson.core.JsonProcessingException; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.buffer.Unpooled; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.ConnectSuccessMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.HeartbeatReplyMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.MessageMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.util.*; +import java.util.zip.DataFormatException; +import java.util.zip.Inflater; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Slf4j +public class BilibiliCodecUtil { + + public static int sequence = 0; + + public static final short FRAME_HEADER_LENGTH = 16; + + public static ByteBuf encode(IBilibiliMsg msg, ByteBuf out) { + String bodyJsonString = StrUtil.EMPTY; + // HeartbeatMsg不需要正文,如果序列化后得到`{}`,则替换为空字符串 + if (!(msg instanceof HeartbeatMsg)) { + bodyJsonString = msg.toString(); + if (StrUtil.EMPTY_JSON.equals(bodyJsonString)) { + bodyJsonString = StrUtil.EMPTY; + } + } + byte[] bodyBytes = bodyJsonString.getBytes(StandardCharsets.UTF_8); + int length = bodyBytes.length + FRAME_HEADER_LENGTH; + out.writeInt(length); + out.writeShort(FRAME_HEADER_LENGTH); + out.writeShort(msg.getProtoverEnum().getCode()); + out.writeInt(msg.getOperationEnum().getCode()); + out.writeInt(++sequence); + out.writeBytes(bodyBytes); + return out; + } + + public static ByteBuf encode(IBilibiliMsg msg) { + return encode(msg, ByteBufAllocator.DEFAULT.buffer(FRAME_HEADER_LENGTH)); + } + + public static List decode(ByteBuf in, List msgList) { + Queue pendingByteBuf = new LinkedList<>(); + + do { + Optional msg = doDecode(in, pendingByteBuf); + msg.ifPresent(msgList::add); + in = pendingByteBuf.poll(); + } while (in != null); + + return msgList; + } + + public static List decode(ByteBuf in) { + return decode(in, new ArrayList<>()); + } + + /** + * 执行解码操作,有压缩则先解压,解压后可能得到多条消息 + * + * @param in handler收到的一条消息 + * @param pendingByteBuf 用于存放未读取完的ByteBuf + * @return Optional 何时为空值:不支持的{@link OperationEnum},不支持的{@link ProtoverEnum},{@link #parse(OperationEnum, String)}反序列化失败 + * @see OperationEnum + * @see ProtoverEnum + */ + private static Optional doDecode(ByteBuf in, Queue pendingByteBuf) { + int length = in.readInt(); + short frameHeaderLength = in.readShort(); + short protoverCode = in.readShort(); + int operationCode = in.readInt(); + int sequence = in.readInt(); + int contentLength = length - frameHeaderLength; + byte[] inputBytes = new byte[contentLength]; + in.readBytes(inputBytes); + if (in.readableBytes() != 0) { + // log.error("in.readableBytes() {}", in.readableBytes()); + pendingByteBuf.offer(in); + } + + OperationEnum operationEnum = OperationEnum.getByCode(operationCode); + if (operationEnum == null) { + throw new BaseException(String.format("未知operation: %d", operationCode)); + } + if (protoverCode == ProtoverEnum.NORMAL_ZLIB.getCode()) { + switch (operationEnum) { + case MESSAGE: { + // Decompress the bytes + Inflater inflater = new Inflater(); + inflater.reset(); + inflater.setInput(inputBytes); + // TODO 改用池化,并处理内存泄漏问题 + ByteBuf buffer = Unpooled.buffer(); + try { + byte[] bytes = new byte[1024]; + while (!inflater.finished()) { + int count = inflater.inflate(bytes); + buffer.writeBytes(bytes, 0, count); + } + } catch (DataFormatException e) { + throw new BaseException(e); + } finally { + inflater.end(); + } + return doDecode(buffer, pendingByteBuf); + } + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else if (protoverCode == ProtoverEnum.NORMAL_NO_COMPRESSION.getCode()) { + switch (operationEnum) { + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else if (protoverCode == ProtoverEnum.HEARTBEAT_AUTH_NO_COMPRESSION.getCode()) { + switch (operationEnum) { + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else if (protoverCode == ProtoverEnum.NORMAL_BROTLI.getCode()) { + switch (operationEnum) { + case MESSAGE: { + // Load the native library + Brotli4jLoader.ensureAvailability(); + + ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(inputBytes); + // TODO 改用池化,并处理内存泄漏问题 + ByteBuf buffer = Unpooled.buffer(); + byte[] bytes = new byte[1024]; + BrotliInputStream brotliInputStream = null; + try { + brotliInputStream = new BrotliInputStream(byteArrayInputStream); + int count; + while ((count = brotliInputStream.read(bytes)) > -1) { + buffer.writeBytes(bytes, 0, count); + } + } catch (IOException e) { + throw new BaseException(e); + } finally { + try { + // Close the BrotliInputStream. This also closes the InputStream. + if (brotliInputStream != null) { + brotliInputStream.close(); + } + } catch (IOException e) { + log.error("解压失败", e); + } + } + return doDecode(buffer, pendingByteBuf); + } + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else { + if (log.isWarnEnabled()) { + log.warn("暂不支持的版本:{}", protoverCode); + } + return Optional.empty(); + } + } + + public static Optional parse(OperationEnum operation, String jsonString) { + switch (operation) { + case MESSAGE: { + try { + return Optional.ofNullable(BaseBilibiliMsg.OBJECT_MAPPER.readValue(jsonString, MessageMsg.class)); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + case CONNECT_SUCCESS: { + try { + return Optional.ofNullable(BaseBilibiliMsg.OBJECT_MAPPER.readValue(jsonString, ConnectSuccessMsg.class)); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + case HEARTBEAT_REPLY: { + try { + return Optional.ofNullable(BaseBilibiliMsg.OBJECT_MAPPER.readValue(jsonString, HeartbeatReplyMsg.class)); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + default: { + if (log.isWarnEnabled()) { + log.warn("暂不支持 {}", operation); + } + return Optional.empty(); + } + } + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/resources/proto/dm_v2.proto b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/resources/proto/dm_v2.proto new file mode 100644 index 0000000..fd43a2a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/main/resources/proto/dm_v2.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf"; + +message dm_v2 { + dm_v2_20 _dm_v2_20 = 20; + message dm_v2_20 { + string avatar = 4; + } +} + diff --git a/live-chat-client-codec/live-chat-client-codec-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/BilibiliApisTest.java b/live-chat-client-codec/live-chat-client-codec-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/BilibiliApisTest.java new file mode 100644 index 0000000..7c6d1c3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/codec/bilibili/api/BilibiliApisTest.java @@ -0,0 +1,24 @@ +package tech.ordinaryroad.live.chat.client.codec.bilibili.api; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * @author mjz + * @date 2023/9/7 + */ +class BilibiliApisTest { + + @Test + void sendMsg() { + String cookie = System.getenv("cookie"); + BilibiliApis.sendMsg("666", 545068, cookie); + } + + @Test + void getRoomPlayInfo() { + assertEquals(545068, BilibiliApis.getRoomPlayInfo(7777, null).getRoom_id()); + assertEquals(7734200, BilibiliApis.getRoomPlayInfo(6, null).getRoom_id()); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/pom.xml b/live-chat-client-codec/live-chat-client-codec-douyin/pom.xml new file mode 100644 index 0000000..fee2282 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/pom.xml @@ -0,0 +1,98 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client-codec + 0.7.0 + + jar + + live-chat-client-codec-douyin + live-chat-client-codec-douyin + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-commons-base + + + tech.ordinaryroad + live-chat-client-commons-util + + + + io.netty + netty-codec + + + + com.google.protobuf + protobuf-java + + + + ch.qos.logback + logback-classic + + + org.graalvm.js + js + 21.0.0 + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + + + + + + + + org.apache.httpcomponents.client5 + httpclient5 + 5.1 + + + + org.graalvm.sdk + graal-sdk + 20.3.0 + + + org.graalvm.js + js + 20.3.0 + + + org.graalvm.js + js-scriptengine + 20.3.0 + + + org.apache.poi + poi-ooxml + 5.2.2 + + + edu.stanford.nlp + stanford-corenlp + 4.5.1 + + + edu.stanford.nlp + stanford-corenlp + 4.5.1 + models + + + diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/DouyinApis.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/DouyinApis.java new file mode 100644 index 0000000..d6e99dc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/DouyinApis.java @@ -0,0 +1,337 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.api; + +import cn.hutool.core.util.*; +import cn.hutool.http.*; +import cn.hutool.http.Header; +import cn.hutool.json.JSON; +import cn.hutool.json.JSONObject; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.oracle.truffle.js.builtins.JSONBuiltins; +import io.netty.util.internal.StringUtil; +import lombok.*; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.graalvm.polyglot.Source; +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinRoomStatusEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.DouyinGiftMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatHttpUtil; +import org.graalvm.polyglot.Context; +import org.graalvm.polyglot.Value; + +import javax.script.Invocable; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.ScriptException; +import java.io.*; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @author mjz + * @date 2024/1/3 + */ +@Slf4j +public class DouyinApis { + + public static final String KEY_COOKIE_TTWID = "ttwid"; + public static final String KEY_COOKIE_MS_TOKEN = "msToken"; + public static final String KEY_COOKIE_AC_NONCE = "__ac_nonce"; + public static final String A_BOGUS="a_bogus"; + public static final String MS_TOKEN_BASE_STRING = RandomUtil.BASE_CHAR_NUMBER_LOWER + "=_"; + public static final int MS_TOKEN_LENGTH = 107; + public static final int AC_NONCE_LENGTH = 21; + public static final String PATTERN_USER_UNIQUE_ID = "\\\\\"user_unique_id\\\\\":\\\\\"(\\d+)\\\\\""; + public static final String PATTERN_ROOM_ID = "\\\\\"roomId\\\\\":\\\\\"(\\d+)\\\\\""; + public static final String A_ID ="(?i)\\b(?:aid)\\b\\s*:\\s*(\\d+)"; + public static final String PATTERN_ROOM_STATUS = "\\\\\"roomInfo\\\\\".+\\\\\"status\\\\\":(\\d+)"; +// public static final String USER_AGENT = GlobalHeaders.INSTANCE.header(Header.USER_AGENT).replace("Hutool", ""); + + public static final String USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"; + + + + public static List initialScript(String excel){ + String excelFilePath = excel; // 修改为你上传的文件路径 + List jsonObjects = new ArrayList<>(); + + try (FileInputStream fis = new FileInputStream(new File(excelFilePath)); + Workbook workbook = new XSSFWorkbook(fis)) { + + // 假设我们读取第一个Sheet + Sheet sheet = workbook.getSheetAt(0); + Iterator rowIterator = sheet.iterator(); + + // 获取表头 + Row headerRow = rowIterator.next(); + List headers = new ArrayList<>(); + for (Cell cell : headerRow) { + headers.add(cell.getStringCellValue()); + } + + // 迭代每一行,创建JSON对象 + while (rowIterator.hasNext()) { + Row row = rowIterator.next(); + JSONObject jsonObject = new JSONObject(); + + for (int i = 0; i < headers.size(); i++) { + Cell cell = row.getCell(i, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK); + switch (cell.getCellType()) { + case STRING: + jsonObject.put(headers.get(i), cell.getStringCellValue()); + break; + case NUMERIC: + if (DateUtil.isCellDateFormatted(cell)) { + jsonObject.put(headers.get(i), cell.getDateCellValue()); + } else { + jsonObject.put(headers.get(i), cell.getNumericCellValue()); + } + break; + case BOOLEAN: + jsonObject.put(headers.get(i), cell.getBooleanCellValue()); + break; + case FORMULA: + jsonObject.put(headers.get(i), cell.getCellFormula()); + break; + default: + jsonObject.put(headers.get(i), ""); + break; + } + } + + jsonObjects.add(jsonObject); + } + + } catch (IOException e) { + e.printStackTrace(); + } + + Map map=new HashMap<>(); + // 输出结果 + for (JSONObject jsonObject : jsonObjects) { + System.out.println(jsonObject.toString()); + String value = jsonObject.getStr("留资操作疑问"); + map.put(value,jsonObject); + } + return jsonObjects; + } + + public static RoomInitResult roomInit(Object roomId, String cookie) { + Map cookieMap = OrLiveChatCookieUtil.parseCookieString(cookie); + List jsonObjects = initialScript("D:\\工作\\抖音AI\\回答总结.xlsx"); + Map map=new HashMap<>(); + // 输出结果 + for (JSONObject jsonObject : jsonObjects) { + System.out.println(jsonObject.toString()); + String value = jsonObject.getStr("留资操作疑问"); + map.put(value,jsonObject); + } + @Cleanup + HttpResponse response1 = OrLiveChatHttpUtil.createGet("https://live.douyin.com/").cookie(cookie).execute(); + String ttwid = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_TTWID, () -> response1.getCookie(KEY_COOKIE_TTWID).getValue()); + String msToken = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_MS_TOKEN, () -> RandomUtil.randomString(MS_TOKEN_BASE_STRING, MS_TOKEN_LENGTH)); + String __ac_nonce = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_AC_NONCE, () -> RandomUtil.randomString(AC_NONCE_LENGTH)); + + @Cleanup + HttpResponse response2 = OrLiveChatHttpUtil.createGet("https://live.douyin.com/" + roomId) + .cookie(StrUtil.emptyToDefault(cookie, KEY_COOKIE_TTWID + "=" + ttwid + "; " + KEY_COOKIE_MS_TOKEN + "=" + msToken + "; " + KEY_COOKIE_AC_NONCE + "=" + __ac_nonce)) + .execute(); + if (response2.getStatus() != HttpStatus.HTTP_OK) { + throw new BaseException("获取" + roomId + "真实房间ID失败"); + } + String body2 = response2.body(); + String user_unique_id = StrUtil.emptyToDefault(ReUtil.getGroup1(PATTERN_USER_UNIQUE_ID, body2), RandomUtil.randomNumbers(19)); + long realRoomId; + String realRoomIdString = ReUtil.getGroup1(PATTERN_ROOM_ID, body2); + try { + realRoomId = NumberUtil.parseLong(realRoomIdString); + } catch (Exception e) { + throw new BaseException("获取" + roomId + "真实房间ID失败"); + } + String aid = ReUtil.getGroup1(A_ID, body2); + int roomStatus; + String roomStatusString = ReUtil.getGroup1(PATTERN_ROOM_STATUS, body2); + try { + roomStatus = NumberUtil.parseInt(roomStatusString); + } catch (Exception e) { + throw new BaseException("获取" + roomId + "直播间状态失败"); + } + + return RoomInitResult.builder() + .ttwid(ttwid) + .msToken(msToken) + .acNonce(__ac_nonce) + .realRoomId(realRoomId) + .aid(aid) + .userUniqueId(user_unique_id) + .jsonObjectMap(map) + .roomStatus(DouyinRoomStatusEnum.getByCode(roomStatus)) + .build(); + } + + public static RoomInitResult roomInit(Object roomId) { + return roomInit(roomId, null); + } + + /** + * 计算抖音直播间收到礼物的个数 + * + * @param msg KuaishouGiftMsg + * @return 礼物个数 + */ + public static int calculateGiftCount(DouyinGiftMsg msg) { + if (msg == null || msg.getMsg() == null) { + return 0; + } + + long giftCount; + DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg douyinWebcastGiftMessageMsg = msg.getMsg(); + if (douyinWebcastGiftMessageMsg.getGift().getCombo() && douyinWebcastGiftMessageMsg.getRepeatEnd() != 1) {// 连击中 + return 0; + } + long comboCount = douyinWebcastGiftMessageMsg.getComboCount(); + if (douyinWebcastGiftMessageMsg.getGroupCount() != 1L) {// 每点击一次送礼的数量不是1时 + comboCount = douyinWebcastGiftMessageMsg.getGroupCount() * comboCount; + } + giftCount = comboCount; + msg.setCalculatedGiftCount((int) giftCount); + return (int) giftCount; + } + + public static String getBogus(String url,String respData,String userAgent) { + String a_bogus=""; + Context context = Context.newBuilder("js").allowAllAccess(true).build(); + try { + File jsFile = new File("D:\\workspace\\ordinaryroad-live-chat-client\\live-chat-client-codec\\live-chat-client-codec-douyin\\src\\main\\resources\\a-bogus.js"); + String jsCode = new String(Files.readAllBytes(jsFile.toPath())); + Source source = Source.newBuilder("js", jsCode, "a-bogus1.js").build(); + context.eval(source); + // 获取 JavaScript 中导出的函数 + Value bindings = context.getBindings("js"); + Value getBogusFunction = bindings.getMember("getABogus"); + Value result = getBogusFunction.execute(url,respData,userAgent); + System.out.println("Result from get_bogus: " + result.asString()); + a_bogus=result.asString(); + } catch (IOException e) { + e.printStackTrace(); + } + return a_bogus; + } + + @SneakyThrows + public static JsonNode sendComment(String cookie, Object roomId,Object realRoomId,String aid, SendCommentRequest request) { + request.setContent(!StringUtil.isNullOrEmpty(request.getContent())?URLEncoder.encode(request.getContent(), "UTF-8"):""); + Map cookieMap = OrLiveChatCookieUtil.parseCookieString(cookie); + String msToken = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_MS_TOKEN, () -> RandomUtil.randomString(MS_TOKEN_BASE_STRING, MS_TOKEN_LENGTH)); + String url="https://live.douyin.com/webcast/room/chat/?aid="+aid+"&app_name=douyin_web&live_id=1&device_platform=web&language=zh-CN&enter_from=web_homepage_follow&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=123.0.0.0&room_id="+realRoomId+"&content="+request.getContent()+"&type=0&msToken="+msToken+"&msToken="+msToken; + String path=url+"&"+A_BOGUS+"="+getBogus(url,"",USER_AGENT); + @Cleanup + HttpResponse response = createGetRequest(path, cookie) + .header(Header.REFERER, "https://live.douyin.com/" + roomId) + .header(Header.ACCEPT,"application/json, text/plain, */*") + .header(Header.USER_AGENT,USER_AGENT) + .execute(); + System.out.println(response.body()); + return responseInterceptor(response.body()); + } + public static HttpRequest createGetRequest(String url, String cookie) { + return createRequest(Method.GET, url, cookie); + } + public static HttpRequest createRequest(Method method, String url, String cookie) { + return OrLiveChatHttpUtil.createRequest(method, url) + .cookie(cookie) + .header(Header.HOST, URLUtil.url(url).getHost()) + .header(Header.USER_AGENT, USER_AGENT); + } + + private static JsonNode responseInterceptor(String responseString) { + try { + JsonNode jsonNode = OrJacksonUtil.getInstance().readTree(responseString); + if (jsonNode.has("status_code")) { + int result = jsonNode.get("status_code").asInt(); + if (result != 0) { + String message = ""; + switch (result) { + case 2: { + message = "请求过快,请稍后重试"; + break; + } + case 400002: { + message = "需要进行验证"; + break; + } + default: { + message = ""; + } + } + throwExceptionWithTip("接口访问失败:" + message + ",返回结果:" + jsonNode); + } + } + return jsonNode; + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + private static void throwExceptionWithTip(String message) { + throw new BaseException("『可能已触发滑块验证,建议配置Cookie或打开浏览器进行滑块验证后重试』" + message); + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class SendCommentRequest { + private String liveStreamId; + private String content; + private String color; + } + + @Getter + @Setter + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class RoomInitResult { + private String ttwid; + private String aid; + private String msToken; + private String acNonce; + private long realRoomId; + private String userUniqueId; + private DouyinRoomStatusEnum roomStatus; + private Map jsonObjectMap; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/MediaCrawler.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/MediaCrawler.java new file mode 100644 index 0000000..09a03cc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/MediaCrawler.java @@ -0,0 +1,75 @@ +package tech.ordinaryroad.live.chat.client.codec.douyin.api; +import org.apache.hc.core5.http.ParseException; +import org.graalvm.polyglot.Context; +import org.graalvm.polyglot.Value; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.core5.http.io.entity.EntityUtils; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.Map; + +public class MediaCrawler { + private static String loadJavaScript(String path) throws IOException { + return new String(Files.readAllBytes(Paths.get(path))); + } + + private static Context initJsContext(String jsCode) { + Context context = Context.newBuilder("js").allowAllAccess(true).build(); + context.eval("js", jsCode); + return context; + } + + public static void main(String[] args) throws IOException { + // Load and initialize JavaScript context + String jsCode = loadJavaScript("D:\\workspace\\ordinaryroad-live-chat-client\\live-chat-client-codec\\live-chat-client-codec-douyin\\src\\main\\resources\\a-bogus1.js"); + Context context = initJsContext(jsCode); + + // Define headers and cookies + String cookies = "ttwid=1%7CU6YHr6wKj_WHHXYfelzk5jc7uAg-yN0k2k4yTm1Uo-s%7C1704965821%7Cf48a7874351c69357f4f5f531416c9ad43385f9059fe7c57a5bbb9732b5f5add; store-region-src=uid; live_use_vvc=%22false%22; xgplayer_user_id=657157399276; passport_csrf_token=8be74ec699ab18095dca4f5702e616f9; passport_csrf_token_default=8be74ec699ab18095dca4f5702e616f9; bd_ticket_guard_client_web_domain=2; _bd_ticket_crypt_doamin=2; __security_server_data_status=1; my_rd=2; publish_badge_show_info=%220%2C0%2C0%2C1715773185377%22; FORCE_LOGIN=%7B%22videoConsumedRemainSeconds%22%3A180%2C%22isForcePopClose%22%3A1%7D; SEARCH_RESULT_LIST_TYPE=%22single%22; download_guide=%222%2F20240516%2F0%22; passport_assist_user=CjwjtEjeQtOp4Cv_wosZ7DtwEtUwHH_jeTuTFOAtl41NpaLgvp2vuqX2CWO8YRW4bl6ZpT1kW82jgLbqhEwaSgo8h_8os20HEgPmVLztaUEVY3DIXJl6lwetx9-JB8jtD-t7ahjgNTdRxNvpnIDNT25jXl2fvzM2MCy1iZRYENq10Q0Yia_WVCABIgEDb4YVGQ%3D%3D; n_mh=q7yfwiSq87rdYvSKcxHn_fwIoPyQ2pa_2oa26gtgGnE; sso_uid_tt=d83cddbc4b03a4e3071260ecfaa00567; sso_uid_tt_ss=d83cddbc4b03a4e3071260ecfaa00567; toutiao_sso_user=7e856d5dcbe9b55fbfea27ab9abfa141; toutiao_sso_user_ss=7e856d5dcbe9b55fbfea27ab9abfa141; sid_ucp_sso_v1=1.0.0-KDY5YTIyNTlkMTk5MGQ5ZDEyZGZmMjc1NGVlMWVjNDVkNWEwNGI0MjgKHQjAnsTM_AEQpJmWsgYY7zEgDDCioaDNBTgGQPQHGgJscSIgN2U4NTZkNWRjYmU5YjU1ZmJmZWEyN2FiOWFiZmExNDE; ssid_ucp_sso_v1=1.0.0-KDY5YTIyNTlkMTk5MGQ5ZDEyZGZmMjc1NGVlMWVjNDVkNWEwNGI0MjgKHQjAnsTM_AEQpJmWsgYY7zEgDDCioaDNBTgGQPQHGgJscSIgN2U4NTZkNWRjYmU5YjU1ZmJmZWEyN2FiOWFiZmExNDE; passport_auth_status=fba0b2a35313b10a9e2e6c5d8f4d0f5f%2Cf3f2fbe505be6e05bcbc18118e5eb692; passport_auth_status_ss=fba0b2a35313b10a9e2e6c5d8f4d0f5f%2Cf3f2fbe505be6e05bcbc18118e5eb692; uid_tt=fc7b8cb7c4319654ef8da389ae142402; uid_tt_ss=fc7b8cb7c4319654ef8da389ae142402; sid_tt=8001e5f3e7a8f1222572de448a3bcc44; sessionid=8001e5f3e7a8f1222572de448a3bcc44; sessionid_ss=8001e5f3e7a8f1222572de448a3bcc44; _bd_ticket_crypt_cookie=f2e36f6fdf947c3c48887c1df24b34a5; sid_guard=8001e5f3e7a8f1222572de448a3bcc44%7C1715834032%7C5183991%7CMon%2C+15-Jul-2024+04%3A33%3A43+GMT; sid_ucp_v1=1.0.0-KDc0MjFmYzUzMzM1ZThkNjhmY2U2MGRhZDMxNGRkM2NiM2ZiZTA1MzcKGQjAnsTM_AEQsJmWsgYY7zEgDDgGQPQHSAQaAmxxIiA4MDAxZTVmM2U3YThmMTIyMjU3MmRlNDQ4YTNiY2M0NA; ssid_ucp_v1=1.0.0-KDc0MjFmYzUzMzM1ZThkNjhmY2U2MGRhZDMxNGRkM2NiM2ZiZTA1MzcKGQjAnsTM_AEQsJmWsgYY7zEgDDgGQPQHSAQaAmxxIiA4MDAxZTVmM2U3YThmMTIyMjU3MmRlNDQ4YTNiY2M0NA; LOGIN_STATUS=1; pwa2=%220%7C0%7C3%7C0%22; volume_info=%7B%22isUserMute%22%3Atrue%2C%22isMute%22%3Atrue%2C%22volume%22%3A0.298%7D; WallpaperGuide=%7B%22showTime%22%3A1715773828584%2C%22closeTime%22%3A0%2C%22showCount%22%3A1%2C%22cursor1%22%3A44%2C%22cursor2%22%3A0%7D; __live_version__=%221.1.2.226%22; strategyABtestKey=%221715909224.526%22; store-region=cn-sx; has_avx2=null; device_web_cpu_core=12; device_web_memory_size=8; csrf_session_id=c0e8a5e872a6f46fc9f680d648d0506c; webcast_leading_last_show_time=1715909236351; webcast_leading_total_show_times=1; passport_fe_beating_status=true; stream_recommend_feed_params=%22%7B%5C%22cookie_enabled%5C%22%3Atrue%2C%5C%22screen_width%5C%22%3A1920%2C%5C%22screen_height%5C%22%3A1080%2C%5C%22browser_online%5C%22%3Atrue%2C%5C%22cpu_core_num%5C%22%3A12%2C%5C%22device_memory%5C%22%3A8%2C%5C%22downlink%5C%22%3A1.45%2C%5C%22effective_type%5C%22%3A%5C%223g%5C%22%2C%5C%22round_trip_time%5C%22%3A800%7D%22; FOLLOW_LIVE_POINT_INFO=%22MS4wLjABAAAAiiu56eDUtaMvfNC6hdKR27mQJqv4XdECCRf2z1SZ5a4%2F1715961600000%2F0%2F0%2F1715916967891%22; FOLLOW_NUMBER_YELLOW_POINT_INFO=%22MS4wLjABAAAAiiu56eDUtaMvfNC6hdKR27mQJqv4XdECCRf2z1SZ5a4%2F1715961600000%2F0%2F1715916367891%2F0%22; stream_player_status_params=%22%7B%5C%22is_auto_play%5C%22%3A0%2C%5C%22is_full_screen%5C%22%3A0%2C%5C%22is_full_webscreen%5C%22%3A0%2C%5C%22is_mute%5C%22%3A1%2C%5C%22is_speed%5C%22%3A1%2C%5C%22is_visible%5C%22%3A1%7D%22; home_can_add_dy_2_desktop=%221%22; __ac_nonce=06646d246006dcf6c24ef; __ac_signature=_02B4Z6wo00f010SjtrgAAIDCToVtEfb9Gp9Eg7IAALd530; xg_device_score=6.706596267646972; live_can_add_dy_2_desktop=%221%22; bd_ticket_guard_client_data=eyJiZC10aWNrZXQtZ3VhcmQtdmVyc2lvbiI6MiwiYmQtdGlja2V0LWd1YXJkLWl0ZXJhdGlvbi12ZXJzaW9uIjoxLCJiZC10aWNrZXQtZ3VhcmQtcmVlLXB1YmxpYy1rZXkiOiJCR1NCbXBuQWhMRFg3TERDUVZqZnRDSHJXa1FTNzZNR1ZPcDI4YXB1WmhTd3B0YnArM1NKRCt1b2lZTFFacENDS2JaMEZkaFZUcEtyei9sU0ZzNTlWNUk9IiwiYmQtdGlja2V0LWd1YXJkLXdlYi12ZXJzaW9uIjoxfQ%3D%3D; odin_tt=2443abfcc082b15ffd770a6f1de88eb3f89f73b386c1f73db07f46169555362a27d2456d45c785f73ccf9e0febe854f5; IsDouyinActive=true; msToken=eNlm7XjhUwl8_RFbbjc9iObiL2XV3cvGjD5d4h7zaK-EBGJptp4MdunpwYHdxwkt8Wfp7_ZF9JAFmu_axosLiN00ohMSxWfHklvDGIHv09PTPNZ6pDTBCLGCKg2o"; + + Map headers = new HashMap<>(); + headers.put("accept", "application/json, text/plain, */*"); + headers.put("accept-language", "zh-CN,zh;q=0.9"); + headers.put("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36\n" + + "Easter egg\n" + + "There's an Easter egg somewhere in DevTools, behind a colorful \uD83D\uDCAB emoji. Can you find it?\n" + + "Emulate a focused page in Elements > Styles\n" + + "The Elements > Styles tab gets an option to emulate a focused page under the element state (:hov) toggle.\n" + + "Lighthouse\n" + + "The Lighthouse panel now runs Lighthouse 11.5.0 with a new audit that estimates root causes for layout shifts."); + + String url = "https://live.douyin.com/webcast/ranklist/audience/"; + String query = "aid=6383&app_name=douyin_web&live_id=1&device_platform=web&language=zh-CN&enter_from=page_refresh&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=123.0.0.0&webcast_sdk_version=2450&room_id=7369814552730651432&anchor_id=103738238270&sec_anchor_id=MS4wLjABAAAAUnCoOCj5YJGvnWGL52RpDyLgb1CBI5JCbDfi68AKXEw&rank_type=30&msToken=g8BFTC18zsgtCCloEcatR_Fa1NQEjtxyrUAwmhPYAt0DnixdEDqlUpWC0DPHubeDT5PiGb4wDvZytI9d7kVi0_kwx1aublpMQoGy_pJsDe5r9bGV9b8yc2mYIO6i"; + + // Generate the `a_bogus` parameter using the JavaScript context + Value generateABogusFunction = context.getBindings("js").getMember("generate_a_bogus"); + String aBogus = generateABogusFunction.execute(query, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36").asString(); + + // Add the `a_bogus` parameter to the query + query += "&a_bogus=" + aBogus; + System.out.println("a_bogus:"+aBogus); + // Make HTTP GET request + try (CloseableHttpClient httpClient = HttpClients.createDefault()) { + HttpGet request = new HttpGet(url + "?" + query); + + // Add headers to the request + headers.forEach(request::addHeader); + + // Add cookies to the request + request.addHeader("Cookie", cookies); + + try (CloseableHttpResponse response = httpClient.execute(request)) { + String responseBody = EntityUtils.toString(response.getEntity()); + System.out.println(responseBody); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/VehicleRecognition.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/VehicleRecognition.java new file mode 100644 index 0000000..f71cc39 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/VehicleRecognition.java @@ -0,0 +1,62 @@ +package tech.ordinaryroad.live.chat.client.codec.douyin.api; + +import cn.hutool.json.JSONObject; +import edu.stanford.nlp.ling.CoreLabel; +import edu.stanford.nlp.ling.Word; +import edu.stanford.nlp.pipeline.CoreDocument; +import edu.stanford.nlp.pipeline.StanfordCoreNLP; +import edu.stanford.nlp.process.PTBTokenizer; +import edu.stanford.nlp.process.Tokenizer; +import edu.stanford.nlp.process.TokenizerFactory; + +import java.io.StringReader; +import java.util.*; + +/** + * @Title: + * @Description: + * @Author 郭向斌 + * @Date 2024-05-22 14:19 + * @Version V1.0 + */ +public class VehicleRecognition { + public static void main(String[] args) { + // 设置StanfordCoreNLP的属性 + Properties props = new Properties(); + props.setProperty("annotators", "tokenize"); + StanfordCoreNLP pipeline = new StanfordCoreNLP(props); + // 输入文本 + String text = "海鸥有没有优惠"; + + // 创建CoreDocument + CoreDocument document = new CoreDocument(text); + + // 运行所有的注释器 + pipeline.annotate(document); + List jsonObjects = DouyinApis.initialScript("D:\\工作\\抖音AI\\车型库1214.xlsx"); + System.out.println(jsonObjects); + // 自定义车辆品牌和车系的关键词 + List brands=new ArrayList<>(); + List models=new ArrayList<>(); + for(JSONObject jsonObject:jsonObjects){ + brands.add(jsonObject.getStr("品牌名称")); + models.add(jsonObject.getStr("车系名称")); + } + Set vehicleBrands = new HashSet<>(brands); + Set vehicleModels = new HashSet<>(models); + TokenizerFactory factory = PTBTokenizer.factory(); + factory.setOptions("invertible=true"); + Tokenizer tokenizer = factory.getTokenizer(new StringReader(text)); +// 遍历分词结果并输出 + List vehicleMentions = new ArrayList<>(); + List tokens = tokenizer.tokenize(); + for (Word token : tokens) { + String word = token.word(); + if (vehicleBrands.contains(word) || vehicleModels.contains(word)) { + vehicleMentions.add(word); + } + } + // 输出结果 + System.out.println("Vehicle Mentions: " + vehicleMentions); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinCmdEnum.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinCmdEnum.java new file mode 100644 index 0000000..9c5c223 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinCmdEnum.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.constant; + +import cn.hutool.core.util.StrUtil; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Getter +@RequiredArgsConstructor +public enum DouyinCmdEnum { + + /** + * 弹幕 + */ + WebcastChatMessage, + /** + * 礼物 + */ + WebcastGiftMessage, + /** + * 点赞 + */ + WebcastLikeMessage, + /** + * 入房 + */ + WebcastMemberMessage, + /** + * 房间信息 + */ + WebcastRoomStatsMessage, + /** + * 关注{@link tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg#getAction()}=1、分享{@link tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg#getAction()}=3 + */ + WebcastSocialMessage, + WebcastRoomUserSeqMessage, + /** + * 粉丝团 + */ + WebcastFansclubMessage, + /** + * 直播状态变化 + */ + WebcastControlMessage, + ; + + public static DouyinCmdEnum getByName(String name) { + if (StrUtil.isBlank(name)) { + return null; + } + + for (DouyinCmdEnum value : values()) { + if (value.name().equals(name)) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinPayloadTypeEnum.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinPayloadTypeEnum.java new file mode 100644 index 0000000..04a3507 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinPayloadTypeEnum.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.constant; + +import cn.hutool.core.util.StrUtil; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2024/3/10 + */ +@Getter +@RequiredArgsConstructor +public enum DouyinPayloadTypeEnum { + + /** + * 心跳、心跳回复 + */ + HB("hb"), + + /** + * 消息 + */ + MSG("msg"), + + ACK("ack"), + ; + + private final String code; + + public static DouyinPayloadTypeEnum getByCode(String code) { + if (StrUtil.isBlank(code)) { + return null; + } + for (DouyinPayloadTypeEnum value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinRoomStatusEnum.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinRoomStatusEnum.java new file mode 100644 index 0000000..9a8a596 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/constant/DouyinRoomStatusEnum.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2024/3/10 + */ +@Getter +@RequiredArgsConstructor +public enum DouyinRoomStatusEnum { + + /** + * 未开播 + */ + STOPPED(4), + + /** + * 直播中 + */ + LIVING(2), + ; + + private final int code; + + public static DouyinRoomStatusEnum getByCode(int code) { + for (DouyinRoomStatusEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinCmdMsg.java new file mode 100644 index 0000000..07db1f7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinCmdMsg.java @@ -0,0 +1,68 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass; + +/** + * @author mjz + * @date 2024/4/26 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinCmdMsg implements IDouyinCmdMsg { + + private DouyinCmdMsgOuterClass.DouyinCmdMsg msg; + + @Override + public String getCmd() { + if (msg == null) { + return null; + } + return msg.getMethod(); + } + + @Override + public void setCmd(String cmd) { + // ignore + // method_ = cmd; + } + + @Override + public DouyinCmdEnum getCmdEnum() { + if (msg == null) { + return null; + } + return DouyinCmdEnum.getByName(msg.getMethod()); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinControlMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinControlMsg.java new file mode 100644 index 0000000..ed1cc8f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinControlMsg.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.constant.LiveStatusAction; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILiveStatusChangeMsg; + +/** + * @author mjz + * @date 2024/3/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinControlMsg implements IDouyinMsg, ILiveStatusChangeMsg { + + private DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg msg; + + @Override + public LiveStatusAction getLiveStatusAction() { + if (msg.getStatus() == 3) { + return LiveStatusAction.END; + } + return null; + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinDanmuMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinDanmuMsg.java new file mode 100644 index 0000000..3357862 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinDanmuMsg.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinDanmuMsg implements IDouyinMsg, IDanmuMsg { + + private DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg msg; + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } + + @Override + public String getContent() { + return msg.getContent(); + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinEnterRoomMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinEnterRoomMsg.java new file mode 100644 index 0000000..b81ea2f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinEnterRoomMsg.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinEnterRoomMsg implements IDouyinMsg, IEnterRoomMsg { + + private DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg msg; + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinGiftMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinGiftMsg.java new file mode 100644 index 0000000..2c7f377 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinGiftMsg.java @@ -0,0 +1,120 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinGiftMsg implements IDouyinMsg, IGiftMsg { + + private DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg msg; + /** + * 计算后得到的礼物个数 + */ + private int calculatedGiftCount; + + public DouyinGiftMsg(DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg msg) { + this.msg = msg; + } + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } + + @Override + public String getGiftName() { + return msg.getGift().getName(); + } + + @Override + public String getGiftImg() { + return CollUtil.getFirst(msg.getGift().getImage().getUrlListListList()); + } + + @Override + public String getGiftId() { + return Long.toString(msg.getLongGiftId()); + } + + @Override + public int getGiftCount() { + return this.calculatedGiftCount; + } + + @Override + public int getGiftPrice() { + return msg.getGift().getDiamondCount(); + } + + @Override + public String getReceiveUid() { + return Long.toString(msg.getToUser().getId()); + } + + @Override + public String getReceiveUsername() { + return msg.getToUser().getNickname(); + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinLikeMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinLikeMsg.java new file mode 100644 index 0000000..7f45c7d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinLikeMsg.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILikeMsg; + +/** + * @author mjz + * @date 2024/1/31 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinLikeMsg implements IDouyinMsg, ILikeMsg { + + private DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg msg; + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } + + @Override + public int getClickCount() { + return (int) msg.getCount(); + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinMsg.java new file mode 100644 index 0000000..7e4f4e5 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinMsg.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass; + +/** + * @author mjz + * @date 2024/4/26 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinMsg implements IDouyinMsg { + + private DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame msg; + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinRoomStatsMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinRoomStatsMsg.java new file mode 100644 index 0000000..66c708b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinRoomStatsMsg.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import cn.hutool.core.util.NumberUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IRoomStatsMsg; + +/** + * @author mjz + * @date 2024/3/28 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinRoomStatsMsg implements IDouyinMsg, IRoomStatsMsg { + + /** + * 保存{@link tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg#getTotal()} + */ + private String likedCount; + + private DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg msg; + + @Override + public String getLikedCount() { + return this.likedCount; + } + + @Override + public String getWatchingCount() { + if (msg != null) { + return NumberUtil.toStr(msg.getTotal()); + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinSocialMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinSocialMsg.java new file mode 100644 index 0000000..a884106 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/DouyinSocialMsg.java @@ -0,0 +1,61 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass; + +/** + * @author mjz + * @date 2024/3/28 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinSocialMsg implements IDouyinCmdMsg { + + private DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg msg; + + @Override + public String getCmd() { + return getCmdEnum().name(); + } + + @Override + public void setCmd(String cmd) { + // ignore + } + + @Override + public DouyinCmdEnum getCmdEnum() { + return DouyinCmdEnum.WebcastSocialMessage; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/base/IDouyinCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/base/IDouyinCmdMsg.java new file mode 100644 index 0000000..0793bed --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/base/IDouyinCmdMsg.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg.base; + +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinCmdMsg extends IDouyinMsg, ICmdMsg { +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/base/IDouyinMsg.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/base/IDouyinMsg.java new file mode 100644 index 0000000..59de3c5 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/msg/base/IDouyinMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyin.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinMsg extends IMsg { +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinCmdMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinCmdMsgOuterClass.java new file mode 100644 index 0000000..9bb93e0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinCmdMsgOuterClass.java @@ -0,0 +1,1215 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinCmdMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinCmdMsgOuterClass { + private DouyinCmdMsgOuterClass() {} + 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 DouyinCmdMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * string method = 1; + * @return The method. + */ + java.lang.String getMethod(); + /** + * string method = 1; + * @return The bytes for method. + */ + com.google.protobuf.ByteString + getMethodBytes(); + + /** + * bytes payload = 2; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + + /** + * int64 msg_id = 3; + * @return The msgId. + */ + long getMsgId(); + + /** + * int32 msg_type = 4; + * @return The msgType. + */ + int getMsgType(); + + /** + * int64 offset = 5; + * @return The offset. + */ + long getOffset(); + + /** + * bool need_wrds_store = 6; + * @return The needWrdsStore. + */ + boolean getNeedWrdsStore(); + + /** + * int64 wrds_version = 7; + * @return The wrdsVersion. + */ + long getWrdsVersion(); + + /** + * string wrds_sub_key = 8; + * @return The wrdsSubKey. + */ + java.lang.String getWrdsSubKey(); + /** + * string wrds_sub_key = 8; + * @return The bytes for wrdsSubKey. + */ + com.google.protobuf.ByteString + getWrdsSubKeyBytes(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg} + */ + public static final class DouyinCmdMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg) + DouyinCmdMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinCmdMsg.newBuilder() to construct. + private DouyinCmdMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinCmdMsg() { + method_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + wrdsSubKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinCmdMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder.class); + } + + public static final int METHOD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object method_ = ""; + /** + * string method = 1; + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } + } + /** + * string method = 1; + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 2; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + public static final int MSG_ID_FIELD_NUMBER = 3; + private long msgId_ = 0L; + /** + * int64 msg_id = 3; + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + + public static final int MSG_TYPE_FIELD_NUMBER = 4; + private int msgType_ = 0; + /** + * int32 msg_type = 4; + * @return The msgType. + */ + @java.lang.Override + public int getMsgType() { + return msgType_; + } + + public static final int OFFSET_FIELD_NUMBER = 5; + private long offset_ = 0L; + /** + * int64 offset = 5; + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + public static final int NEED_WRDS_STORE_FIELD_NUMBER = 6; + private boolean needWrdsStore_ = false; + /** + * bool need_wrds_store = 6; + * @return The needWrdsStore. + */ + @java.lang.Override + public boolean getNeedWrdsStore() { + return needWrdsStore_; + } + + public static final int WRDS_VERSION_FIELD_NUMBER = 7; + private long wrdsVersion_ = 0L; + /** + * int64 wrds_version = 7; + * @return The wrdsVersion. + */ + @java.lang.Override + public long getWrdsVersion() { + return wrdsVersion_; + } + + public static final int WRDS_SUB_KEY_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object wrdsSubKey_ = ""; + /** + * string wrds_sub_key = 8; + * @return The wrdsSubKey. + */ + @java.lang.Override + public java.lang.String getWrdsSubKey() { + java.lang.Object ref = wrdsSubKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wrdsSubKey_ = s; + return s; + } + } + /** + * string wrds_sub_key = 8; + * @return The bytes for wrdsSubKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWrdsSubKeyBytes() { + java.lang.Object ref = wrdsSubKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wrdsSubKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, method_); + } + if (!payload_.isEmpty()) { + output.writeBytes(2, payload_); + } + if (msgId_ != 0L) { + output.writeInt64(3, msgId_); + } + if (msgType_ != 0) { + output.writeInt32(4, msgType_); + } + if (offset_ != 0L) { + output.writeInt64(5, offset_); + } + if (needWrdsStore_ != false) { + output.writeBool(6, needWrdsStore_); + } + if (wrdsVersion_ != 0L) { + output.writeInt64(7, wrdsVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wrdsSubKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, wrdsSubKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, method_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, payload_); + } + if (msgId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, msgId_); + } + if (msgType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, msgType_); + } + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, offset_); + } + if (needWrdsStore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, needWrdsStore_); + } + if (wrdsVersion_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, wrdsVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wrdsSubKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, wrdsSubKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg) obj; + + if (!getMethod() + .equals(other.getMethod())) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (getMsgId() + != other.getMsgId()) return false; + if (getMsgType() + != other.getMsgType()) return false; + if (getOffset() + != other.getOffset()) return false; + if (getNeedWrdsStore() + != other.getNeedWrdsStore()) return false; + if (getWrdsVersion() + != other.getWrdsVersion()) return false; + if (!getWrdsSubKey() + .equals(other.getWrdsSubKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMsgId()); + hash = (37 * hash) + MSG_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMsgType(); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOffset()); + hash = (37 * hash) + NEED_WRDS_STORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedWrdsStore()); + hash = (37 * hash) + WRDS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWrdsVersion()); + hash = (37 * hash) + WRDS_SUB_KEY_FIELD_NUMBER; + hash = (53 * hash) + getWrdsSubKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + method_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + msgId_ = 0L; + msgType_ = 0; + offset_ = 0L; + needWrdsStore_ = false; + wrdsVersion_ = 0L; + wrdsSubKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payload_ = payload_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.msgType_ = msgType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.offset_ = offset_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.needWrdsStore_ = needWrdsStore_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.wrdsVersion_ = wrdsVersion_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.wrdsSubKey_ = wrdsSubKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.getDefaultInstance()) return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + if (other.getMsgId() != 0L) { + setMsgId(other.getMsgId()); + } + if (other.getMsgType() != 0) { + setMsgType(other.getMsgType()); + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + if (other.getNeedWrdsStore() != false) { + setNeedWrdsStore(other.getNeedWrdsStore()); + } + if (other.getWrdsVersion() != 0L) { + setWrdsVersion(other.getWrdsVersion()); + } + if (!other.getWrdsSubKey().isEmpty()) { + wrdsSubKey_ = other.wrdsSubKey_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + method_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + msgId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + msgType_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + offset_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + needWrdsStore_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + wrdsVersion_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + wrdsSubKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object method_ = ""; + /** + * string method = 1; + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string method = 1; + * @return The bytes for method. + */ + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string method = 1; + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string method = 1; + * @return This builder for chaining. + */ + public Builder clearMethod() { + method_ = getDefaultInstance().getMethod(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string method = 1; + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 2; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * bytes payload = 2; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bytes payload = 2; + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000002); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + private long msgId_ ; + /** + * int64 msg_id = 3; + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + /** + * int64 msg_id = 3; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId(long value) { + + msgId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 msg_id = 3; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + bitField0_ = (bitField0_ & ~0x00000004); + msgId_ = 0L; + onChanged(); + return this; + } + + private int msgType_ ; + /** + * int32 msg_type = 4; + * @return The msgType. + */ + @java.lang.Override + public int getMsgType() { + return msgType_; + } + /** + * int32 msg_type = 4; + * @param value The msgType to set. + * @return This builder for chaining. + */ + public Builder setMsgType(int value) { + + msgType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 msg_type = 4; + * @return This builder for chaining. + */ + public Builder clearMsgType() { + bitField0_ = (bitField0_ & ~0x00000008); + msgType_ = 0; + onChanged(); + return this; + } + + private long offset_ ; + /** + * int64 offset = 5; + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + /** + * int64 offset = 5; + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int64 offset = 5; + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000010); + offset_ = 0L; + onChanged(); + return this; + } + + private boolean needWrdsStore_ ; + /** + * bool need_wrds_store = 6; + * @return The needWrdsStore. + */ + @java.lang.Override + public boolean getNeedWrdsStore() { + return needWrdsStore_; + } + /** + * bool need_wrds_store = 6; + * @param value The needWrdsStore to set. + * @return This builder for chaining. + */ + public Builder setNeedWrdsStore(boolean value) { + + needWrdsStore_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bool need_wrds_store = 6; + * @return This builder for chaining. + */ + public Builder clearNeedWrdsStore() { + bitField0_ = (bitField0_ & ~0x00000020); + needWrdsStore_ = false; + onChanged(); + return this; + } + + private long wrdsVersion_ ; + /** + * int64 wrds_version = 7; + * @return The wrdsVersion. + */ + @java.lang.Override + public long getWrdsVersion() { + return wrdsVersion_; + } + /** + * int64 wrds_version = 7; + * @param value The wrdsVersion to set. + * @return This builder for chaining. + */ + public Builder setWrdsVersion(long value) { + + wrdsVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int64 wrds_version = 7; + * @return This builder for chaining. + */ + public Builder clearWrdsVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + wrdsVersion_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object wrdsSubKey_ = ""; + /** + * string wrds_sub_key = 8; + * @return The wrdsSubKey. + */ + public java.lang.String getWrdsSubKey() { + java.lang.Object ref = wrdsSubKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wrdsSubKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string wrds_sub_key = 8; + * @return The bytes for wrdsSubKey. + */ + public com.google.protobuf.ByteString + getWrdsSubKeyBytes() { + java.lang.Object ref = wrdsSubKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wrdsSubKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string wrds_sub_key = 8; + * @param value The wrdsSubKey to set. + * @return This builder for chaining. + */ + public Builder setWrdsSubKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + wrdsSubKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * string wrds_sub_key = 8; + * @return This builder for chaining. + */ + public Builder clearWrdsSubKey() { + wrdsSubKey_ = getDefaultInstance().getWrdsSubKey(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * string wrds_sub_key = 8; + * @param value The bytes for wrdsSubKey to set. + * @return This builder for chaining. + */ + public Builder setWrdsSubKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + wrdsSubKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinCmdMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_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\022DouyinCmdMsg.proto\0222tech.ordinaryroad." + + "live.chat.client.douyin.protobuf\"\246\001\n\014Dou" + + "yinCmdMsg\022\016\n\006method\030\001 \001(\t\022\017\n\007payload\030\002 \001" + + "(\014\022\016\n\006msg_id\030\003 \001(\003\022\020\n\010msg_type\030\004 \001(\005\022\016\n\006" + + "offset\030\005 \001(\003\022\027\n\017need_wrds_store\030\006 \001(\010\022\024\n" + + "\014wrds_version\030\007 \001(\003\022\024\n\014wrds_sub_key\030\010 \001(" + + "\tB:\n8tech.ordinaryroad.live.chat.client." + + "codec.douyin.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinCmdMsg_descriptor, + new java.lang.String[] { "Method", "Payload", "MsgId", "MsgType", "Offset", "NeedWrdsStore", "WrdsVersion", "WrdsSubKey", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastChatMessageMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastChatMessageMsgOuterClass.java new file mode 100644 index 0000000..113cd4d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastChatMessageMsgOuterClass.java @@ -0,0 +1,2667 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebcastChatMessageMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebcastChatMessageMsgOuterClass { + private DouyinWebcastChatMessageMsgOuterClass() {} + 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 DouyinWebcastChatMessageMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastChatMessageMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * .Common common = 1; + * @return The common. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * .Common common = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * .User user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .User user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * .User user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * string content = 3; + * @return The content. + */ + java.lang.String getContent(); + /** + * string content = 3; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * bool visible_to_sender = 4; + * @return The visibleToSender. + */ + boolean getVisibleToSender(); + + /** + * .Image background_image = 5; + * @return Whether the backgroundImage field is set. + */ + boolean hasBackgroundImage(); + /** + * .Image background_image = 5; + * @return The backgroundImage. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage(); + /** + * .Image background_image = 5; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder(); + + /** + * string full_screen_text_color = 6; + * @return The fullScreenTextColor. + */ + java.lang.String getFullScreenTextColor(); + /** + * string full_screen_text_color = 6; + * @return The bytes for fullScreenTextColor. + */ + com.google.protobuf.ByteString + getFullScreenTextColorBytes(); + + /** + * .Image background_image_v2 = 7; + * @return Whether the backgroundImageV2 field is set. + */ + boolean hasBackgroundImageV2(); + /** + * .Image background_image_v2 = 7; + * @return The backgroundImageV2. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2(); + /** + * .Image background_image_v2 = 7; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder(); + + /** + *
+     * PublicAreaCommon public_area_common = 9;
+     * 
+ * + * .Image gift_image = 10; + * @return Whether the giftImage field is set. + */ + boolean hasGiftImage(); + /** + *
+     * PublicAreaCommon public_area_common = 9;
+     * 
+ * + * .Image gift_image = 10; + * @return The giftImage. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getGiftImage(); + /** + *
+     * PublicAreaCommon public_area_common = 9;
+     * 
+ * + * .Image gift_image = 10; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftImageOrBuilder(); + + /** + * uint64 agree_msg_id = 11; + * @return The agreeMsgId. + */ + long getAgreeMsgId(); + + /** + * uint32 priority_level = 12; + * @return The priorityLevel. + */ + int getPriorityLevel(); + + /** + *
+     * LandscapeAreaCommon landscape_area_common = 13;
+     * 
+ * + * uint64 event_time = 15; + * @return The eventTime. + */ + long getEventTime(); + + /** + * bool send_review = 16; + * @return The sendReview. + */ + boolean getSendReview(); + + /** + * bool from_intercom = 17; + * @return The fromIntercom. + */ + boolean getFromIntercom(); + + /** + * bool intercom_hide_user_card = 18; + * @return The intercomHideUserCard. + */ + boolean getIntercomHideUserCard(); + + /** + *
+     * repeated string chatTagsList = 19;
+     * 
+ * + * string chat_by = 20; + * @return The chatBy. + */ + java.lang.String getChatBy(); + /** + *
+     * repeated string chatTagsList = 19;
+     * 
+ * + * string chat_by = 20; + * @return The bytes for chatBy. + */ + com.google.protobuf.ByteString + getChatByBytes(); + + /** + *
+     * Text rtf_content = 22 ;
+     * 
+ * + * uint32 individual_chat_priority = 21; + * @return The individualChatPriority. + */ + int getIndividualChatPriority(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastChatMessageMsg} + */ + public static final class DouyinWebcastChatMessageMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastChatMessageMsg) + DouyinWebcastChatMessageMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebcastChatMessageMsg.newBuilder() to construct. + private DouyinWebcastChatMessageMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebcastChatMessageMsg() { + content_ = ""; + fullScreenTextColor_ = ""; + chatBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebcastChatMessageMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.Builder.class); + } + + private int bitField0_; + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * .Common common = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * .User user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * .User user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int CONTENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * string content = 3; + * @return The content. + */ + @java.lang.Override + 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 = 3; + * @return The bytes for content. + */ + @java.lang.Override + 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 VISIBLE_TO_SENDER_FIELD_NUMBER = 4; + private boolean visibleToSender_ = false; + /** + * bool visible_to_sender = 4; + * @return The visibleToSender. + */ + @java.lang.Override + public boolean getVisibleToSender() { + return visibleToSender_; + } + + public static final int BACKGROUND_IMAGE_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + /** + * .Image background_image = 5; + * @return Whether the backgroundImage field is set. + */ + @java.lang.Override + public boolean hasBackgroundImage() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .Image background_image = 5; + * @return The backgroundImage. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + /** + * .Image background_image = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + + public static final int FULL_SCREEN_TEXT_COLOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object fullScreenTextColor_ = ""; + /** + * string full_screen_text_color = 6; + * @return The fullScreenTextColor. + */ + @java.lang.Override + public java.lang.String getFullScreenTextColor() { + java.lang.Object ref = fullScreenTextColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullScreenTextColor_ = s; + return s; + } + } + /** + * string full_screen_text_color = 6; + * @return The bytes for fullScreenTextColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullScreenTextColorBytes() { + java.lang.Object ref = fullScreenTextColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullScreenTextColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKGROUND_IMAGE_V2_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + /** + * .Image background_image_v2 = 7; + * @return Whether the backgroundImageV2 field is set. + */ + @java.lang.Override + public boolean hasBackgroundImageV2() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .Image background_image_v2 = 7; + * @return The backgroundImageV2. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + /** + * .Image background_image_v2 = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + + public static final int GIFT_IMAGE_FIELD_NUMBER = 10; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image giftImage_; + /** + *
+     * PublicAreaCommon public_area_common = 9;
+     * 
+ * + * .Image gift_image = 10; + * @return Whether the giftImage field is set. + */ + @java.lang.Override + public boolean hasGiftImage() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * PublicAreaCommon public_area_common = 9;
+     * 
+ * + * .Image gift_image = 10; + * @return The giftImage. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getGiftImage() { + return giftImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } + /** + *
+     * PublicAreaCommon public_area_common = 9;
+     * 
+ * + * .Image gift_image = 10; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftImageOrBuilder() { + return giftImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } + + public static final int AGREE_MSG_ID_FIELD_NUMBER = 11; + private long agreeMsgId_ = 0L; + /** + * uint64 agree_msg_id = 11; + * @return The agreeMsgId. + */ + @java.lang.Override + public long getAgreeMsgId() { + return agreeMsgId_; + } + + public static final int PRIORITY_LEVEL_FIELD_NUMBER = 12; + private int priorityLevel_ = 0; + /** + * uint32 priority_level = 12; + * @return The priorityLevel. + */ + @java.lang.Override + public int getPriorityLevel() { + return priorityLevel_; + } + + public static final int EVENT_TIME_FIELD_NUMBER = 15; + private long eventTime_ = 0L; + /** + *
+     * LandscapeAreaCommon landscape_area_common = 13;
+     * 
+ * + * uint64 event_time = 15; + * @return The eventTime. + */ + @java.lang.Override + public long getEventTime() { + return eventTime_; + } + + public static final int SEND_REVIEW_FIELD_NUMBER = 16; + private boolean sendReview_ = false; + /** + * bool send_review = 16; + * @return The sendReview. + */ + @java.lang.Override + public boolean getSendReview() { + return sendReview_; + } + + public static final int FROM_INTERCOM_FIELD_NUMBER = 17; + private boolean fromIntercom_ = false; + /** + * bool from_intercom = 17; + * @return The fromIntercom. + */ + @java.lang.Override + public boolean getFromIntercom() { + return fromIntercom_; + } + + public static final int INTERCOM_HIDE_USER_CARD_FIELD_NUMBER = 18; + private boolean intercomHideUserCard_ = false; + /** + * bool intercom_hide_user_card = 18; + * @return The intercomHideUserCard. + */ + @java.lang.Override + public boolean getIntercomHideUserCard() { + return intercomHideUserCard_; + } + + public static final int CHAT_BY_FIELD_NUMBER = 20; + @SuppressWarnings("serial") + private volatile java.lang.Object chatBy_ = ""; + /** + *
+     * repeated string chatTagsList = 19;
+     * 
+ * + * string chat_by = 20; + * @return The chatBy. + */ + @java.lang.Override + public java.lang.String getChatBy() { + java.lang.Object ref = chatBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chatBy_ = s; + return s; + } + } + /** + *
+     * repeated string chatTagsList = 19;
+     * 
+ * + * string chat_by = 20; + * @return The bytes for chatBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChatByBytes() { + java.lang.Object ref = chatBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + chatBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDIVIDUAL_CHAT_PRIORITY_FIELD_NUMBER = 21; + private int individualChatPriority_ = 0; + /** + *
+     * Text rtf_content = 22 ;
+     * 
+ * + * uint32 individual_chat_priority = 21; + * @return The individualChatPriority. + */ + @java.lang.Override + public int getIndividualChatPriority() { + return individualChatPriority_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); + } + if (visibleToSender_ != false) { + output.writeBool(4, visibleToSender_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getBackgroundImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullScreenTextColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, fullScreenTextColor_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getBackgroundImageV2()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(10, getGiftImage()); + } + if (agreeMsgId_ != 0L) { + output.writeUInt64(11, agreeMsgId_); + } + if (priorityLevel_ != 0) { + output.writeUInt32(12, priorityLevel_); + } + if (eventTime_ != 0L) { + output.writeUInt64(15, eventTime_); + } + if (sendReview_ != false) { + output.writeBool(16, sendReview_); + } + if (fromIntercom_ != false) { + output.writeBool(17, fromIntercom_); + } + if (intercomHideUserCard_ != false) { + output.writeBool(18, intercomHideUserCard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(chatBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, chatBy_); + } + if (individualChatPriority_ != 0) { + output.writeUInt32(21, individualChatPriority_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); + } + if (visibleToSender_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, visibleToSender_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getBackgroundImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullScreenTextColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, fullScreenTextColor_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getBackgroundImageV2()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getGiftImage()); + } + if (agreeMsgId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, agreeMsgId_); + } + if (priorityLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, priorityLevel_); + } + if (eventTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(15, eventTime_); + } + if (sendReview_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, sendReview_); + } + if (fromIntercom_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, fromIntercom_); + } + if (intercomHideUserCard_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(18, intercomHideUserCard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(chatBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, chatBy_); + } + if (individualChatPriority_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(21, individualChatPriority_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getContent() + .equals(other.getContent())) return false; + if (getVisibleToSender() + != other.getVisibleToSender()) return false; + if (hasBackgroundImage() != other.hasBackgroundImage()) return false; + if (hasBackgroundImage()) { + if (!getBackgroundImage() + .equals(other.getBackgroundImage())) return false; + } + if (!getFullScreenTextColor() + .equals(other.getFullScreenTextColor())) return false; + if (hasBackgroundImageV2() != other.hasBackgroundImageV2()) return false; + if (hasBackgroundImageV2()) { + if (!getBackgroundImageV2() + .equals(other.getBackgroundImageV2())) return false; + } + if (hasGiftImage() != other.hasGiftImage()) return false; + if (hasGiftImage()) { + if (!getGiftImage() + .equals(other.getGiftImage())) return false; + } + if (getAgreeMsgId() + != other.getAgreeMsgId()) return false; + if (getPriorityLevel() + != other.getPriorityLevel()) return false; + if (getEventTime() + != other.getEventTime()) return false; + if (getSendReview() + != other.getSendReview()) return false; + if (getFromIntercom() + != other.getFromIntercom()) return false; + if (getIntercomHideUserCard() + != other.getIntercomHideUserCard()) return false; + if (!getChatBy() + .equals(other.getChatBy())) return false; + if (getIndividualChatPriority() + != other.getIndividualChatPriority()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + VISIBLE_TO_SENDER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVisibleToSender()); + if (hasBackgroundImage()) { + hash = (37 * hash) + BACKGROUND_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImage().hashCode(); + } + hash = (37 * hash) + FULL_SCREEN_TEXT_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getFullScreenTextColor().hashCode(); + if (hasBackgroundImageV2()) { + hash = (37 * hash) + BACKGROUND_IMAGE_V2_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImageV2().hashCode(); + } + if (hasGiftImage()) { + hash = (37 * hash) + GIFT_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getGiftImage().hashCode(); + } + hash = (37 * hash) + AGREE_MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAgreeMsgId()); + hash = (37 * hash) + PRIORITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getPriorityLevel(); + hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEventTime()); + hash = (37 * hash) + SEND_REVIEW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSendReview()); + hash = (37 * hash) + FROM_INTERCOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFromIntercom()); + hash = (37 * hash) + INTERCOM_HIDE_USER_CARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIntercomHideUserCard()); + hash = (37 * hash) + CHAT_BY_FIELD_NUMBER; + hash = (53 * hash) + getChatBy().hashCode(); + hash = (37 * hash) + INDIVIDUAL_CHAT_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getIndividualChatPriority(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastChatMessageMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastChatMessageMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCommonFieldBuilder(); + getUserFieldBuilder(); + getBackgroundImageFieldBuilder(); + getBackgroundImageV2FieldBuilder(); + getGiftImageFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + content_ = ""; + visibleToSender_ = false; + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + fullScreenTextColor_ = ""; + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + giftImage_ = null; + if (giftImageBuilder_ != null) { + giftImageBuilder_.dispose(); + giftImageBuilder_ = null; + } + agreeMsgId_ = 0L; + priorityLevel_ = 0; + eventTime_ = 0L; + sendReview_ = false; + fromIntercom_ = false; + intercomHideUserCard_ = false; + chatBy_ = ""; + individualChatPriority_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.visibleToSender_ = visibleToSender_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.backgroundImage_ = backgroundImageBuilder_ == null + ? backgroundImage_ + : backgroundImageBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fullScreenTextColor_ = fullScreenTextColor_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.backgroundImageV2_ = backgroundImageV2Builder_ == null + ? backgroundImageV2_ + : backgroundImageV2Builder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.giftImage_ = giftImageBuilder_ == null + ? giftImage_ + : giftImageBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.agreeMsgId_ = agreeMsgId_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.priorityLevel_ = priorityLevel_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.eventTime_ = eventTime_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.sendReview_ = sendReview_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.fromIntercom_ = fromIntercom_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.intercomHideUserCard_ = intercomHideUserCard_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.chatBy_ = chatBy_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.individualChatPriority_ = individualChatPriority_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getVisibleToSender() != false) { + setVisibleToSender(other.getVisibleToSender()); + } + if (other.hasBackgroundImage()) { + mergeBackgroundImage(other.getBackgroundImage()); + } + if (!other.getFullScreenTextColor().isEmpty()) { + fullScreenTextColor_ = other.fullScreenTextColor_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasBackgroundImageV2()) { + mergeBackgroundImageV2(other.getBackgroundImageV2()); + } + if (other.hasGiftImage()) { + mergeGiftImage(other.getGiftImage()); + } + if (other.getAgreeMsgId() != 0L) { + setAgreeMsgId(other.getAgreeMsgId()); + } + if (other.getPriorityLevel() != 0) { + setPriorityLevel(other.getPriorityLevel()); + } + if (other.getEventTime() != 0L) { + setEventTime(other.getEventTime()); + } + if (other.getSendReview() != false) { + setSendReview(other.getSendReview()); + } + if (other.getFromIntercom() != false) { + setFromIntercom(other.getFromIntercom()); + } + if (other.getIntercomHideUserCard() != false) { + setIntercomHideUserCard(other.getIntercomHideUserCard()); + } + if (!other.getChatBy().isEmpty()) { + chatBy_ = other.chatBy_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.getIndividualChatPriority() != 0) { + setIndividualChatPriority(other.getIndividualChatPriority()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + visibleToSender_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getBackgroundImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + fullScreenTextColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getBackgroundImageV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 82: { + input.readMessage( + getGiftImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 88: { + agreeMsgId_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 88 + case 96: { + priorityLevel_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 96 + case 120: { + eventTime_ = input.readUInt64(); + bitField0_ |= 0x00000400; + break; + } // case 120 + case 128: { + sendReview_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 128 + case 136: { + fromIntercom_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 136 + case 144: { + intercomHideUserCard_ = input.readBool(); + bitField0_ |= 0x00002000; + break; + } // case 144 + case 162: { + chatBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 162 + case 168: { + individualChatPriority_ = input.readUInt32(); + bitField0_ |= 0x00008000; + break; + } // case 168 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * .Common common = 1; + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + if (common_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Common common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * .Common common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * .User user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .User user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .User user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .User user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * .User user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object content_ = ""; + /** + * string content = 3; + * @return The content. + */ + 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 = 3; + * @return The bytes for content. + */ + 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 = 3; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string content = 3; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string content = 3; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean visibleToSender_ ; + /** + * bool visible_to_sender = 4; + * @return The visibleToSender. + */ + @java.lang.Override + public boolean getVisibleToSender() { + return visibleToSender_; + } + /** + * bool visible_to_sender = 4; + * @param value The visibleToSender to set. + * @return This builder for chaining. + */ + public Builder setVisibleToSender(boolean value) { + + visibleToSender_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool visible_to_sender = 4; + * @return This builder for chaining. + */ + public Builder clearVisibleToSender() { + bitField0_ = (bitField0_ & ~0x00000008); + visibleToSender_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageBuilder_; + /** + * .Image background_image = 5; + * @return Whether the backgroundImage field is set. + */ + public boolean hasBackgroundImage() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .Image background_image = 5; + * @return The backgroundImage. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + if (backgroundImageBuilder_ == null) { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } else { + return backgroundImageBuilder_.getMessage(); + } + } + /** + * .Image background_image = 5; + */ + public Builder setBackgroundImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImage_ = value; + } else { + backgroundImageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .Image background_image = 5; + */ + public Builder setBackgroundImage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageBuilder_ == null) { + backgroundImage_ = builderForValue.build(); + } else { + backgroundImageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .Image background_image = 5; + */ + public Builder mergeBackgroundImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + backgroundImage_ != null && + backgroundImage_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageBuilder().mergeFrom(value); + } else { + backgroundImage_ = value; + } + } else { + backgroundImageBuilder_.mergeFrom(value); + } + if (backgroundImage_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .Image background_image = 5; + */ + public Builder clearBackgroundImage() { + bitField0_ = (bitField0_ & ~0x00000010); + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image background_image = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBackgroundImageFieldBuilder().getBuilder(); + } + /** + * .Image background_image = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + if (backgroundImageBuilder_ != null) { + return backgroundImageBuilder_.getMessageOrBuilder(); + } else { + return backgroundImage_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + } + /** + * .Image background_image = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageFieldBuilder() { + if (backgroundImageBuilder_ == null) { + backgroundImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImage(), + getParentForChildren(), + isClean()); + backgroundImage_ = null; + } + return backgroundImageBuilder_; + } + + private java.lang.Object fullScreenTextColor_ = ""; + /** + * string full_screen_text_color = 6; + * @return The fullScreenTextColor. + */ + public java.lang.String getFullScreenTextColor() { + java.lang.Object ref = fullScreenTextColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullScreenTextColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string full_screen_text_color = 6; + * @return The bytes for fullScreenTextColor. + */ + public com.google.protobuf.ByteString + getFullScreenTextColorBytes() { + java.lang.Object ref = fullScreenTextColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullScreenTextColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string full_screen_text_color = 6; + * @param value The fullScreenTextColor to set. + * @return This builder for chaining. + */ + public Builder setFullScreenTextColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fullScreenTextColor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string full_screen_text_color = 6; + * @return This builder for chaining. + */ + public Builder clearFullScreenTextColor() { + fullScreenTextColor_ = getDefaultInstance().getFullScreenTextColor(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string full_screen_text_color = 6; + * @param value The bytes for fullScreenTextColor to set. + * @return This builder for chaining. + */ + public Builder setFullScreenTextColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fullScreenTextColor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageV2Builder_; + /** + * .Image background_image_v2 = 7; + * @return Whether the backgroundImageV2 field is set. + */ + public boolean hasBackgroundImageV2() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .Image background_image_v2 = 7; + * @return The backgroundImageV2. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + if (backgroundImageV2Builder_ == null) { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } else { + return backgroundImageV2Builder_.getMessage(); + } + } + /** + * .Image background_image_v2 = 7; + */ + public Builder setBackgroundImageV2(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImageV2_ = value; + } else { + backgroundImageV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .Image background_image_v2 = 7; + */ + public Builder setBackgroundImageV2( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2_ = builderForValue.build(); + } else { + backgroundImageV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .Image background_image_v2 = 7; + */ + public Builder mergeBackgroundImageV2(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + backgroundImageV2_ != null && + backgroundImageV2_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageV2Builder().mergeFrom(value); + } else { + backgroundImageV2_ = value; + } + } else { + backgroundImageV2Builder_.mergeFrom(value); + } + if (backgroundImageV2_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * .Image background_image_v2 = 7; + */ + public Builder clearBackgroundImageV2() { + bitField0_ = (bitField0_ & ~0x00000040); + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * .Image background_image_v2 = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageV2Builder() { + bitField0_ |= 0x00000040; + onChanged(); + return getBackgroundImageV2FieldBuilder().getBuilder(); + } + /** + * .Image background_image_v2 = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + if (backgroundImageV2Builder_ != null) { + return backgroundImageV2Builder_.getMessageOrBuilder(); + } else { + return backgroundImageV2_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + } + /** + * .Image background_image_v2 = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageV2FieldBuilder() { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImageV2(), + getParentForChildren(), + isClean()); + backgroundImageV2_ = null; + } + return backgroundImageV2Builder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image giftImage_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> giftImageBuilder_; + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + * @return Whether the giftImage field is set. + */ + public boolean hasGiftImage() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + * @return The giftImage. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getGiftImage() { + if (giftImageBuilder_ == null) { + return giftImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } else { + return giftImageBuilder_.getMessage(); + } + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + */ + public Builder setGiftImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + giftImage_ = value; + } else { + giftImageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + */ + public Builder setGiftImage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (giftImageBuilder_ == null) { + giftImage_ = builderForValue.build(); + } else { + giftImageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + */ + public Builder mergeGiftImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftImageBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + giftImage_ != null && + giftImage_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getGiftImageBuilder().mergeFrom(value); + } else { + giftImage_ = value; + } + } else { + giftImageBuilder_.mergeFrom(value); + } + if (giftImage_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + */ + public Builder clearGiftImage() { + bitField0_ = (bitField0_ & ~0x00000080); + giftImage_ = null; + if (giftImageBuilder_ != null) { + giftImageBuilder_.dispose(); + giftImageBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getGiftImageBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getGiftImageFieldBuilder().getBuilder(); + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftImageOrBuilder() { + if (giftImageBuilder_ != null) { + return giftImageBuilder_.getMessageOrBuilder(); + } else { + return giftImage_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } + } + /** + *
+       * PublicAreaCommon public_area_common = 9;
+       * 
+ * + * .Image gift_image = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getGiftImageFieldBuilder() { + if (giftImageBuilder_ == null) { + giftImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getGiftImage(), + getParentForChildren(), + isClean()); + giftImage_ = null; + } + return giftImageBuilder_; + } + + private long agreeMsgId_ ; + /** + * uint64 agree_msg_id = 11; + * @return The agreeMsgId. + */ + @java.lang.Override + public long getAgreeMsgId() { + return agreeMsgId_; + } + /** + * uint64 agree_msg_id = 11; + * @param value The agreeMsgId to set. + * @return This builder for chaining. + */ + public Builder setAgreeMsgId(long value) { + + agreeMsgId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * uint64 agree_msg_id = 11; + * @return This builder for chaining. + */ + public Builder clearAgreeMsgId() { + bitField0_ = (bitField0_ & ~0x00000100); + agreeMsgId_ = 0L; + onChanged(); + return this; + } + + private int priorityLevel_ ; + /** + * uint32 priority_level = 12; + * @return The priorityLevel. + */ + @java.lang.Override + public int getPriorityLevel() { + return priorityLevel_; + } + /** + * uint32 priority_level = 12; + * @param value The priorityLevel to set. + * @return This builder for chaining. + */ + public Builder setPriorityLevel(int value) { + + priorityLevel_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * uint32 priority_level = 12; + * @return This builder for chaining. + */ + public Builder clearPriorityLevel() { + bitField0_ = (bitField0_ & ~0x00000200); + priorityLevel_ = 0; + onChanged(); + return this; + } + + private long eventTime_ ; + /** + *
+       * LandscapeAreaCommon landscape_area_common = 13;
+       * 
+ * + * uint64 event_time = 15; + * @return The eventTime. + */ + @java.lang.Override + public long getEventTime() { + return eventTime_; + } + /** + *
+       * LandscapeAreaCommon landscape_area_common = 13;
+       * 
+ * + * uint64 event_time = 15; + * @param value The eventTime to set. + * @return This builder for chaining. + */ + public Builder setEventTime(long value) { + + eventTime_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+       * LandscapeAreaCommon landscape_area_common = 13;
+       * 
+ * + * uint64 event_time = 15; + * @return This builder for chaining. + */ + public Builder clearEventTime() { + bitField0_ = (bitField0_ & ~0x00000400); + eventTime_ = 0L; + onChanged(); + return this; + } + + private boolean sendReview_ ; + /** + * bool send_review = 16; + * @return The sendReview. + */ + @java.lang.Override + public boolean getSendReview() { + return sendReview_; + } + /** + * bool send_review = 16; + * @param value The sendReview to set. + * @return This builder for chaining. + */ + public Builder setSendReview(boolean value) { + + sendReview_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * bool send_review = 16; + * @return This builder for chaining. + */ + public Builder clearSendReview() { + bitField0_ = (bitField0_ & ~0x00000800); + sendReview_ = false; + onChanged(); + return this; + } + + private boolean fromIntercom_ ; + /** + * bool from_intercom = 17; + * @return The fromIntercom. + */ + @java.lang.Override + public boolean getFromIntercom() { + return fromIntercom_; + } + /** + * bool from_intercom = 17; + * @param value The fromIntercom to set. + * @return This builder for chaining. + */ + public Builder setFromIntercom(boolean value) { + + fromIntercom_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * bool from_intercom = 17; + * @return This builder for chaining. + */ + public Builder clearFromIntercom() { + bitField0_ = (bitField0_ & ~0x00001000); + fromIntercom_ = false; + onChanged(); + return this; + } + + private boolean intercomHideUserCard_ ; + /** + * bool intercom_hide_user_card = 18; + * @return The intercomHideUserCard. + */ + @java.lang.Override + public boolean getIntercomHideUserCard() { + return intercomHideUserCard_; + } + /** + * bool intercom_hide_user_card = 18; + * @param value The intercomHideUserCard to set. + * @return This builder for chaining. + */ + public Builder setIntercomHideUserCard(boolean value) { + + intercomHideUserCard_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * bool intercom_hide_user_card = 18; + * @return This builder for chaining. + */ + public Builder clearIntercomHideUserCard() { + bitField0_ = (bitField0_ & ~0x00002000); + intercomHideUserCard_ = false; + onChanged(); + return this; + } + + private java.lang.Object chatBy_ = ""; + /** + *
+       * repeated string chatTagsList = 19;
+       * 
+ * + * string chat_by = 20; + * @return The chatBy. + */ + public java.lang.String getChatBy() { + java.lang.Object ref = chatBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chatBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * repeated string chatTagsList = 19;
+       * 
+ * + * string chat_by = 20; + * @return The bytes for chatBy. + */ + public com.google.protobuf.ByteString + getChatByBytes() { + java.lang.Object ref = chatBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + chatBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * repeated string chatTagsList = 19;
+       * 
+ * + * string chat_by = 20; + * @param value The chatBy to set. + * @return This builder for chaining. + */ + public Builder setChatBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + chatBy_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+       * repeated string chatTagsList = 19;
+       * 
+ * + * string chat_by = 20; + * @return This builder for chaining. + */ + public Builder clearChatBy() { + chatBy_ = getDefaultInstance().getChatBy(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + *
+       * repeated string chatTagsList = 19;
+       * 
+ * + * string chat_by = 20; + * @param value The bytes for chatBy to set. + * @return This builder for chaining. + */ + public Builder setChatByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + chatBy_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private int individualChatPriority_ ; + /** + *
+       * Text rtf_content = 22 ;
+       * 
+ * + * uint32 individual_chat_priority = 21; + * @return The individualChatPriority. + */ + @java.lang.Override + public int getIndividualChatPriority() { + return individualChatPriority_; + } + /** + *
+       * Text rtf_content = 22 ;
+       * 
+ * + * uint32 individual_chat_priority = 21; + * @param value The individualChatPriority to set. + * @return This builder for chaining. + */ + public Builder setIndividualChatPriority(int value) { + + individualChatPriority_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+       * Text rtf_content = 22 ;
+       * 
+ * + * uint32 individual_chat_priority = 21; + * @return This builder for chaining. + */ + public Builder clearIndividualChatPriority() { + bitField0_ = (bitField0_ & ~0x00008000); + individualChatPriority_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastChatMessageMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastChatMessageMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebcastChatMessageMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_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!DouyinWebcastChatMessageMsg.proto\0222tec" + + "h.ordinaryroad.live.chat.client.douyin.p" + + "rotobuf\032\014Common.proto\032\nUser.proto\032\013Image" + + ".proto\"\274\003\n\033DouyinWebcastChatMessageMsg\022\027" + + "\n\006common\030\001 \001(\0132\007.Common\022\023\n\004user\030\002 \001(\0132\005." + + "User\022\017\n\007content\030\003 \001(\t\022\031\n\021visible_to_send" + + "er\030\004 \001(\010\022 \n\020background_image\030\005 \001(\0132\006.Ima" + + "ge\022\036\n\026full_screen_text_color\030\006 \001(\t\022#\n\023ba" + + "ckground_image_v2\030\007 \001(\0132\006.Image\022\032\n\ngift_" + + "image\030\n \001(\0132\006.Image\022\024\n\014agree_msg_id\030\013 \001(" + + "\004\022\026\n\016priority_level\030\014 \001(\r\022\022\n\nevent_time\030" + + "\017 \001(\004\022\023\n\013send_review\030\020 \001(\010\022\025\n\rfrom_inter" + + "com\030\021 \001(\010\022\037\n\027intercom_hide_user_card\030\022 \001" + + "(\010\022\017\n\007chat_by\030\024 \001(\t\022 \n\030individual_chat_p" + + "riority\030\025 \001(\rB:\n8tech.ordinaryroad.live." + + "chat.client.codec.douyin.protobufb\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastChatMessageMsg_descriptor, + new java.lang.String[] { "Common", "User", "Content", "VisibleToSender", "BackgroundImage", "FullScreenTextColor", "BackgroundImageV2", "GiftImage", "AgreeMsgId", "PriorityLevel", "EventTime", "SendReview", "FromIntercom", "IntercomHideUserCard", "ChatBy", "IndividualChatPriority", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastControlMessageMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastControlMessageMsgOuterClass.java new file mode 100644 index 0000000..6983ffd --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastControlMessageMsgOuterClass.java @@ -0,0 +1,763 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebcastControlMessageMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebcastControlMessageMsgOuterClass { + private DouyinWebcastControlMessageMsgOuterClass() {} + 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 DouyinWebcastControlMessageMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastControlMessageMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * .Common common = 1; + * @return The common. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * .Common common = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * int32 status = 2; + * @return The status. + */ + int getStatus(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastControlMessageMsg} + */ + public static final class DouyinWebcastControlMessageMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastControlMessageMsg) + DouyinWebcastControlMessageMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebcastControlMessageMsg.newBuilder() to construct. + private DouyinWebcastControlMessageMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebcastControlMessageMsg() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebcastControlMessageMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.Builder.class); + } + + private int bitField0_; + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * .Common common = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int STATUS_FIELD_NUMBER = 2; + private int status_ = 0; + /** + * int32 status = 2; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommon()); + } + if (status_ != 0) { + output.writeInt32(2, status_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, status_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (getStatus() + != other.getStatus()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastControlMessageMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastControlMessageMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCommonFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + status_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.status_ = status_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + status_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * .Common common = 1; + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + if (common_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Common common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * .Common common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private int status_ ; + /** + * int32 status = 2; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + /** + * int32 status = 2; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(int value) { + + status_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 status = 2; + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + status_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastControlMessageMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastControlMessageMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebcastControlMessageMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_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$DouyinWebcastControlMessageMsg.proto\0222" + + "tech.ordinaryroad.live.chat.client.douyi" + + "n.protobuf\032\014Common.proto\"I\n\036DouyinWebcas" + + "tControlMessageMsg\022\027\n\006common\030\001 \001(\0132\007.Com" + + "mon\022\016\n\006status\030\002 \001(\005B:\n8tech.ordinaryroad" + + ".live.chat.client.codec.douyin.protobufb" + + "\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastControlMessageMsg_descriptor, + new java.lang.String[] { "Common", "Status", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastGiftMessageMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastGiftMessageMsgOuterClass.java new file mode 100644 index 0000000..b702d38 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastGiftMessageMsgOuterClass.java @@ -0,0 +1,4415 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebcastGiftMessageMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebcastGiftMessageMsgOuterClass { + private DouyinWebcastGiftMessageMsgOuterClass() {} + 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 DouyinWebcastGiftMessageMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastGiftMessageMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * .Common common = 1; + * @return The common. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * .Common common = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * uint64 long_gift_id = 2; + * @return The longGiftId. + */ + long getLongGiftId(); + + /** + * uint64 fan_ticket_count = 3; + * @return The fanTicketCount. + */ + long getFanTicketCount(); + + /** + * uint64 group_count = 4; + * @return The groupCount. + */ + long getGroupCount(); + + /** + * uint64 repeat_count = 5; + * @return The repeatCount. + */ + long getRepeatCount(); + + /** + * uint64 combo_count = 6; + * @return The comboCount. + */ + long getComboCount(); + + /** + * .User user = 7; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .User user = 7; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * .User user = 7; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * .User to_user = 8; + * @return Whether the toUser field is set. + */ + boolean hasToUser(); + /** + * .User to_user = 8; + * @return The toUser. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getToUser(); + /** + * .User to_user = 8; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getToUserOrBuilder(); + + /** + * uint32 repeat_end = 9; + * @return The repeatEnd. + */ + int getRepeatEnd(); + + /** + * .TextEffect text_effect = 10; + * @return Whether the textEffect field is set. + */ + boolean hasTextEffect(); + /** + * .TextEffect text_effect = 10; + * @return The textEffect. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getTextEffect(); + /** + * .TextEffect text_effect = 10; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder getTextEffectOrBuilder(); + + /** + * uint64 group_id = 11; + * @return The groupId. + */ + long getGroupId(); + + /** + * uint64 income_taskgifts = 12; + * @return The incomeTaskgifts. + */ + long getIncomeTaskgifts(); + + /** + * uint64 room_fan_ticket_count = 13; + * @return The roomFanTicketCount. + */ + long getRoomFanTicketCount(); + + /** + * .GiftIMPriority priority = 14; + * @return Whether the priority field is set. + */ + boolean hasPriority(); + /** + * .GiftIMPriority priority = 14; + * @return The priority. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getPriority(); + /** + * .GiftIMPriority priority = 14; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder getPriorityOrBuilder(); + + /** + * .GiftStruct gift = 15; + * @return Whether the gift field is set. + */ + boolean hasGift(); + /** + * .GiftStruct gift = 15; + * @return The gift. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getGift(); + /** + * .GiftStruct gift = 15; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder getGiftOrBuilder(); + + /** + * string log_id = 16; + * @return The logId. + */ + java.lang.String getLogId(); + /** + * string log_id = 16; + * @return The bytes for logId. + */ + com.google.protobuf.ByteString + getLogIdBytes(); + + /** + * uint64 send_type = 17; + * @return The sendType. + */ + long getSendType(); + + /** + * .PublicAreaCommon public_area_common = 18; + * @return Whether the publicAreaCommon field is set. + */ + boolean hasPublicAreaCommon(); + /** + * .PublicAreaCommon public_area_common = 18; + * @return The publicAreaCommon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon(); + /** + * .PublicAreaCommon public_area_common = 18; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder(); + + /** + * .Text tray_display_text = 19; + * @return Whether the trayDisplayText field is set. + */ + boolean hasTrayDisplayText(); + /** + * .Text tray_display_text = 19; + * @return The trayDisplayText. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getTrayDisplayText(); + /** + * .Text tray_display_text = 19; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTrayDisplayTextOrBuilder(); + + /** + * uint64 banned_display_effects = 20; + * @return The bannedDisplayEffects. + */ + long getBannedDisplayEffects(); + + /** + *
+     * GiftTrayInfo trayInfo = 21;
+     * AssetEffectMixInfo assetEffectMixInfo = 22;
+     * 
+ * + * bool display_for_self = 25; + * @return The displayForSelf. + */ + boolean getDisplayForSelf(); + + /** + * string interact_gift_info = 26; + * @return The interactGiftInfo. + */ + java.lang.String getInteractGiftInfo(); + /** + * string interact_gift_info = 26; + * @return The bytes for interactGiftInfo. + */ + com.google.protobuf.ByteString + getInteractGiftInfoBytes(); + + /** + * string diy_item_info = 27; + * @return The diyItemInfo. + */ + java.lang.String getDiyItemInfo(); + /** + * string diy_item_info = 27; + * @return The bytes for diyItemInfo. + */ + com.google.protobuf.ByteString + getDiyItemInfoBytes(); + + /** + * repeated uint64 min_asset_set_list = 28; + * @return A list containing the minAssetSetList. + */ + java.util.List getMinAssetSetListList(); + /** + * repeated uint64 min_asset_set_list = 28; + * @return The count of minAssetSetList. + */ + int getMinAssetSetListCount(); + /** + * repeated uint64 min_asset_set_list = 28; + * @param index The index of the element to return. + * @return The minAssetSetList at the given index. + */ + long getMinAssetSetList(int index); + + /** + * uint64 total_count = 29; + * @return The totalCount. + */ + long getTotalCount(); + + /** + * uint32 client_gift_source = 30; + * @return The clientGiftSource. + */ + int getClientGiftSource(); + + /** + *
+     * AnchorGiftData anchorGift = 31;
+     * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @return A list containing the toUserIdsList. + */ + java.util.List getToUserIdsListList(); + /** + *
+     * AnchorGiftData anchorGift = 31;
+     * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @return The count of toUserIdsList. + */ + int getToUserIdsListCount(); + /** + *
+     * AnchorGiftData anchorGift = 31;
+     * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @param index The index of the element to return. + * @return The toUserIdsList at the given index. + */ + long getToUserIdsList(int index); + + /** + * uint64 send_timet = 33; + * @return The sendTimet. + */ + long getSendTimet(); + + /** + * uint64 force_display_effectst = 34; + * @return The forceDisplayEffectst. + */ + long getForceDisplayEffectst(); + + /** + * string trace_id = 35; + * @return The traceId. + */ + java.lang.String getTraceId(); + /** + * string trace_id = 35; + * @return The bytes for traceId. + */ + com.google.protobuf.ByteString + getTraceIdBytes(); + + /** + * uint64 effect_display_ts = 36; + * @return The effectDisplayTs. + */ + long getEffectDisplayTs(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastGiftMessageMsg} + */ + public static final class DouyinWebcastGiftMessageMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastGiftMessageMsg) + DouyinWebcastGiftMessageMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebcastGiftMessageMsg.newBuilder() to construct. + private DouyinWebcastGiftMessageMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebcastGiftMessageMsg() { + logId_ = ""; + interactGiftInfo_ = ""; + diyItemInfo_ = ""; + minAssetSetList_ = emptyLongList(); + toUserIdsList_ = emptyLongList(); + traceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebcastGiftMessageMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.Builder.class); + } + + private int bitField0_; + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * .Common common = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int LONG_GIFT_ID_FIELD_NUMBER = 2; + private long longGiftId_ = 0L; + /** + * uint64 long_gift_id = 2; + * @return The longGiftId. + */ + @java.lang.Override + public long getLongGiftId() { + return longGiftId_; + } + + public static final int FAN_TICKET_COUNT_FIELD_NUMBER = 3; + private long fanTicketCount_ = 0L; + /** + * uint64 fan_ticket_count = 3; + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + + public static final int GROUP_COUNT_FIELD_NUMBER = 4; + private long groupCount_ = 0L; + /** + * uint64 group_count = 4; + * @return The groupCount. + */ + @java.lang.Override + public long getGroupCount() { + return groupCount_; + } + + public static final int REPEAT_COUNT_FIELD_NUMBER = 5; + private long repeatCount_ = 0L; + /** + * uint64 repeat_count = 5; + * @return The repeatCount. + */ + @java.lang.Override + public long getRepeatCount() { + return repeatCount_; + } + + public static final int COMBO_COUNT_FIELD_NUMBER = 6; + private long comboCount_ = 0L; + /** + * uint64 combo_count = 6; + * @return The comboCount. + */ + @java.lang.Override + public long getComboCount() { + return comboCount_; + } + + public static final int USER_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * .User user = 7; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 7; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * .User user = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int TO_USER_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User toUser_; + /** + * .User to_user = 8; + * @return Whether the toUser field is set. + */ + @java.lang.Override + public boolean hasToUser() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .User to_user = 8; + * @return The toUser. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getToUser() { + return toUser_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } + /** + * .User to_user = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getToUserOrBuilder() { + return toUser_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } + + public static final int REPEAT_END_FIELD_NUMBER = 9; + private int repeatEnd_ = 0; + /** + * uint32 repeat_end = 9; + * @return The repeatEnd. + */ + @java.lang.Override + public int getRepeatEnd() { + return repeatEnd_; + } + + public static final int TEXT_EFFECT_FIELD_NUMBER = 10; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect textEffect_; + /** + * .TextEffect text_effect = 10; + * @return Whether the textEffect field is set. + */ + @java.lang.Override + public boolean hasTextEffect() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .TextEffect text_effect = 10; + * @return The textEffect. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getTextEffect() { + return textEffect_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } + /** + * .TextEffect text_effect = 10; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder getTextEffectOrBuilder() { + return textEffect_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } + + public static final int GROUP_ID_FIELD_NUMBER = 11; + private long groupId_ = 0L; + /** + * uint64 group_id = 11; + * @return The groupId. + */ + @java.lang.Override + public long getGroupId() { + return groupId_; + } + + public static final int INCOME_TASKGIFTS_FIELD_NUMBER = 12; + private long incomeTaskgifts_ = 0L; + /** + * uint64 income_taskgifts = 12; + * @return The incomeTaskgifts. + */ + @java.lang.Override + public long getIncomeTaskgifts() { + return incomeTaskgifts_; + } + + public static final int ROOM_FAN_TICKET_COUNT_FIELD_NUMBER = 13; + private long roomFanTicketCount_ = 0L; + /** + * uint64 room_fan_ticket_count = 13; + * @return The roomFanTicketCount. + */ + @java.lang.Override + public long getRoomFanTicketCount() { + return roomFanTicketCount_; + } + + public static final int PRIORITY_FIELD_NUMBER = 14; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority priority_; + /** + * .GiftIMPriority priority = 14; + * @return Whether the priority field is set. + */ + @java.lang.Override + public boolean hasPriority() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .GiftIMPriority priority = 14; + * @return The priority. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getPriority() { + return priority_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } + /** + * .GiftIMPriority priority = 14; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder getPriorityOrBuilder() { + return priority_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } + + public static final int GIFT_FIELD_NUMBER = 15; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct gift_; + /** + * .GiftStruct gift = 15; + * @return Whether the gift field is set. + */ + @java.lang.Override + public boolean hasGift() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .GiftStruct gift = 15; + * @return The gift. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getGift() { + return gift_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } + /** + * .GiftStruct gift = 15; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder getGiftOrBuilder() { + return gift_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } + + public static final int LOG_ID_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object logId_ = ""; + /** + * string log_id = 16; + * @return The logId. + */ + @java.lang.Override + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } + } + /** + * string log_id = 16; + * @return The bytes for logId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEND_TYPE_FIELD_NUMBER = 17; + private long sendType_ = 0L; + /** + * uint64 send_type = 17; + * @return The sendType. + */ + @java.lang.Override + public long getSendType() { + return sendType_; + } + + public static final int PUBLIC_AREA_COMMON_FIELD_NUMBER = 18; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon publicAreaCommon_; + /** + * .PublicAreaCommon public_area_common = 18; + * @return Whether the publicAreaCommon field is set. + */ + @java.lang.Override + public boolean hasPublicAreaCommon() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .PublicAreaCommon public_area_common = 18; + * @return The publicAreaCommon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon() { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder() { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + + public static final int TRAY_DISPLAY_TEXT_FIELD_NUMBER = 19; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text trayDisplayText_; + /** + * .Text tray_display_text = 19; + * @return Whether the trayDisplayText field is set. + */ + @java.lang.Override + public boolean hasTrayDisplayText() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .Text tray_display_text = 19; + * @return The trayDisplayText. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getTrayDisplayText() { + return trayDisplayText_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } + /** + * .Text tray_display_text = 19; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTrayDisplayTextOrBuilder() { + return trayDisplayText_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } + + public static final int BANNED_DISPLAY_EFFECTS_FIELD_NUMBER = 20; + private long bannedDisplayEffects_ = 0L; + /** + * uint64 banned_display_effects = 20; + * @return The bannedDisplayEffects. + */ + @java.lang.Override + public long getBannedDisplayEffects() { + return bannedDisplayEffects_; + } + + public static final int DISPLAY_FOR_SELF_FIELD_NUMBER = 25; + private boolean displayForSelf_ = false; + /** + *
+     * GiftTrayInfo trayInfo = 21;
+     * AssetEffectMixInfo assetEffectMixInfo = 22;
+     * 
+ * + * bool display_for_self = 25; + * @return The displayForSelf. + */ + @java.lang.Override + public boolean getDisplayForSelf() { + return displayForSelf_; + } + + public static final int INTERACT_GIFT_INFO_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private volatile java.lang.Object interactGiftInfo_ = ""; + /** + * string interact_gift_info = 26; + * @return The interactGiftInfo. + */ + @java.lang.Override + public java.lang.String getInteractGiftInfo() { + java.lang.Object ref = interactGiftInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interactGiftInfo_ = s; + return s; + } + } + /** + * string interact_gift_info = 26; + * @return The bytes for interactGiftInfo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInteractGiftInfoBytes() { + java.lang.Object ref = interactGiftInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + interactGiftInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIY_ITEM_INFO_FIELD_NUMBER = 27; + @SuppressWarnings("serial") + private volatile java.lang.Object diyItemInfo_ = ""; + /** + * string diy_item_info = 27; + * @return The diyItemInfo. + */ + @java.lang.Override + public java.lang.String getDiyItemInfo() { + java.lang.Object ref = diyItemInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diyItemInfo_ = s; + return s; + } + } + /** + * string diy_item_info = 27; + * @return The bytes for diyItemInfo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiyItemInfoBytes() { + java.lang.Object ref = diyItemInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diyItemInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIN_ASSET_SET_LIST_FIELD_NUMBER = 28; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList minAssetSetList_ = + emptyLongList(); + /** + * repeated uint64 min_asset_set_list = 28; + * @return A list containing the minAssetSetList. + */ + @java.lang.Override + public java.util.List + getMinAssetSetListList() { + return minAssetSetList_; + } + /** + * repeated uint64 min_asset_set_list = 28; + * @return The count of minAssetSetList. + */ + public int getMinAssetSetListCount() { + return minAssetSetList_.size(); + } + /** + * repeated uint64 min_asset_set_list = 28; + * @param index The index of the element to return. + * @return The minAssetSetList at the given index. + */ + public long getMinAssetSetList(int index) { + return minAssetSetList_.getLong(index); + } + private int minAssetSetListMemoizedSerializedSize = -1; + + public static final int TOTAL_COUNT_FIELD_NUMBER = 29; + private long totalCount_ = 0L; + /** + * uint64 total_count = 29; + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + + public static final int CLIENT_GIFT_SOURCE_FIELD_NUMBER = 30; + private int clientGiftSource_ = 0; + /** + * uint32 client_gift_source = 30; + * @return The clientGiftSource. + */ + @java.lang.Override + public int getClientGiftSource() { + return clientGiftSource_; + } + + public static final int TO_USER_IDS_LIST_FIELD_NUMBER = 32; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList toUserIdsList_ = + emptyLongList(); + /** + *
+     * AnchorGiftData anchorGift = 31;
+     * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @return A list containing the toUserIdsList. + */ + @java.lang.Override + public java.util.List + getToUserIdsListList() { + return toUserIdsList_; + } + /** + *
+     * AnchorGiftData anchorGift = 31;
+     * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @return The count of toUserIdsList. + */ + public int getToUserIdsListCount() { + return toUserIdsList_.size(); + } + /** + *
+     * AnchorGiftData anchorGift = 31;
+     * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @param index The index of the element to return. + * @return The toUserIdsList at the given index. + */ + public long getToUserIdsList(int index) { + return toUserIdsList_.getLong(index); + } + private int toUserIdsListMemoizedSerializedSize = -1; + + public static final int SEND_TIMET_FIELD_NUMBER = 33; + private long sendTimet_ = 0L; + /** + * uint64 send_timet = 33; + * @return The sendTimet. + */ + @java.lang.Override + public long getSendTimet() { + return sendTimet_; + } + + public static final int FORCE_DISPLAY_EFFECTST_FIELD_NUMBER = 34; + private long forceDisplayEffectst_ = 0L; + /** + * uint64 force_display_effectst = 34; + * @return The forceDisplayEffectst. + */ + @java.lang.Override + public long getForceDisplayEffectst() { + return forceDisplayEffectst_; + } + + public static final int TRACE_ID_FIELD_NUMBER = 35; + @SuppressWarnings("serial") + private volatile java.lang.Object traceId_ = ""; + /** + * string trace_id = 35; + * @return The traceId. + */ + @java.lang.Override + public java.lang.String getTraceId() { + java.lang.Object ref = traceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceId_ = s; + return s; + } + } + /** + * string trace_id = 35; + * @return The bytes for traceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTraceIdBytes() { + java.lang.Object ref = traceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + traceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EFFECT_DISPLAY_TS_FIELD_NUMBER = 36; + private long effectDisplayTs_ = 0L; + /** + * uint64 effect_display_ts = 36; + * @return The effectDisplayTs. + */ + @java.lang.Override + public long getEffectDisplayTs() { + return effectDisplayTs_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommon()); + } + if (longGiftId_ != 0L) { + output.writeUInt64(2, longGiftId_); + } + if (fanTicketCount_ != 0L) { + output.writeUInt64(3, fanTicketCount_); + } + if (groupCount_ != 0L) { + output.writeUInt64(4, groupCount_); + } + if (repeatCount_ != 0L) { + output.writeUInt64(5, repeatCount_); + } + if (comboCount_ != 0L) { + output.writeUInt64(6, comboCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUser()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getToUser()); + } + if (repeatEnd_ != 0) { + output.writeUInt32(9, repeatEnd_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getTextEffect()); + } + if (groupId_ != 0L) { + output.writeUInt64(11, groupId_); + } + if (incomeTaskgifts_ != 0L) { + output.writeUInt64(12, incomeTaskgifts_); + } + if (roomFanTicketCount_ != 0L) { + output.writeUInt64(13, roomFanTicketCount_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(14, getPriority()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(15, getGift()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, logId_); + } + if (sendType_ != 0L) { + output.writeUInt64(17, sendType_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(18, getPublicAreaCommon()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(19, getTrayDisplayText()); + } + if (bannedDisplayEffects_ != 0L) { + output.writeUInt64(20, bannedDisplayEffects_); + } + if (displayForSelf_ != false) { + output.writeBool(25, displayForSelf_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interactGiftInfo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, interactGiftInfo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diyItemInfo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 27, diyItemInfo_); + } + if (getMinAssetSetListList().size() > 0) { + output.writeUInt32NoTag(226); + output.writeUInt32NoTag(minAssetSetListMemoizedSerializedSize); + } + for (int i = 0; i < minAssetSetList_.size(); i++) { + output.writeUInt64NoTag(minAssetSetList_.getLong(i)); + } + if (totalCount_ != 0L) { + output.writeUInt64(29, totalCount_); + } + if (clientGiftSource_ != 0) { + output.writeUInt32(30, clientGiftSource_); + } + if (getToUserIdsListList().size() > 0) { + output.writeUInt32NoTag(258); + output.writeUInt32NoTag(toUserIdsListMemoizedSerializedSize); + } + for (int i = 0; i < toUserIdsList_.size(); i++) { + output.writeUInt64NoTag(toUserIdsList_.getLong(i)); + } + if (sendTimet_ != 0L) { + output.writeUInt64(33, sendTimet_); + } + if (forceDisplayEffectst_ != 0L) { + output.writeUInt64(34, forceDisplayEffectst_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 35, traceId_); + } + if (effectDisplayTs_ != 0L) { + output.writeUInt64(36, effectDisplayTs_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (longGiftId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, longGiftId_); + } + if (fanTicketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, fanTicketCount_); + } + if (groupCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, groupCount_); + } + if (repeatCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, repeatCount_); + } + if (comboCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(6, comboCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getUser()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getToUser()); + } + if (repeatEnd_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, repeatEnd_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getTextEffect()); + } + if (groupId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, groupId_); + } + if (incomeTaskgifts_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(12, incomeTaskgifts_); + } + if (roomFanTicketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(13, roomFanTicketCount_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getPriority()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getGift()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, logId_); + } + if (sendType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(17, sendType_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getPublicAreaCommon()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getTrayDisplayText()); + } + if (bannedDisplayEffects_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(20, bannedDisplayEffects_); + } + if (displayForSelf_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(25, displayForSelf_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interactGiftInfo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, interactGiftInfo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diyItemInfo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, diyItemInfo_); + } + { + int dataSize = 0; + for (int i = 0; i < minAssetSetList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(minAssetSetList_.getLong(i)); + } + size += dataSize; + if (!getMinAssetSetListList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + minAssetSetListMemoizedSerializedSize = dataSize; + } + if (totalCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(29, totalCount_); + } + if (clientGiftSource_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(30, clientGiftSource_); + } + { + int dataSize = 0; + for (int i = 0; i < toUserIdsList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(toUserIdsList_.getLong(i)); + } + size += dataSize; + if (!getToUserIdsListList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + toUserIdsListMemoizedSerializedSize = dataSize; + } + if (sendTimet_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(33, sendTimet_); + } + if (forceDisplayEffectst_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(34, forceDisplayEffectst_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(35, traceId_); + } + if (effectDisplayTs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(36, effectDisplayTs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (getLongGiftId() + != other.getLongGiftId()) return false; + if (getFanTicketCount() + != other.getFanTicketCount()) return false; + if (getGroupCount() + != other.getGroupCount()) return false; + if (getRepeatCount() + != other.getRepeatCount()) return false; + if (getComboCount() + != other.getComboCount()) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (hasToUser() != other.hasToUser()) return false; + if (hasToUser()) { + if (!getToUser() + .equals(other.getToUser())) return false; + } + if (getRepeatEnd() + != other.getRepeatEnd()) return false; + if (hasTextEffect() != other.hasTextEffect()) return false; + if (hasTextEffect()) { + if (!getTextEffect() + .equals(other.getTextEffect())) return false; + } + if (getGroupId() + != other.getGroupId()) return false; + if (getIncomeTaskgifts() + != other.getIncomeTaskgifts()) return false; + if (getRoomFanTicketCount() + != other.getRoomFanTicketCount()) return false; + if (hasPriority() != other.hasPriority()) return false; + if (hasPriority()) { + if (!getPriority() + .equals(other.getPriority())) return false; + } + if (hasGift() != other.hasGift()) return false; + if (hasGift()) { + if (!getGift() + .equals(other.getGift())) return false; + } + if (!getLogId() + .equals(other.getLogId())) return false; + if (getSendType() + != other.getSendType()) return false; + if (hasPublicAreaCommon() != other.hasPublicAreaCommon()) return false; + if (hasPublicAreaCommon()) { + if (!getPublicAreaCommon() + .equals(other.getPublicAreaCommon())) return false; + } + if (hasTrayDisplayText() != other.hasTrayDisplayText()) return false; + if (hasTrayDisplayText()) { + if (!getTrayDisplayText() + .equals(other.getTrayDisplayText())) return false; + } + if (getBannedDisplayEffects() + != other.getBannedDisplayEffects()) return false; + if (getDisplayForSelf() + != other.getDisplayForSelf()) return false; + if (!getInteractGiftInfo() + .equals(other.getInteractGiftInfo())) return false; + if (!getDiyItemInfo() + .equals(other.getDiyItemInfo())) return false; + if (!getMinAssetSetListList() + .equals(other.getMinAssetSetListList())) return false; + if (getTotalCount() + != other.getTotalCount()) return false; + if (getClientGiftSource() + != other.getClientGiftSource()) return false; + if (!getToUserIdsListList() + .equals(other.getToUserIdsListList())) return false; + if (getSendTimet() + != other.getSendTimet()) return false; + if (getForceDisplayEffectst() + != other.getForceDisplayEffectst()) return false; + if (!getTraceId() + .equals(other.getTraceId())) return false; + if (getEffectDisplayTs() + != other.getEffectDisplayTs()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (37 * hash) + LONG_GIFT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLongGiftId()); + hash = (37 * hash) + FAN_TICKET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFanTicketCount()); + hash = (37 * hash) + GROUP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGroupCount()); + hash = (37 * hash) + REPEAT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRepeatCount()); + hash = (37 * hash) + COMBO_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getComboCount()); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + if (hasToUser()) { + hash = (37 * hash) + TO_USER_FIELD_NUMBER; + hash = (53 * hash) + getToUser().hashCode(); + } + hash = (37 * hash) + REPEAT_END_FIELD_NUMBER; + hash = (53 * hash) + getRepeatEnd(); + if (hasTextEffect()) { + hash = (37 * hash) + TEXT_EFFECT_FIELD_NUMBER; + hash = (53 * hash) + getTextEffect().hashCode(); + } + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGroupId()); + hash = (37 * hash) + INCOME_TASKGIFTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getIncomeTaskgifts()); + hash = (37 * hash) + ROOM_FAN_TICKET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRoomFanTicketCount()); + if (hasPriority()) { + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority().hashCode(); + } + if (hasGift()) { + hash = (37 * hash) + GIFT_FIELD_NUMBER; + hash = (53 * hash) + getGift().hashCode(); + } + hash = (37 * hash) + LOG_ID_FIELD_NUMBER; + hash = (53 * hash) + getLogId().hashCode(); + hash = (37 * hash) + SEND_TYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSendType()); + if (hasPublicAreaCommon()) { + hash = (37 * hash) + PUBLIC_AREA_COMMON_FIELD_NUMBER; + hash = (53 * hash) + getPublicAreaCommon().hashCode(); + } + if (hasTrayDisplayText()) { + hash = (37 * hash) + TRAY_DISPLAY_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getTrayDisplayText().hashCode(); + } + hash = (37 * hash) + BANNED_DISPLAY_EFFECTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBannedDisplayEffects()); + hash = (37 * hash) + DISPLAY_FOR_SELF_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisplayForSelf()); + hash = (37 * hash) + INTERACT_GIFT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getInteractGiftInfo().hashCode(); + hash = (37 * hash) + DIY_ITEM_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDiyItemInfo().hashCode(); + if (getMinAssetSetListCount() > 0) { + hash = (37 * hash) + MIN_ASSET_SET_LIST_FIELD_NUMBER; + hash = (53 * hash) + getMinAssetSetListList().hashCode(); + } + hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalCount()); + hash = (37 * hash) + CLIENT_GIFT_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getClientGiftSource(); + if (getToUserIdsListCount() > 0) { + hash = (37 * hash) + TO_USER_IDS_LIST_FIELD_NUMBER; + hash = (53 * hash) + getToUserIdsListList().hashCode(); + } + hash = (37 * hash) + SEND_TIMET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSendTimet()); + hash = (37 * hash) + FORCE_DISPLAY_EFFECTST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getForceDisplayEffectst()); + hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTraceId().hashCode(); + hash = (37 * hash) + EFFECT_DISPLAY_TS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEffectDisplayTs()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastGiftMessageMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastGiftMessageMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCommonFieldBuilder(); + getUserFieldBuilder(); + getToUserFieldBuilder(); + getTextEffectFieldBuilder(); + getPriorityFieldBuilder(); + getGiftFieldBuilder(); + getPublicAreaCommonFieldBuilder(); + getTrayDisplayTextFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + longGiftId_ = 0L; + fanTicketCount_ = 0L; + groupCount_ = 0L; + repeatCount_ = 0L; + comboCount_ = 0L; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + toUser_ = null; + if (toUserBuilder_ != null) { + toUserBuilder_.dispose(); + toUserBuilder_ = null; + } + repeatEnd_ = 0; + textEffect_ = null; + if (textEffectBuilder_ != null) { + textEffectBuilder_.dispose(); + textEffectBuilder_ = null; + } + groupId_ = 0L; + incomeTaskgifts_ = 0L; + roomFanTicketCount_ = 0L; + priority_ = null; + if (priorityBuilder_ != null) { + priorityBuilder_.dispose(); + priorityBuilder_ = null; + } + gift_ = null; + if (giftBuilder_ != null) { + giftBuilder_.dispose(); + giftBuilder_ = null; + } + logId_ = ""; + sendType_ = 0L; + publicAreaCommon_ = null; + if (publicAreaCommonBuilder_ != null) { + publicAreaCommonBuilder_.dispose(); + publicAreaCommonBuilder_ = null; + } + trayDisplayText_ = null; + if (trayDisplayTextBuilder_ != null) { + trayDisplayTextBuilder_.dispose(); + trayDisplayTextBuilder_ = null; + } + bannedDisplayEffects_ = 0L; + displayForSelf_ = false; + interactGiftInfo_ = ""; + diyItemInfo_ = ""; + minAssetSetList_ = emptyLongList(); + totalCount_ = 0L; + clientGiftSource_ = 0; + toUserIdsList_ = emptyLongList(); + sendTimet_ = 0L; + forceDisplayEffectst_ = 0L; + traceId_ = ""; + effectDisplayTs_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.longGiftId_ = longGiftId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fanTicketCount_ = fanTicketCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.groupCount_ = groupCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.repeatCount_ = repeatCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.comboCount_ = comboCount_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.toUser_ = toUserBuilder_ == null + ? toUser_ + : toUserBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.repeatEnd_ = repeatEnd_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.textEffect_ = textEffectBuilder_ == null + ? textEffect_ + : textEffectBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.incomeTaskgifts_ = incomeTaskgifts_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.roomFanTicketCount_ = roomFanTicketCount_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.priority_ = priorityBuilder_ == null + ? priority_ + : priorityBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.gift_ = giftBuilder_ == null + ? gift_ + : giftBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.logId_ = logId_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.sendType_ = sendType_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.publicAreaCommon_ = publicAreaCommonBuilder_ == null + ? publicAreaCommon_ + : publicAreaCommonBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.trayDisplayText_ = trayDisplayTextBuilder_ == null + ? trayDisplayText_ + : trayDisplayTextBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.bannedDisplayEffects_ = bannedDisplayEffects_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.displayForSelf_ = displayForSelf_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.interactGiftInfo_ = interactGiftInfo_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.diyItemInfo_ = diyItemInfo_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + minAssetSetList_.makeImmutable(); + result.minAssetSetList_ = minAssetSetList_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.totalCount_ = totalCount_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.clientGiftSource_ = clientGiftSource_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + toUserIdsList_.makeImmutable(); + result.toUserIdsList_ = toUserIdsList_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.sendTimet_ = sendTimet_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.forceDisplayEffectst_ = forceDisplayEffectst_; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.traceId_ = traceId_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.effectDisplayTs_ = effectDisplayTs_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.getLongGiftId() != 0L) { + setLongGiftId(other.getLongGiftId()); + } + if (other.getFanTicketCount() != 0L) { + setFanTicketCount(other.getFanTicketCount()); + } + if (other.getGroupCount() != 0L) { + setGroupCount(other.getGroupCount()); + } + if (other.getRepeatCount() != 0L) { + setRepeatCount(other.getRepeatCount()); + } + if (other.getComboCount() != 0L) { + setComboCount(other.getComboCount()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.hasToUser()) { + mergeToUser(other.getToUser()); + } + if (other.getRepeatEnd() != 0) { + setRepeatEnd(other.getRepeatEnd()); + } + if (other.hasTextEffect()) { + mergeTextEffect(other.getTextEffect()); + } + if (other.getGroupId() != 0L) { + setGroupId(other.getGroupId()); + } + if (other.getIncomeTaskgifts() != 0L) { + setIncomeTaskgifts(other.getIncomeTaskgifts()); + } + if (other.getRoomFanTicketCount() != 0L) { + setRoomFanTicketCount(other.getRoomFanTicketCount()); + } + if (other.hasPriority()) { + mergePriority(other.getPriority()); + } + if (other.hasGift()) { + mergeGift(other.getGift()); + } + if (!other.getLogId().isEmpty()) { + logId_ = other.logId_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.getSendType() != 0L) { + setSendType(other.getSendType()); + } + if (other.hasPublicAreaCommon()) { + mergePublicAreaCommon(other.getPublicAreaCommon()); + } + if (other.hasTrayDisplayText()) { + mergeTrayDisplayText(other.getTrayDisplayText()); + } + if (other.getBannedDisplayEffects() != 0L) { + setBannedDisplayEffects(other.getBannedDisplayEffects()); + } + if (other.getDisplayForSelf() != false) { + setDisplayForSelf(other.getDisplayForSelf()); + } + if (!other.getInteractGiftInfo().isEmpty()) { + interactGiftInfo_ = other.interactGiftInfo_; + bitField0_ |= 0x00200000; + onChanged(); + } + if (!other.getDiyItemInfo().isEmpty()) { + diyItemInfo_ = other.diyItemInfo_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (!other.minAssetSetList_.isEmpty()) { + if (minAssetSetList_.isEmpty()) { + minAssetSetList_ = other.minAssetSetList_; + minAssetSetList_.makeImmutable(); + bitField0_ |= 0x00800000; + } else { + ensureMinAssetSetListIsMutable(); + minAssetSetList_.addAll(other.minAssetSetList_); + } + onChanged(); + } + if (other.getTotalCount() != 0L) { + setTotalCount(other.getTotalCount()); + } + if (other.getClientGiftSource() != 0) { + setClientGiftSource(other.getClientGiftSource()); + } + if (!other.toUserIdsList_.isEmpty()) { + if (toUserIdsList_.isEmpty()) { + toUserIdsList_ = other.toUserIdsList_; + toUserIdsList_.makeImmutable(); + bitField0_ |= 0x04000000; + } else { + ensureToUserIdsListIsMutable(); + toUserIdsList_.addAll(other.toUserIdsList_); + } + onChanged(); + } + if (other.getSendTimet() != 0L) { + setSendTimet(other.getSendTimet()); + } + if (other.getForceDisplayEffectst() != 0L) { + setForceDisplayEffectst(other.getForceDisplayEffectst()); + } + if (!other.getTraceId().isEmpty()) { + traceId_ = other.traceId_; + bitField0_ |= 0x20000000; + onChanged(); + } + if (other.getEffectDisplayTs() != 0L) { + setEffectDisplayTs(other.getEffectDisplayTs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + longGiftId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + fanTicketCount_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + groupCount_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + repeatCount_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + comboCount_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getToUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + repeatEnd_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + input.readMessage( + getTextEffectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: { + groupId_ = input.readUInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + incomeTaskgifts_ = input.readUInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + roomFanTicketCount_ = input.readUInt64(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 114: { + input.readMessage( + getPriorityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: { + input.readMessage( + getGiftFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: { + logId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 136: { + sendType_ = input.readUInt64(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 146: { + input.readMessage( + getPublicAreaCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + case 154: { + input.readMessage( + getTrayDisplayTextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 160: { + bannedDisplayEffects_ = input.readUInt64(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 200: { + displayForSelf_ = input.readBool(); + bitField0_ |= 0x00100000; + break; + } // case 200 + case 210: { + interactGiftInfo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 210 + case 218: { + diyItemInfo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 218 + case 224: { + long v = input.readUInt64(); + ensureMinAssetSetListIsMutable(); + minAssetSetList_.addLong(v); + break; + } // case 224 + case 226: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureMinAssetSetListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + minAssetSetList_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } // case 226 + case 232: { + totalCount_ = input.readUInt64(); + bitField0_ |= 0x01000000; + break; + } // case 232 + case 240: { + clientGiftSource_ = input.readUInt32(); + bitField0_ |= 0x02000000; + break; + } // case 240 + case 256: { + long v = input.readUInt64(); + ensureToUserIdsListIsMutable(); + toUserIdsList_.addLong(v); + break; + } // case 256 + case 258: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureToUserIdsListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + toUserIdsList_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } // case 258 + case 264: { + sendTimet_ = input.readUInt64(); + bitField0_ |= 0x08000000; + break; + } // case 264 + case 272: { + forceDisplayEffectst_ = input.readUInt64(); + bitField0_ |= 0x10000000; + break; + } // case 272 + case 282: { + traceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 282 + case 288: { + effectDisplayTs_ = input.readUInt64(); + bitField0_ |= 0x40000000; + break; + } // case 288 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * .Common common = 1; + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + if (common_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Common common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * .Common common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private long longGiftId_ ; + /** + * uint64 long_gift_id = 2; + * @return The longGiftId. + */ + @java.lang.Override + public long getLongGiftId() { + return longGiftId_; + } + /** + * uint64 long_gift_id = 2; + * @param value The longGiftId to set. + * @return This builder for chaining. + */ + public Builder setLongGiftId(long value) { + + longGiftId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 long_gift_id = 2; + * @return This builder for chaining. + */ + public Builder clearLongGiftId() { + bitField0_ = (bitField0_ & ~0x00000002); + longGiftId_ = 0L; + onChanged(); + return this; + } + + private long fanTicketCount_ ; + /** + * uint64 fan_ticket_count = 3; + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + /** + * uint64 fan_ticket_count = 3; + * @param value The fanTicketCount to set. + * @return This builder for chaining. + */ + public Builder setFanTicketCount(long value) { + + fanTicketCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 fan_ticket_count = 3; + * @return This builder for chaining. + */ + public Builder clearFanTicketCount() { + bitField0_ = (bitField0_ & ~0x00000004); + fanTicketCount_ = 0L; + onChanged(); + return this; + } + + private long groupCount_ ; + /** + * uint64 group_count = 4; + * @return The groupCount. + */ + @java.lang.Override + public long getGroupCount() { + return groupCount_; + } + /** + * uint64 group_count = 4; + * @param value The groupCount to set. + * @return This builder for chaining. + */ + public Builder setGroupCount(long value) { + + groupCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 group_count = 4; + * @return This builder for chaining. + */ + public Builder clearGroupCount() { + bitField0_ = (bitField0_ & ~0x00000008); + groupCount_ = 0L; + onChanged(); + return this; + } + + private long repeatCount_ ; + /** + * uint64 repeat_count = 5; + * @return The repeatCount. + */ + @java.lang.Override + public long getRepeatCount() { + return repeatCount_; + } + /** + * uint64 repeat_count = 5; + * @param value The repeatCount to set. + * @return This builder for chaining. + */ + public Builder setRepeatCount(long value) { + + repeatCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 repeat_count = 5; + * @return This builder for chaining. + */ + public Builder clearRepeatCount() { + bitField0_ = (bitField0_ & ~0x00000010); + repeatCount_ = 0L; + onChanged(); + return this; + } + + private long comboCount_ ; + /** + * uint64 combo_count = 6; + * @return The comboCount. + */ + @java.lang.Override + public long getComboCount() { + return comboCount_; + } + /** + * uint64 combo_count = 6; + * @param value The comboCount to set. + * @return This builder for chaining. + */ + public Builder setComboCount(long value) { + + comboCount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint64 combo_count = 6; + * @return This builder for chaining. + */ + public Builder clearComboCount() { + bitField0_ = (bitField0_ & ~0x00000020); + comboCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * .User user = 7; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .User user = 7; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .User user = 7; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .User user = 7; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .User user = 7; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * .User user = 7; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000040); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User user = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .User user = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * .User user = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User toUser_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> toUserBuilder_; + /** + * .User to_user = 8; + * @return Whether the toUser field is set. + */ + public boolean hasToUser() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .User to_user = 8; + * @return The toUser. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getToUser() { + if (toUserBuilder_ == null) { + return toUser_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } else { + return toUserBuilder_.getMessage(); + } + } + /** + * .User to_user = 8; + */ + public Builder setToUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (toUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + toUser_ = value; + } else { + toUserBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .User to_user = 8; + */ + public Builder setToUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (toUserBuilder_ == null) { + toUser_ = builderForValue.build(); + } else { + toUserBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .User to_user = 8; + */ + public Builder mergeToUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (toUserBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + toUser_ != null && + toUser_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getToUserBuilder().mergeFrom(value); + } else { + toUser_ = value; + } + } else { + toUserBuilder_.mergeFrom(value); + } + if (toUser_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * .User to_user = 8; + */ + public Builder clearToUser() { + bitField0_ = (bitField0_ & ~0x00000080); + toUser_ = null; + if (toUserBuilder_ != null) { + toUserBuilder_.dispose(); + toUserBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User to_user = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getToUserBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getToUserFieldBuilder().getBuilder(); + } + /** + * .User to_user = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getToUserOrBuilder() { + if (toUserBuilder_ != null) { + return toUserBuilder_.getMessageOrBuilder(); + } else { + return toUser_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } + } + /** + * .User to_user = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getToUserFieldBuilder() { + if (toUserBuilder_ == null) { + toUserBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getToUser(), + getParentForChildren(), + isClean()); + toUser_ = null; + } + return toUserBuilder_; + } + + private int repeatEnd_ ; + /** + * uint32 repeat_end = 9; + * @return The repeatEnd. + */ + @java.lang.Override + public int getRepeatEnd() { + return repeatEnd_; + } + /** + * uint32 repeat_end = 9; + * @param value The repeatEnd to set. + * @return This builder for chaining. + */ + public Builder setRepeatEnd(int value) { + + repeatEnd_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * uint32 repeat_end = 9; + * @return This builder for chaining. + */ + public Builder clearRepeatEnd() { + bitField0_ = (bitField0_ & ~0x00000100); + repeatEnd_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect textEffect_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder> textEffectBuilder_; + /** + * .TextEffect text_effect = 10; + * @return Whether the textEffect field is set. + */ + public boolean hasTextEffect() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * .TextEffect text_effect = 10; + * @return The textEffect. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getTextEffect() { + if (textEffectBuilder_ == null) { + return textEffect_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } else { + return textEffectBuilder_.getMessage(); + } + } + /** + * .TextEffect text_effect = 10; + */ + public Builder setTextEffect(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect value) { + if (textEffectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textEffect_ = value; + } else { + textEffectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .TextEffect text_effect = 10; + */ + public Builder setTextEffect( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder builderForValue) { + if (textEffectBuilder_ == null) { + textEffect_ = builderForValue.build(); + } else { + textEffectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .TextEffect text_effect = 10; + */ + public Builder mergeTextEffect(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect value) { + if (textEffectBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + textEffect_ != null && + textEffect_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance()) { + getTextEffectBuilder().mergeFrom(value); + } else { + textEffect_ = value; + } + } else { + textEffectBuilder_.mergeFrom(value); + } + if (textEffect_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * .TextEffect text_effect = 10; + */ + public Builder clearTextEffect() { + bitField0_ = (bitField0_ & ~0x00000200); + textEffect_ = null; + if (textEffectBuilder_ != null) { + textEffectBuilder_.dispose(); + textEffectBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextEffect text_effect = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder getTextEffectBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getTextEffectFieldBuilder().getBuilder(); + } + /** + * .TextEffect text_effect = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder getTextEffectOrBuilder() { + if (textEffectBuilder_ != null) { + return textEffectBuilder_.getMessageOrBuilder(); + } else { + return textEffect_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } + } + /** + * .TextEffect text_effect = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder> + getTextEffectFieldBuilder() { + if (textEffectBuilder_ == null) { + textEffectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder>( + getTextEffect(), + getParentForChildren(), + isClean()); + textEffect_ = null; + } + return textEffectBuilder_; + } + + private long groupId_ ; + /** + * uint64 group_id = 11; + * @return The groupId. + */ + @java.lang.Override + public long getGroupId() { + return groupId_; + } + /** + * uint64 group_id = 11; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId(long value) { + + groupId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * uint64 group_id = 11; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + bitField0_ = (bitField0_ & ~0x00000400); + groupId_ = 0L; + onChanged(); + return this; + } + + private long incomeTaskgifts_ ; + /** + * uint64 income_taskgifts = 12; + * @return The incomeTaskgifts. + */ + @java.lang.Override + public long getIncomeTaskgifts() { + return incomeTaskgifts_; + } + /** + * uint64 income_taskgifts = 12; + * @param value The incomeTaskgifts to set. + * @return This builder for chaining. + */ + public Builder setIncomeTaskgifts(long value) { + + incomeTaskgifts_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * uint64 income_taskgifts = 12; + * @return This builder for chaining. + */ + public Builder clearIncomeTaskgifts() { + bitField0_ = (bitField0_ & ~0x00000800); + incomeTaskgifts_ = 0L; + onChanged(); + return this; + } + + private long roomFanTicketCount_ ; + /** + * uint64 room_fan_ticket_count = 13; + * @return The roomFanTicketCount. + */ + @java.lang.Override + public long getRoomFanTicketCount() { + return roomFanTicketCount_; + } + /** + * uint64 room_fan_ticket_count = 13; + * @param value The roomFanTicketCount to set. + * @return This builder for chaining. + */ + public Builder setRoomFanTicketCount(long value) { + + roomFanTicketCount_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * uint64 room_fan_ticket_count = 13; + * @return This builder for chaining. + */ + public Builder clearRoomFanTicketCount() { + bitField0_ = (bitField0_ & ~0x00001000); + roomFanTicketCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority priority_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder> priorityBuilder_; + /** + * .GiftIMPriority priority = 14; + * @return Whether the priority field is set. + */ + public boolean hasPriority() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * .GiftIMPriority priority = 14; + * @return The priority. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getPriority() { + if (priorityBuilder_ == null) { + return priority_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } else { + return priorityBuilder_.getMessage(); + } + } + /** + * .GiftIMPriority priority = 14; + */ + public Builder setPriority(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority value) { + if (priorityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + priority_ = value; + } else { + priorityBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .GiftIMPriority priority = 14; + */ + public Builder setPriority( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder builderForValue) { + if (priorityBuilder_ == null) { + priority_ = builderForValue.build(); + } else { + priorityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .GiftIMPriority priority = 14; + */ + public Builder mergePriority(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority value) { + if (priorityBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + priority_ != null && + priority_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance()) { + getPriorityBuilder().mergeFrom(value); + } else { + priority_ = value; + } + } else { + priorityBuilder_.mergeFrom(value); + } + if (priority_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * .GiftIMPriority priority = 14; + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00002000); + priority_ = null; + if (priorityBuilder_ != null) { + priorityBuilder_.dispose(); + priorityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .GiftIMPriority priority = 14; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder getPriorityBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getPriorityFieldBuilder().getBuilder(); + } + /** + * .GiftIMPriority priority = 14; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder getPriorityOrBuilder() { + if (priorityBuilder_ != null) { + return priorityBuilder_.getMessageOrBuilder(); + } else { + return priority_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } + } + /** + * .GiftIMPriority priority = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder> + getPriorityFieldBuilder() { + if (priorityBuilder_ == null) { + priorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder>( + getPriority(), + getParentForChildren(), + isClean()); + priority_ = null; + } + return priorityBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct gift_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder> giftBuilder_; + /** + * .GiftStruct gift = 15; + * @return Whether the gift field is set. + */ + public boolean hasGift() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * .GiftStruct gift = 15; + * @return The gift. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getGift() { + if (giftBuilder_ == null) { + return gift_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } else { + return giftBuilder_.getMessage(); + } + } + /** + * .GiftStruct gift = 15; + */ + public Builder setGift(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct value) { + if (giftBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gift_ = value; + } else { + giftBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * .GiftStruct gift = 15; + */ + public Builder setGift( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder builderForValue) { + if (giftBuilder_ == null) { + gift_ = builderForValue.build(); + } else { + giftBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * .GiftStruct gift = 15; + */ + public Builder mergeGift(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct value) { + if (giftBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) && + gift_ != null && + gift_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance()) { + getGiftBuilder().mergeFrom(value); + } else { + gift_ = value; + } + } else { + giftBuilder_.mergeFrom(value); + } + if (gift_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * .GiftStruct gift = 15; + */ + public Builder clearGift() { + bitField0_ = (bitField0_ & ~0x00004000); + gift_ = null; + if (giftBuilder_ != null) { + giftBuilder_.dispose(); + giftBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .GiftStruct gift = 15; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder getGiftBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getGiftFieldBuilder().getBuilder(); + } + /** + * .GiftStruct gift = 15; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder getGiftOrBuilder() { + if (giftBuilder_ != null) { + return giftBuilder_.getMessageOrBuilder(); + } else { + return gift_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } + } + /** + * .GiftStruct gift = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder> + getGiftFieldBuilder() { + if (giftBuilder_ == null) { + giftBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder>( + getGift(), + getParentForChildren(), + isClean()); + gift_ = null; + } + return giftBuilder_; + } + + private java.lang.Object logId_ = ""; + /** + * string log_id = 16; + * @return The logId. + */ + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string log_id = 16; + * @return The bytes for logId. + */ + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string log_id = 16; + * @param value The logId to set. + * @return This builder for chaining. + */ + public Builder setLogId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + logId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * string log_id = 16; + * @return This builder for chaining. + */ + public Builder clearLogId() { + logId_ = getDefaultInstance().getLogId(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * string log_id = 16; + * @param value The bytes for logId to set. + * @return This builder for chaining. + */ + public Builder setLogIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + logId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private long sendType_ ; + /** + * uint64 send_type = 17; + * @return The sendType. + */ + @java.lang.Override + public long getSendType() { + return sendType_; + } + /** + * uint64 send_type = 17; + * @param value The sendType to set. + * @return This builder for chaining. + */ + public Builder setSendType(long value) { + + sendType_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * uint64 send_type = 17; + * @return This builder for chaining. + */ + public Builder clearSendType() { + bitField0_ = (bitField0_ & ~0x00010000); + sendType_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon publicAreaCommon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder> publicAreaCommonBuilder_; + /** + * .PublicAreaCommon public_area_common = 18; + * @return Whether the publicAreaCommon field is set. + */ + public boolean hasPublicAreaCommon() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * .PublicAreaCommon public_area_common = 18; + * @return The publicAreaCommon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon() { + if (publicAreaCommonBuilder_ == null) { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } else { + return publicAreaCommonBuilder_.getMessage(); + } + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + public Builder setPublicAreaCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon value) { + if (publicAreaCommonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicAreaCommon_ = value; + } else { + publicAreaCommonBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + public Builder setPublicAreaCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder builderForValue) { + if (publicAreaCommonBuilder_ == null) { + publicAreaCommon_ = builderForValue.build(); + } else { + publicAreaCommonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + public Builder mergePublicAreaCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon value) { + if (publicAreaCommonBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + publicAreaCommon_ != null && + publicAreaCommon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance()) { + getPublicAreaCommonBuilder().mergeFrom(value); + } else { + publicAreaCommon_ = value; + } + } else { + publicAreaCommonBuilder_.mergeFrom(value); + } + if (publicAreaCommon_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + public Builder clearPublicAreaCommon() { + bitField0_ = (bitField0_ & ~0x00020000); + publicAreaCommon_ = null; + if (publicAreaCommonBuilder_ != null) { + publicAreaCommonBuilder_.dispose(); + publicAreaCommonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder getPublicAreaCommonBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getPublicAreaCommonFieldBuilder().getBuilder(); + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder() { + if (publicAreaCommonBuilder_ != null) { + return publicAreaCommonBuilder_.getMessageOrBuilder(); + } else { + return publicAreaCommon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + } + /** + * .PublicAreaCommon public_area_common = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder> + getPublicAreaCommonFieldBuilder() { + if (publicAreaCommonBuilder_ == null) { + publicAreaCommonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder>( + getPublicAreaCommon(), + getParentForChildren(), + isClean()); + publicAreaCommon_ = null; + } + return publicAreaCommonBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text trayDisplayText_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> trayDisplayTextBuilder_; + /** + * .Text tray_display_text = 19; + * @return Whether the trayDisplayText field is set. + */ + public boolean hasTrayDisplayText() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * .Text tray_display_text = 19; + * @return The trayDisplayText. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getTrayDisplayText() { + if (trayDisplayTextBuilder_ == null) { + return trayDisplayText_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } else { + return trayDisplayTextBuilder_.getMessage(); + } + } + /** + * .Text tray_display_text = 19; + */ + public Builder setTrayDisplayText(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text value) { + if (trayDisplayTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trayDisplayText_ = value; + } else { + trayDisplayTextBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .Text tray_display_text = 19; + */ + public Builder setTrayDisplayText( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder builderForValue) { + if (trayDisplayTextBuilder_ == null) { + trayDisplayText_ = builderForValue.build(); + } else { + trayDisplayTextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .Text tray_display_text = 19; + */ + public Builder mergeTrayDisplayText(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text value) { + if (trayDisplayTextBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + trayDisplayText_ != null && + trayDisplayText_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) { + getTrayDisplayTextBuilder().mergeFrom(value); + } else { + trayDisplayText_ = value; + } + } else { + trayDisplayTextBuilder_.mergeFrom(value); + } + if (trayDisplayText_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * .Text tray_display_text = 19; + */ + public Builder clearTrayDisplayText() { + bitField0_ = (bitField0_ & ~0x00040000); + trayDisplayText_ = null; + if (trayDisplayTextBuilder_ != null) { + trayDisplayTextBuilder_.dispose(); + trayDisplayTextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Text tray_display_text = 19; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder getTrayDisplayTextBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getTrayDisplayTextFieldBuilder().getBuilder(); + } + /** + * .Text tray_display_text = 19; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTrayDisplayTextOrBuilder() { + if (trayDisplayTextBuilder_ != null) { + return trayDisplayTextBuilder_.getMessageOrBuilder(); + } else { + return trayDisplayText_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } + } + /** + * .Text tray_display_text = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> + getTrayDisplayTextFieldBuilder() { + if (trayDisplayTextBuilder_ == null) { + trayDisplayTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder>( + getTrayDisplayText(), + getParentForChildren(), + isClean()); + trayDisplayText_ = null; + } + return trayDisplayTextBuilder_; + } + + private long bannedDisplayEffects_ ; + /** + * uint64 banned_display_effects = 20; + * @return The bannedDisplayEffects. + */ + @java.lang.Override + public long getBannedDisplayEffects() { + return bannedDisplayEffects_; + } + /** + * uint64 banned_display_effects = 20; + * @param value The bannedDisplayEffects to set. + * @return This builder for chaining. + */ + public Builder setBannedDisplayEffects(long value) { + + bannedDisplayEffects_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * uint64 banned_display_effects = 20; + * @return This builder for chaining. + */ + public Builder clearBannedDisplayEffects() { + bitField0_ = (bitField0_ & ~0x00080000); + bannedDisplayEffects_ = 0L; + onChanged(); + return this; + } + + private boolean displayForSelf_ ; + /** + *
+       * GiftTrayInfo trayInfo = 21;
+       * AssetEffectMixInfo assetEffectMixInfo = 22;
+       * 
+ * + * bool display_for_self = 25; + * @return The displayForSelf. + */ + @java.lang.Override + public boolean getDisplayForSelf() { + return displayForSelf_; + } + /** + *
+       * GiftTrayInfo trayInfo = 21;
+       * AssetEffectMixInfo assetEffectMixInfo = 22;
+       * 
+ * + * bool display_for_self = 25; + * @param value The displayForSelf to set. + * @return This builder for chaining. + */ + public Builder setDisplayForSelf(boolean value) { + + displayForSelf_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+       * GiftTrayInfo trayInfo = 21;
+       * AssetEffectMixInfo assetEffectMixInfo = 22;
+       * 
+ * + * bool display_for_self = 25; + * @return This builder for chaining. + */ + public Builder clearDisplayForSelf() { + bitField0_ = (bitField0_ & ~0x00100000); + displayForSelf_ = false; + onChanged(); + return this; + } + + private java.lang.Object interactGiftInfo_ = ""; + /** + * string interact_gift_info = 26; + * @return The interactGiftInfo. + */ + public java.lang.String getInteractGiftInfo() { + java.lang.Object ref = interactGiftInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interactGiftInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string interact_gift_info = 26; + * @return The bytes for interactGiftInfo. + */ + public com.google.protobuf.ByteString + getInteractGiftInfoBytes() { + java.lang.Object ref = interactGiftInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + interactGiftInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string interact_gift_info = 26; + * @param value The interactGiftInfo to set. + * @return This builder for chaining. + */ + public Builder setInteractGiftInfo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + interactGiftInfo_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * string interact_gift_info = 26; + * @return This builder for chaining. + */ + public Builder clearInteractGiftInfo() { + interactGiftInfo_ = getDefaultInstance().getInteractGiftInfo(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * string interact_gift_info = 26; + * @param value The bytes for interactGiftInfo to set. + * @return This builder for chaining. + */ + public Builder setInteractGiftInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + interactGiftInfo_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private java.lang.Object diyItemInfo_ = ""; + /** + * string diy_item_info = 27; + * @return The diyItemInfo. + */ + public java.lang.String getDiyItemInfo() { + java.lang.Object ref = diyItemInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diyItemInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string diy_item_info = 27; + * @return The bytes for diyItemInfo. + */ + public com.google.protobuf.ByteString + getDiyItemInfoBytes() { + java.lang.Object ref = diyItemInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diyItemInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string diy_item_info = 27; + * @param value The diyItemInfo to set. + * @return This builder for chaining. + */ + public Builder setDiyItemInfo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + diyItemInfo_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * string diy_item_info = 27; + * @return This builder for chaining. + */ + public Builder clearDiyItemInfo() { + diyItemInfo_ = getDefaultInstance().getDiyItemInfo(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + /** + * string diy_item_info = 27; + * @param value The bytes for diyItemInfo to set. + * @return This builder for chaining. + */ + public Builder setDiyItemInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + diyItemInfo_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList minAssetSetList_ = emptyLongList(); + private void ensureMinAssetSetListIsMutable() { + if (!minAssetSetList_.isModifiable()) { + minAssetSetList_ = makeMutableCopy(minAssetSetList_); + } + bitField0_ |= 0x00800000; + } + /** + * repeated uint64 min_asset_set_list = 28; + * @return A list containing the minAssetSetList. + */ + public java.util.List + getMinAssetSetListList() { + minAssetSetList_.makeImmutable(); + return minAssetSetList_; + } + /** + * repeated uint64 min_asset_set_list = 28; + * @return The count of minAssetSetList. + */ + public int getMinAssetSetListCount() { + return minAssetSetList_.size(); + } + /** + * repeated uint64 min_asset_set_list = 28; + * @param index The index of the element to return. + * @return The minAssetSetList at the given index. + */ + public long getMinAssetSetList(int index) { + return minAssetSetList_.getLong(index); + } + /** + * repeated uint64 min_asset_set_list = 28; + * @param index The index to set the value at. + * @param value The minAssetSetList to set. + * @return This builder for chaining. + */ + public Builder setMinAssetSetList( + int index, long value) { + + ensureMinAssetSetListIsMutable(); + minAssetSetList_.setLong(index, value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * repeated uint64 min_asset_set_list = 28; + * @param value The minAssetSetList to add. + * @return This builder for chaining. + */ + public Builder addMinAssetSetList(long value) { + + ensureMinAssetSetListIsMutable(); + minAssetSetList_.addLong(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * repeated uint64 min_asset_set_list = 28; + * @param values The minAssetSetList to add. + * @return This builder for chaining. + */ + public Builder addAllMinAssetSetList( + java.lang.Iterable values) { + ensureMinAssetSetListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, minAssetSetList_); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * repeated uint64 min_asset_set_list = 28; + * @return This builder for chaining. + */ + public Builder clearMinAssetSetList() { + minAssetSetList_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + return this; + } + + private long totalCount_ ; + /** + * uint64 total_count = 29; + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + /** + * uint64 total_count = 29; + * @param value The totalCount to set. + * @return This builder for chaining. + */ + public Builder setTotalCount(long value) { + + totalCount_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * uint64 total_count = 29; + * @return This builder for chaining. + */ + public Builder clearTotalCount() { + bitField0_ = (bitField0_ & ~0x01000000); + totalCount_ = 0L; + onChanged(); + return this; + } + + private int clientGiftSource_ ; + /** + * uint32 client_gift_source = 30; + * @return The clientGiftSource. + */ + @java.lang.Override + public int getClientGiftSource() { + return clientGiftSource_; + } + /** + * uint32 client_gift_source = 30; + * @param value The clientGiftSource to set. + * @return This builder for chaining. + */ + public Builder setClientGiftSource(int value) { + + clientGiftSource_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * uint32 client_gift_source = 30; + * @return This builder for chaining. + */ + public Builder clearClientGiftSource() { + bitField0_ = (bitField0_ & ~0x02000000); + clientGiftSource_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList toUserIdsList_ = emptyLongList(); + private void ensureToUserIdsListIsMutable() { + if (!toUserIdsList_.isModifiable()) { + toUserIdsList_ = makeMutableCopy(toUserIdsList_); + } + bitField0_ |= 0x04000000; + } + /** + *
+       * AnchorGiftData anchorGift = 31;
+       * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @return A list containing the toUserIdsList. + */ + public java.util.List + getToUserIdsListList() { + toUserIdsList_.makeImmutable(); + return toUserIdsList_; + } + /** + *
+       * AnchorGiftData anchorGift = 31;
+       * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @return The count of toUserIdsList. + */ + public int getToUserIdsListCount() { + return toUserIdsList_.size(); + } + /** + *
+       * AnchorGiftData anchorGift = 31;
+       * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @param index The index of the element to return. + * @return The toUserIdsList at the given index. + */ + public long getToUserIdsList(int index) { + return toUserIdsList_.getLong(index); + } + /** + *
+       * AnchorGiftData anchorGift = 31;
+       * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @param index The index to set the value at. + * @param value The toUserIdsList to set. + * @return This builder for chaining. + */ + public Builder setToUserIdsList( + int index, long value) { + + ensureToUserIdsListIsMutable(); + toUserIdsList_.setLong(index, value); + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + *
+       * AnchorGiftData anchorGift = 31;
+       * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @param value The toUserIdsList to add. + * @return This builder for chaining. + */ + public Builder addToUserIdsList(long value) { + + ensureToUserIdsListIsMutable(); + toUserIdsList_.addLong(value); + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + *
+       * AnchorGiftData anchorGift = 31;
+       * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @param values The toUserIdsList to add. + * @return This builder for chaining. + */ + public Builder addAllToUserIdsList( + java.lang.Iterable values) { + ensureToUserIdsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, toUserIdsList_); + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + *
+       * AnchorGiftData anchorGift = 31;
+       * 
+ * + * repeated uint64 to_user_ids_list = 32; + * @return This builder for chaining. + */ + public Builder clearToUserIdsList() { + toUserIdsList_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x04000000); + onChanged(); + return this; + } + + private long sendTimet_ ; + /** + * uint64 send_timet = 33; + * @return The sendTimet. + */ + @java.lang.Override + public long getSendTimet() { + return sendTimet_; + } + /** + * uint64 send_timet = 33; + * @param value The sendTimet to set. + * @return This builder for chaining. + */ + public Builder setSendTimet(long value) { + + sendTimet_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * uint64 send_timet = 33; + * @return This builder for chaining. + */ + public Builder clearSendTimet() { + bitField0_ = (bitField0_ & ~0x08000000); + sendTimet_ = 0L; + onChanged(); + return this; + } + + private long forceDisplayEffectst_ ; + /** + * uint64 force_display_effectst = 34; + * @return The forceDisplayEffectst. + */ + @java.lang.Override + public long getForceDisplayEffectst() { + return forceDisplayEffectst_; + } + /** + * uint64 force_display_effectst = 34; + * @param value The forceDisplayEffectst to set. + * @return This builder for chaining. + */ + public Builder setForceDisplayEffectst(long value) { + + forceDisplayEffectst_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * uint64 force_display_effectst = 34; + * @return This builder for chaining. + */ + public Builder clearForceDisplayEffectst() { + bitField0_ = (bitField0_ & ~0x10000000); + forceDisplayEffectst_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object traceId_ = ""; + /** + * string trace_id = 35; + * @return The traceId. + */ + public java.lang.String getTraceId() { + java.lang.Object ref = traceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string trace_id = 35; + * @return The bytes for traceId. + */ + public com.google.protobuf.ByteString + getTraceIdBytes() { + java.lang.Object ref = traceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + traceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string trace_id = 35; + * @param value The traceId to set. + * @return This builder for chaining. + */ + public Builder setTraceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + traceId_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * string trace_id = 35; + * @return This builder for chaining. + */ + public Builder clearTraceId() { + traceId_ = getDefaultInstance().getTraceId(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + return this; + } + /** + * string trace_id = 35; + * @param value The bytes for traceId to set. + * @return This builder for chaining. + */ + public Builder setTraceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + traceId_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + private long effectDisplayTs_ ; + /** + * uint64 effect_display_ts = 36; + * @return The effectDisplayTs. + */ + @java.lang.Override + public long getEffectDisplayTs() { + return effectDisplayTs_; + } + /** + * uint64 effect_display_ts = 36; + * @param value The effectDisplayTs to set. + * @return This builder for chaining. + */ + public Builder setEffectDisplayTs(long value) { + + effectDisplayTs_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * uint64 effect_display_ts = 36; + * @return This builder for chaining. + */ + public Builder clearEffectDisplayTs() { + bitField0_ = (bitField0_ & ~0x40000000); + effectDisplayTs_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastGiftMessageMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastGiftMessageMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebcastGiftMessageMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_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!DouyinWebcastGiftMessageMsg.proto\0222tec" + + "h.ordinaryroad.live.chat.client.douyin.p" + + "rotobuf\032\014Common.proto\032\nUser.proto\032\020TextE" + + "ffect.proto\032\nText.proto\032\024GiftIMPriority." + + "proto\032\020GiftStruct.proto\032\026PublicAreaCommo" + + "n.proto\"\273\006\n\033DouyinWebcastGiftMessageMsg\022" + + "\027\n\006common\030\001 \001(\0132\007.Common\022\024\n\014long_gift_id" + + "\030\002 \001(\004\022\030\n\020fan_ticket_count\030\003 \001(\004\022\023\n\013grou" + + "p_count\030\004 \001(\004\022\024\n\014repeat_count\030\005 \001(\004\022\023\n\013c" + + "ombo_count\030\006 \001(\004\022\023\n\004user\030\007 \001(\0132\005.User\022\026\n" + + "\007to_user\030\010 \001(\0132\005.User\022\022\n\nrepeat_end\030\t \001(" + + "\r\022 \n\013text_effect\030\n \001(\0132\013.TextEffect\022\020\n\010g" + + "roup_id\030\013 \001(\004\022\030\n\020income_taskgifts\030\014 \001(\004\022" + + "\035\n\025room_fan_ticket_count\030\r \001(\004\022!\n\010priori" + + "ty\030\016 \001(\0132\017.GiftIMPriority\022\031\n\004gift\030\017 \001(\0132" + + "\013.GiftStruct\022\016\n\006log_id\030\020 \001(\t\022\021\n\tsend_typ" + + "e\030\021 \001(\004\022-\n\022public_area_common\030\022 \001(\0132\021.Pu" + + "blicAreaCommon\022 \n\021tray_display_text\030\023 \001(" + + "\0132\005.Text\022\036\n\026banned_display_effects\030\024 \001(\004" + + "\022\030\n\020display_for_self\030\031 \001(\010\022\032\n\022interact_g" + + "ift_info\030\032 \001(\t\022\025\n\rdiy_item_info\030\033 \001(\t\022\032\n" + + "\022min_asset_set_list\030\034 \003(\004\022\023\n\013total_count" + + "\030\035 \001(\004\022\032\n\022client_gift_source\030\036 \001(\r\022\030\n\020to" + + "_user_ids_list\030 \003(\004\022\022\n\nsend_timet\030! \001(\004" + + "\022\036\n\026force_display_effectst\030\" \001(\004\022\020\n\010trac" + + "e_id\030# \001(\t\022\031\n\021effect_display_ts\030$ \001(\004B:\n" + + "8tech.ordinaryroad.live.chat.client.code" + + "c.douyin.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastGiftMessageMsg_descriptor, + new java.lang.String[] { "Common", "LongGiftId", "FanTicketCount", "GroupCount", "RepeatCount", "ComboCount", "User", "ToUser", "RepeatEnd", "TextEffect", "GroupId", "IncomeTaskgifts", "RoomFanTicketCount", "Priority", "Gift", "LogId", "SendType", "PublicAreaCommon", "TrayDisplayText", "BannedDisplayEffects", "DisplayForSelf", "InteractGiftInfo", "DiyItemInfo", "MinAssetSetList", "TotalCount", "ClientGiftSource", "ToUserIdsList", "SendTimet", "ForceDisplayEffectst", "TraceId", "EffectDisplayTs", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastLikeMessageMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastLikeMessageMsgOuterClass.java new file mode 100644 index 0000000..ebf9b1f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastLikeMessageMsgOuterClass.java @@ -0,0 +1,1752 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebcastLikeMessageMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebcastLikeMessageMsgOuterClass { + private DouyinWebcastLikeMessageMsgOuterClass() {} + 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 DouyinWebcastLikeMessageMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastLikeMessageMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * .Common common = 1; + * @return The common. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * .Common common = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * uint64 count = 2; + * @return The count. + */ + long getCount(); + + /** + * uint64 total = 3; + * @return The total. + */ + long getTotal(); + + /** + * uint64 color = 4; + * @return The color. + */ + long getColor(); + + /** + * .User user = 5; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .User user = 5; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * .User user = 5; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * string icon = 6; + * @return The icon. + */ + java.lang.String getIcon(); + /** + * string icon = 6; + * @return The bytes for icon. + */ + com.google.protobuf.ByteString + getIconBytes(); + + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + * @return Whether the doubleLikeDetail field is set. + */ + boolean hasDoubleLikeDetail(); + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + * @return The doubleLikeDetail. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDoubleLikeDetail(); + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder getDoubleLikeDetailOrBuilder(); + + /** + *
+     * DisplayControlInfo displayControlInfo = 8;
+     * 
+ * + * uint64 linkmicGuestUid = 9; + * @return The linkmicGuestUid. + */ + long getLinkmicGuestUid(); + + /** + *
+     * PicoDisplayInfo picoDisplayInfo = 11;
+     * = 12;
+     * 
+ * + * string scene = 10; + * @return The scene. + */ + java.lang.String getScene(); + /** + *
+     * PicoDisplayInfo picoDisplayInfo = 11;
+     * = 12;
+     * 
+ * + * string scene = 10; + * @return The bytes for scene. + */ + com.google.protobuf.ByteString + getSceneBytes(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastLikeMessageMsg} + */ + public static final class DouyinWebcastLikeMessageMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastLikeMessageMsg) + DouyinWebcastLikeMessageMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebcastLikeMessageMsg.newBuilder() to construct. + private DouyinWebcastLikeMessageMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebcastLikeMessageMsg() { + icon_ = ""; + scene_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebcastLikeMessageMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.Builder.class); + } + + private int bitField0_; + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * .Common common = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + /** + * uint64 count = 2; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + public static final int TOTAL_FIELD_NUMBER = 3; + private long total_ = 0L; + /** + * uint64 total = 3; + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return total_; + } + + public static final int COLOR_FIELD_NUMBER = 4; + private long color_ = 0L; + /** + * uint64 color = 4; + * @return The color. + */ + @java.lang.Override + public long getColor() { + return color_; + } + + public static final int USER_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * .User user = 5; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 5; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * .User user = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int ICON_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object icon_ = ""; + /** + * string icon = 6; + * @return The icon. + */ + @java.lang.Override + 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 = 6; + * @return The bytes for icon. + */ + @java.lang.Override + 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 DOUBLELIKEDETAIL_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail doubleLikeDetail_; + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + * @return Whether the doubleLikeDetail field is set. + */ + @java.lang.Override + public boolean hasDoubleLikeDetail() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + * @return The doubleLikeDetail. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDoubleLikeDetail() { + return doubleLikeDetail_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder getDoubleLikeDetailOrBuilder() { + return doubleLikeDetail_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } + + public static final int LINKMICGUESTUID_FIELD_NUMBER = 9; + private long linkmicGuestUid_ = 0L; + /** + *
+     * DisplayControlInfo displayControlInfo = 8;
+     * 
+ * + * uint64 linkmicGuestUid = 9; + * @return The linkmicGuestUid. + */ + @java.lang.Override + public long getLinkmicGuestUid() { + return linkmicGuestUid_; + } + + public static final int SCENE_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object scene_ = ""; + /** + *
+     * PicoDisplayInfo picoDisplayInfo = 11;
+     * = 12;
+     * 
+ * + * string scene = 10; + * @return The scene. + */ + @java.lang.Override + public java.lang.String getScene() { + java.lang.Object ref = scene_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scene_ = s; + return s; + } + } + /** + *
+     * PicoDisplayInfo picoDisplayInfo = 11;
+     * = 12;
+     * 
+ * + * string scene = 10; + * @return The bytes for scene. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSceneBytes() { + java.lang.Object ref = scene_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scene_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommon()); + } + if (count_ != 0L) { + output.writeUInt64(2, count_); + } + if (total_ != 0L) { + output.writeUInt64(3, total_); + } + if (color_ != 0L) { + output.writeUInt64(4, color_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(icon_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, icon_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getDoubleLikeDetail()); + } + if (linkmicGuestUid_ != 0L) { + output.writeUInt64(9, linkmicGuestUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scene_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, scene_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, count_); + } + if (total_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, total_); + } + if (color_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, color_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(icon_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, icon_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getDoubleLikeDetail()); + } + if (linkmicGuestUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(9, linkmicGuestUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scene_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, scene_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (getCount() + != other.getCount()) return false; + if (getTotal() + != other.getTotal()) return false; + if (getColor() + != other.getColor()) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getIcon() + .equals(other.getIcon())) return false; + if (hasDoubleLikeDetail() != other.hasDoubleLikeDetail()) return false; + if (hasDoubleLikeDetail()) { + if (!getDoubleLikeDetail() + .equals(other.getDoubleLikeDetail())) return false; + } + if (getLinkmicGuestUid() + != other.getLinkmicGuestUid()) return false; + if (!getScene() + .equals(other.getScene())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCount()); + hash = (37 * hash) + TOTAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotal()); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getColor()); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + if (hasDoubleLikeDetail()) { + hash = (37 * hash) + DOUBLELIKEDETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDoubleLikeDetail().hashCode(); + } + hash = (37 * hash) + LINKMICGUESTUID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLinkmicGuestUid()); + hash = (37 * hash) + SCENE_FIELD_NUMBER; + hash = (53 * hash) + getScene().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastLikeMessageMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastLikeMessageMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCommonFieldBuilder(); + getUserFieldBuilder(); + getDoubleLikeDetailFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + count_ = 0L; + total_ = 0L; + color_ = 0L; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + icon_ = ""; + doubleLikeDetail_ = null; + if (doubleLikeDetailBuilder_ != null) { + doubleLikeDetailBuilder_.dispose(); + doubleLikeDetailBuilder_ = null; + } + linkmicGuestUid_ = 0L; + scene_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.total_ = total_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.icon_ = icon_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.doubleLikeDetail_ = doubleLikeDetailBuilder_ == null + ? doubleLikeDetail_ + : doubleLikeDetailBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.linkmicGuestUid_ = linkmicGuestUid_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.scene_ = scene_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + if (other.getTotal() != 0L) { + setTotal(other.getTotal()); + } + if (other.getColor() != 0L) { + setColor(other.getColor()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getIcon().isEmpty()) { + icon_ = other.icon_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasDoubleLikeDetail()) { + mergeDoubleLikeDetail(other.getDoubleLikeDetail()); + } + if (other.getLinkmicGuestUid() != 0L) { + setLinkmicGuestUid(other.getLinkmicGuestUid()); + } + if (!other.getScene().isEmpty()) { + scene_ = other.scene_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + count_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + total_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + color_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + icon_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getDoubleLikeDetailFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 72: { + linkmicGuestUid_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 82: { + scene_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * .Common common = 1; + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + if (common_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Common common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * .Common common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private long count_ ; + /** + * uint64 count = 2; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * uint64 count = 2; + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 count = 2; + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + private long total_ ; + /** + * uint64 total = 3; + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return total_; + } + /** + * uint64 total = 3; + * @param value The total to set. + * @return This builder for chaining. + */ + public Builder setTotal(long value) { + + total_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 total = 3; + * @return This builder for chaining. + */ + public Builder clearTotal() { + bitField0_ = (bitField0_ & ~0x00000004); + total_ = 0L; + onChanged(); + return this; + } + + private long color_ ; + /** + * uint64 color = 4; + * @return The color. + */ + @java.lang.Override + public long getColor() { + return color_; + } + /** + * uint64 color = 4; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(long value) { + + color_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 color = 4; + * @return This builder for chaining. + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000008); + color_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * .User user = 5; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .User user = 5; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .User user = 5; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .User user = 5; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .User user = 5; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .User user = 5; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000010); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User user = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .User user = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * .User user = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object icon_ = ""; + /** + * string icon = 6; + * @return The icon. + */ + 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 = 6; + * @return The bytes for icon. + */ + 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 = 6; + * @param value The icon to set. + * @return This builder for chaining. + */ + public Builder setIcon( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + icon_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string icon = 6; + * @return This builder for chaining. + */ + public Builder clearIcon() { + icon_ = getDefaultInstance().getIcon(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string icon = 6; + * @param value The bytes for icon to set. + * @return This builder for chaining. + */ + public Builder setIconBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + icon_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail doubleLikeDetail_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder> doubleLikeDetailBuilder_; + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + * @return Whether the doubleLikeDetail field is set. + */ + public boolean hasDoubleLikeDetail() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + * @return The doubleLikeDetail. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDoubleLikeDetail() { + if (doubleLikeDetailBuilder_ == null) { + return doubleLikeDetail_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } else { + return doubleLikeDetailBuilder_.getMessage(); + } + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + public Builder setDoubleLikeDetail(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail value) { + if (doubleLikeDetailBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + doubleLikeDetail_ = value; + } else { + doubleLikeDetailBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + public Builder setDoubleLikeDetail( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder builderForValue) { + if (doubleLikeDetailBuilder_ == null) { + doubleLikeDetail_ = builderForValue.build(); + } else { + doubleLikeDetailBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + public Builder mergeDoubleLikeDetail(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail value) { + if (doubleLikeDetailBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + doubleLikeDetail_ != null && + doubleLikeDetail_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance()) { + getDoubleLikeDetailBuilder().mergeFrom(value); + } else { + doubleLikeDetail_ = value; + } + } else { + doubleLikeDetailBuilder_.mergeFrom(value); + } + if (doubleLikeDetail_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + public Builder clearDoubleLikeDetail() { + bitField0_ = (bitField0_ & ~0x00000040); + doubleLikeDetail_ = null; + if (doubleLikeDetailBuilder_ != null) { + doubleLikeDetailBuilder_.dispose(); + doubleLikeDetailBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder getDoubleLikeDetailBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getDoubleLikeDetailFieldBuilder().getBuilder(); + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder getDoubleLikeDetailOrBuilder() { + if (doubleLikeDetailBuilder_ != null) { + return doubleLikeDetailBuilder_.getMessageOrBuilder(); + } else { + return doubleLikeDetail_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } + } + /** + * .DoubleLikeDetail doubleLikeDetail = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder> + getDoubleLikeDetailFieldBuilder() { + if (doubleLikeDetailBuilder_ == null) { + doubleLikeDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder>( + getDoubleLikeDetail(), + getParentForChildren(), + isClean()); + doubleLikeDetail_ = null; + } + return doubleLikeDetailBuilder_; + } + + private long linkmicGuestUid_ ; + /** + *
+       * DisplayControlInfo displayControlInfo = 8;
+       * 
+ * + * uint64 linkmicGuestUid = 9; + * @return The linkmicGuestUid. + */ + @java.lang.Override + public long getLinkmicGuestUid() { + return linkmicGuestUid_; + } + /** + *
+       * DisplayControlInfo displayControlInfo = 8;
+       * 
+ * + * uint64 linkmicGuestUid = 9; + * @param value The linkmicGuestUid to set. + * @return This builder for chaining. + */ + public Builder setLinkmicGuestUid(long value) { + + linkmicGuestUid_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * DisplayControlInfo displayControlInfo = 8;
+       * 
+ * + * uint64 linkmicGuestUid = 9; + * @return This builder for chaining. + */ + public Builder clearLinkmicGuestUid() { + bitField0_ = (bitField0_ & ~0x00000080); + linkmicGuestUid_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object scene_ = ""; + /** + *
+       * PicoDisplayInfo picoDisplayInfo = 11;
+       * = 12;
+       * 
+ * + * string scene = 10; + * @return The scene. + */ + public java.lang.String getScene() { + java.lang.Object ref = scene_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scene_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * PicoDisplayInfo picoDisplayInfo = 11;
+       * = 12;
+       * 
+ * + * string scene = 10; + * @return The bytes for scene. + */ + public com.google.protobuf.ByteString + getSceneBytes() { + java.lang.Object ref = scene_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scene_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * PicoDisplayInfo picoDisplayInfo = 11;
+       * = 12;
+       * 
+ * + * string scene = 10; + * @param value The scene to set. + * @return This builder for chaining. + */ + public Builder setScene( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + scene_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * PicoDisplayInfo picoDisplayInfo = 11;
+       * = 12;
+       * 
+ * + * string scene = 10; + * @return This builder for chaining. + */ + public Builder clearScene() { + scene_ = getDefaultInstance().getScene(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+       * PicoDisplayInfo picoDisplayInfo = 11;
+       * = 12;
+       * 
+ * + * string scene = 10; + * @param value The bytes for scene to set. + * @return This builder for chaining. + */ + public Builder setSceneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + scene_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastLikeMessageMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastLikeMessageMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebcastLikeMessageMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_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!DouyinWebcastLikeMessageMsg.proto\0222tec" + + "h.ordinaryroad.live.chat.client.douyin.p" + + "rotobuf\032\014Common.proto\032\nUser.proto\032\026Doubl" + + "eLikeDetail.proto\"\333\001\n\033DouyinWebcastLikeM" + + "essageMsg\022\027\n\006common\030\001 \001(\0132\007.Common\022\r\n\005co" + + "unt\030\002 \001(\004\022\r\n\005total\030\003 \001(\004\022\r\n\005color\030\004 \001(\004\022" + + "\023\n\004user\030\005 \001(\0132\005.User\022\014\n\004icon\030\006 \001(\t\022+\n\020do" + + "ubleLikeDetail\030\007 \001(\0132\021.DoubleLikeDetail\022" + + "\027\n\017linkmicGuestUid\030\t \001(\004\022\r\n\005scene\030\n \001(\tB" + + ":\n8tech.ordinaryroad.live.chat.client.co" + + "dec.douyin.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastLikeMessageMsg_descriptor, + new java.lang.String[] { "Common", "Count", "Total", "Color", "User", "Icon", "DoubleLikeDetail", "LinkmicGuestUid", "Scene", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastMemberMessageMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastMemberMessageMsgOuterClass.java new file mode 100644 index 0000000..a259fd3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastMemberMessageMsgOuterClass.java @@ -0,0 +1,3178 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebcastMemberMessageMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebcastMemberMessageMsgOuterClass { + private DouyinWebcastMemberMessageMsgOuterClass() {} + 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 DouyinWebcastMemberMessageMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastMemberMessageMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * .Common common = 1; + * @return The common. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * .Common common = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * .User user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .User user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * .User user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * uint64 memberCount = 3; + * @return The memberCount. + */ + long getMemberCount(); + + /** + * .User operator = 4; + * @return Whether the operator field is set. + */ + boolean hasOperator(); + /** + * .User operator = 4; + * @return The operator. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getOperator(); + /** + * .User operator = 4; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getOperatorOrBuilder(); + + /** + * bool isSetToAdmin = 5; + * @return The isSetToAdmin. + */ + boolean getIsSetToAdmin(); + + /** + * bool isTopUser = 6; + * @return The isTopUser. + */ + boolean getIsTopUser(); + + /** + * int64 rankScore = 7; + * @return The rankScore. + */ + long getRankScore(); + + /** + * int64 topUserNo = 8; + * @return The topUserNo. + */ + long getTopUserNo(); + + /** + * int64 enterType = 9; + * @return The enterType. + */ + long getEnterType(); + + /** + * int64 action = 10; + * @return The action. + */ + long getAction(); + + /** + * string actionDescription = 11; + * @return The actionDescription. + */ + java.lang.String getActionDescription(); + /** + * string actionDescription = 11; + * @return The bytes for actionDescription. + */ + com.google.protobuf.ByteString + getActionDescriptionBytes(); + + /** + * int64 userId = 12; + * @return The userId. + */ + long getUserId(); + + /** + *
+     * EffectConfig effectConfig = 13;
+     * 
+ * + * string popStr = 14; + * @return The popStr. + */ + java.lang.String getPopStr(); + /** + *
+     * EffectConfig effectConfig = 13;
+     * 
+ * + * string popStr = 14; + * @return The bytes for popStr. + */ + com.google.protobuf.ByteString + getPopStrBytes(); + + /** + *
+     * EffectConfig enterEffectConfig = 15;
+     * 
+ * + * .Image backgroundImage = 16; + * @return Whether the backgroundImage field is set. + */ + boolean hasBackgroundImage(); + /** + *
+     * EffectConfig enterEffectConfig = 15;
+     * 
+ * + * .Image backgroundImage = 16; + * @return The backgroundImage. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage(); + /** + *
+     * EffectConfig enterEffectConfig = 15;
+     * 
+ * + * .Image backgroundImage = 16; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder(); + + /** + * .Image backgroundImageV2 = 17; + * @return Whether the backgroundImageV2 field is set. + */ + boolean hasBackgroundImageV2(); + /** + * .Image backgroundImageV2 = 17; + * @return The backgroundImageV2. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2(); + /** + * .Image backgroundImageV2 = 17; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder(); + + /** + * .Text anchorDisplayText = 18; + * @return Whether the anchorDisplayText field is set. + */ + boolean hasAnchorDisplayText(); + /** + * .Text anchorDisplayText = 18; + * @return The anchorDisplayText. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getAnchorDisplayText(); + /** + * .Text anchorDisplayText = 18; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getAnchorDisplayTextOrBuilder(); + + /** + *
+     * PublicAreaCommon publicAreaCommon = 19;
+     * 
+ * + * int64 userEnterTipType = 20; + * @return The userEnterTipType. + */ + long getUserEnterTipType(); + + /** + * int64 anchorEnterTipType = 21; + * @return The anchorEnterTipType. + */ + long getAnchorEnterTipType(); + + /** + * map<string, string> buriedPointMap = 22; + */ + int getBuriedPointMapCount(); + /** + * map<string, string> buriedPointMap = 22; + */ + boolean containsBuriedPointMap( + java.lang.String key); + /** + * Use {@link #getBuriedPointMapMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getBuriedPointMap(); + /** + * map<string, string> buriedPointMap = 22; + */ + java.util.Map + getBuriedPointMapMap(); + /** + * map<string, string> buriedPointMap = 22; + */ + /* nullable */ +java.lang.String getBuriedPointMapOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> buriedPointMap = 22; + */ + java.lang.String getBuriedPointMapOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastMemberMessageMsg} + */ + public static final class DouyinWebcastMemberMessageMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastMemberMessageMsg) + DouyinWebcastMemberMessageMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebcastMemberMessageMsg.newBuilder() to construct. + private DouyinWebcastMemberMessageMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebcastMemberMessageMsg() { + actionDescription_ = ""; + popStr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebcastMemberMessageMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 22: + return internalGetBuriedPointMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.Builder.class); + } + + private int bitField0_; + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * .Common common = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * .User user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * .User user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int MEMBERCOUNT_FIELD_NUMBER = 3; + private long memberCount_ = 0L; + /** + * uint64 memberCount = 3; + * @return The memberCount. + */ + @java.lang.Override + public long getMemberCount() { + return memberCount_; + } + + public static final int OPERATOR_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User operator_; + /** + * .User operator = 4; + * @return Whether the operator field is set. + */ + @java.lang.Override + public boolean hasOperator() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .User operator = 4; + * @return The operator. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getOperator() { + return operator_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } + /** + * .User operator = 4; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getOperatorOrBuilder() { + return operator_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } + + public static final int ISSETTOADMIN_FIELD_NUMBER = 5; + private boolean isSetToAdmin_ = false; + /** + * bool isSetToAdmin = 5; + * @return The isSetToAdmin. + */ + @java.lang.Override + public boolean getIsSetToAdmin() { + return isSetToAdmin_; + } + + public static final int ISTOPUSER_FIELD_NUMBER = 6; + private boolean isTopUser_ = false; + /** + * bool isTopUser = 6; + * @return The isTopUser. + */ + @java.lang.Override + public boolean getIsTopUser() { + return isTopUser_; + } + + public static final int RANKSCORE_FIELD_NUMBER = 7; + private long rankScore_ = 0L; + /** + * int64 rankScore = 7; + * @return The rankScore. + */ + @java.lang.Override + public long getRankScore() { + return rankScore_; + } + + public static final int TOPUSERNO_FIELD_NUMBER = 8; + private long topUserNo_ = 0L; + /** + * int64 topUserNo = 8; + * @return The topUserNo. + */ + @java.lang.Override + public long getTopUserNo() { + return topUserNo_; + } + + public static final int ENTERTYPE_FIELD_NUMBER = 9; + private long enterType_ = 0L; + /** + * int64 enterType = 9; + * @return The enterType. + */ + @java.lang.Override + public long getEnterType() { + return enterType_; + } + + public static final int ACTION_FIELD_NUMBER = 10; + private long action_ = 0L; + /** + * int64 action = 10; + * @return The action. + */ + @java.lang.Override + public long getAction() { + return action_; + } + + public static final int ACTIONDESCRIPTION_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object actionDescription_ = ""; + /** + * string actionDescription = 11; + * @return The actionDescription. + */ + @java.lang.Override + public java.lang.String getActionDescription() { + java.lang.Object ref = actionDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionDescription_ = s; + return s; + } + } + /** + * string actionDescription = 11; + * @return The bytes for actionDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getActionDescriptionBytes() { + java.lang.Object ref = actionDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + actionDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERID_FIELD_NUMBER = 12; + private long userId_ = 0L; + /** + * int64 userId = 12; + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + + public static final int POPSTR_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object popStr_ = ""; + /** + *
+     * EffectConfig effectConfig = 13;
+     * 
+ * + * string popStr = 14; + * @return The popStr. + */ + @java.lang.Override + public java.lang.String getPopStr() { + java.lang.Object ref = popStr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + popStr_ = s; + return s; + } + } + /** + *
+     * EffectConfig effectConfig = 13;
+     * 
+ * + * string popStr = 14; + * @return The bytes for popStr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPopStrBytes() { + java.lang.Object ref = popStr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + popStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKGROUNDIMAGE_FIELD_NUMBER = 16; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + /** + *
+     * EffectConfig enterEffectConfig = 15;
+     * 
+ * + * .Image backgroundImage = 16; + * @return Whether the backgroundImage field is set. + */ + @java.lang.Override + public boolean hasBackgroundImage() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * EffectConfig enterEffectConfig = 15;
+     * 
+ * + * .Image backgroundImage = 16; + * @return The backgroundImage. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + /** + *
+     * EffectConfig enterEffectConfig = 15;
+     * 
+ * + * .Image backgroundImage = 16; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + + public static final int BACKGROUNDIMAGEV2_FIELD_NUMBER = 17; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + /** + * .Image backgroundImageV2 = 17; + * @return Whether the backgroundImageV2 field is set. + */ + @java.lang.Override + public boolean hasBackgroundImageV2() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .Image backgroundImageV2 = 17; + * @return The backgroundImageV2. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + /** + * .Image backgroundImageV2 = 17; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + + public static final int ANCHORDISPLAYTEXT_FIELD_NUMBER = 18; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text anchorDisplayText_; + /** + * .Text anchorDisplayText = 18; + * @return Whether the anchorDisplayText field is set. + */ + @java.lang.Override + public boolean hasAnchorDisplayText() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .Text anchorDisplayText = 18; + * @return The anchorDisplayText. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getAnchorDisplayText() { + return anchorDisplayText_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } + /** + * .Text anchorDisplayText = 18; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getAnchorDisplayTextOrBuilder() { + return anchorDisplayText_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } + + public static final int USERENTERTIPTYPE_FIELD_NUMBER = 20; + private long userEnterTipType_ = 0L; + /** + *
+     * PublicAreaCommon publicAreaCommon = 19;
+     * 
+ * + * int64 userEnterTipType = 20; + * @return The userEnterTipType. + */ + @java.lang.Override + public long getUserEnterTipType() { + return userEnterTipType_; + } + + public static final int ANCHORENTERTIPTYPE_FIELD_NUMBER = 21; + private long anchorEnterTipType_ = 0L; + /** + * int64 anchorEnterTipType = 21; + * @return The anchorEnterTipType. + */ + @java.lang.Override + public long getAnchorEnterTipType() { + return anchorEnterTipType_; + } + + public static final int BURIEDPOINTMAP_FIELD_NUMBER = 22; + private static final class BuriedPointMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_BuriedPointMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buriedPointMap_; + private com.google.protobuf.MapField + internalGetBuriedPointMap() { + if (buriedPointMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuriedPointMapDefaultEntryHolder.defaultEntry); + } + return buriedPointMap_; + } + public int getBuriedPointMapCount() { + return internalGetBuriedPointMap().getMap().size(); + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public boolean containsBuriedPointMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuriedPointMap().getMap().containsKey(key); + } + /** + * Use {@link #getBuriedPointMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuriedPointMap() { + return getBuriedPointMapMap(); + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public java.util.Map getBuriedPointMapMap() { + return internalGetBuriedPointMap().getMap(); + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuriedPointMapOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuriedPointMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public java.lang.String getBuriedPointMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuriedPointMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUser()); + } + if (memberCount_ != 0L) { + output.writeUInt64(3, memberCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getOperator()); + } + if (isSetToAdmin_ != false) { + output.writeBool(5, isSetToAdmin_); + } + if (isTopUser_ != false) { + output.writeBool(6, isTopUser_); + } + if (rankScore_ != 0L) { + output.writeInt64(7, rankScore_); + } + if (topUserNo_ != 0L) { + output.writeInt64(8, topUserNo_); + } + if (enterType_ != 0L) { + output.writeInt64(9, enterType_); + } + if (action_ != 0L) { + output.writeInt64(10, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, actionDescription_); + } + if (userId_ != 0L) { + output.writeInt64(12, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(popStr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, popStr_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(16, getBackgroundImage()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(17, getBackgroundImageV2()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(18, getAnchorDisplayText()); + } + if (userEnterTipType_ != 0L) { + output.writeInt64(20, userEnterTipType_); + } + if (anchorEnterTipType_ != 0L) { + output.writeInt64(21, anchorEnterTipType_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetBuriedPointMap(), + BuriedPointMapDefaultEntryHolder.defaultEntry, + 22); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (memberCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, memberCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOperator()); + } + if (isSetToAdmin_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, isSetToAdmin_); + } + if (isTopUser_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, isTopUser_); + } + if (rankScore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, rankScore_); + } + if (topUserNo_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, topUserNo_); + } + if (enterType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, enterType_); + } + if (action_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, actionDescription_); + } + if (userId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(popStr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, popStr_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getBackgroundImage()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getBackgroundImageV2()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getAnchorDisplayText()); + } + if (userEnterTipType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(20, userEnterTipType_); + } + if (anchorEnterTipType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(21, anchorEnterTipType_); + } + for (java.util.Map.Entry entry + : internalGetBuriedPointMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + buriedPointMap__ = BuriedPointMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, buriedPointMap__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getMemberCount() + != other.getMemberCount()) return false; + if (hasOperator() != other.hasOperator()) return false; + if (hasOperator()) { + if (!getOperator() + .equals(other.getOperator())) return false; + } + if (getIsSetToAdmin() + != other.getIsSetToAdmin()) return false; + if (getIsTopUser() + != other.getIsTopUser()) return false; + if (getRankScore() + != other.getRankScore()) return false; + if (getTopUserNo() + != other.getTopUserNo()) return false; + if (getEnterType() + != other.getEnterType()) return false; + if (getAction() + != other.getAction()) return false; + if (!getActionDescription() + .equals(other.getActionDescription())) return false; + if (getUserId() + != other.getUserId()) return false; + if (!getPopStr() + .equals(other.getPopStr())) return false; + if (hasBackgroundImage() != other.hasBackgroundImage()) return false; + if (hasBackgroundImage()) { + if (!getBackgroundImage() + .equals(other.getBackgroundImage())) return false; + } + if (hasBackgroundImageV2() != other.hasBackgroundImageV2()) return false; + if (hasBackgroundImageV2()) { + if (!getBackgroundImageV2() + .equals(other.getBackgroundImageV2())) return false; + } + if (hasAnchorDisplayText() != other.hasAnchorDisplayText()) return false; + if (hasAnchorDisplayText()) { + if (!getAnchorDisplayText() + .equals(other.getAnchorDisplayText())) return false; + } + if (getUserEnterTipType() + != other.getUserEnterTipType()) return false; + if (getAnchorEnterTipType() + != other.getAnchorEnterTipType()) return false; + if (!internalGetBuriedPointMap().equals( + other.internalGetBuriedPointMap())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + MEMBERCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMemberCount()); + if (hasOperator()) { + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + getOperator().hashCode(); + } + hash = (37 * hash) + ISSETTOADMIN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsSetToAdmin()); + hash = (37 * hash) + ISTOPUSER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsTopUser()); + hash = (37 * hash) + RANKSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRankScore()); + hash = (37 * hash) + TOPUSERNO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTopUserNo()); + hash = (37 * hash) + ENTERTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEnterType()); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAction()); + hash = (37 * hash) + ACTIONDESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getActionDescription().hashCode(); + hash = (37 * hash) + USERID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserId()); + hash = (37 * hash) + POPSTR_FIELD_NUMBER; + hash = (53 * hash) + getPopStr().hashCode(); + if (hasBackgroundImage()) { + hash = (37 * hash) + BACKGROUNDIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImage().hashCode(); + } + if (hasBackgroundImageV2()) { + hash = (37 * hash) + BACKGROUNDIMAGEV2_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImageV2().hashCode(); + } + if (hasAnchorDisplayText()) { + hash = (37 * hash) + ANCHORDISPLAYTEXT_FIELD_NUMBER; + hash = (53 * hash) + getAnchorDisplayText().hashCode(); + } + hash = (37 * hash) + USERENTERTIPTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserEnterTipType()); + hash = (37 * hash) + ANCHORENTERTIPTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorEnterTipType()); + if (!internalGetBuriedPointMap().getMap().isEmpty()) { + hash = (37 * hash) + BURIEDPOINTMAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetBuriedPointMap().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastMemberMessageMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastMemberMessageMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 22: + return internalGetBuriedPointMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 22: + return internalGetMutableBuriedPointMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCommonFieldBuilder(); + getUserFieldBuilder(); + getOperatorFieldBuilder(); + getBackgroundImageFieldBuilder(); + getBackgroundImageV2FieldBuilder(); + getAnchorDisplayTextFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + memberCount_ = 0L; + operator_ = null; + if (operatorBuilder_ != null) { + operatorBuilder_.dispose(); + operatorBuilder_ = null; + } + isSetToAdmin_ = false; + isTopUser_ = false; + rankScore_ = 0L; + topUserNo_ = 0L; + enterType_ = 0L; + action_ = 0L; + actionDescription_ = ""; + userId_ = 0L; + popStr_ = ""; + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + anchorDisplayText_ = null; + if (anchorDisplayTextBuilder_ != null) { + anchorDisplayTextBuilder_.dispose(); + anchorDisplayTextBuilder_ = null; + } + userEnterTipType_ = 0L; + anchorEnterTipType_ = 0L; + internalGetMutableBuriedPointMap().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.memberCount_ = memberCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.operator_ = operatorBuilder_ == null + ? operator_ + : operatorBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.isSetToAdmin_ = isSetToAdmin_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.isTopUser_ = isTopUser_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.rankScore_ = rankScore_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.topUserNo_ = topUserNo_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.enterType_ = enterType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.actionDescription_ = actionDescription_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.popStr_ = popStr_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.backgroundImage_ = backgroundImageBuilder_ == null + ? backgroundImage_ + : backgroundImageBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.backgroundImageV2_ = backgroundImageV2Builder_ == null + ? backgroundImageV2_ + : backgroundImageV2Builder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.anchorDisplayText_ = anchorDisplayTextBuilder_ == null + ? anchorDisplayText_ + : anchorDisplayTextBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.userEnterTipType_ = userEnterTipType_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.anchorEnterTipType_ = anchorEnterTipType_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.buriedPointMap_ = internalGetBuriedPointMap(); + result.buriedPointMap_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getMemberCount() != 0L) { + setMemberCount(other.getMemberCount()); + } + if (other.hasOperator()) { + mergeOperator(other.getOperator()); + } + if (other.getIsSetToAdmin() != false) { + setIsSetToAdmin(other.getIsSetToAdmin()); + } + if (other.getIsTopUser() != false) { + setIsTopUser(other.getIsTopUser()); + } + if (other.getRankScore() != 0L) { + setRankScore(other.getRankScore()); + } + if (other.getTopUserNo() != 0L) { + setTopUserNo(other.getTopUserNo()); + } + if (other.getEnterType() != 0L) { + setEnterType(other.getEnterType()); + } + if (other.getAction() != 0L) { + setAction(other.getAction()); + } + if (!other.getActionDescription().isEmpty()) { + actionDescription_ = other.actionDescription_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.getUserId() != 0L) { + setUserId(other.getUserId()); + } + if (!other.getPopStr().isEmpty()) { + popStr_ = other.popStr_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.hasBackgroundImage()) { + mergeBackgroundImage(other.getBackgroundImage()); + } + if (other.hasBackgroundImageV2()) { + mergeBackgroundImageV2(other.getBackgroundImageV2()); + } + if (other.hasAnchorDisplayText()) { + mergeAnchorDisplayText(other.getAnchorDisplayText()); + } + if (other.getUserEnterTipType() != 0L) { + setUserEnterTipType(other.getUserEnterTipType()); + } + if (other.getAnchorEnterTipType() != 0L) { + setAnchorEnterTipType(other.getAnchorEnterTipType()); + } + internalGetMutableBuriedPointMap().mergeFrom( + other.internalGetBuriedPointMap()); + bitField0_ |= 0x00040000; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + memberCount_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getOperatorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + isSetToAdmin_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + isTopUser_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + rankScore_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + topUserNo_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + enterType_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + action_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 90: { + actionDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: { + userId_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 114: { + popStr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 130: { + input.readMessage( + getBackgroundImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 130 + case 138: { + input.readMessage( + getBackgroundImageV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 138 + case 146: { + input.readMessage( + getAnchorDisplayTextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 146 + case 160: { + userEnterTipType_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 160 + case 168: { + anchorEnterTipType_ = input.readInt64(); + bitField0_ |= 0x00020000; + break; + } // case 168 + case 178: { + com.google.protobuf.MapEntry + buriedPointMap__ = input.readMessage( + BuriedPointMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableBuriedPointMap().getMutableMap().put( + buriedPointMap__.getKey(), buriedPointMap__.getValue()); + bitField0_ |= 0x00040000; + break; + } // case 178 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * .Common common = 1; + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + if (common_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Common common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * .Common common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * .User user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .User user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .User user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .User user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * .User user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long memberCount_ ; + /** + * uint64 memberCount = 3; + * @return The memberCount. + */ + @java.lang.Override + public long getMemberCount() { + return memberCount_; + } + /** + * uint64 memberCount = 3; + * @param value The memberCount to set. + * @return This builder for chaining. + */ + public Builder setMemberCount(long value) { + + memberCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 memberCount = 3; + * @return This builder for chaining. + */ + public Builder clearMemberCount() { + bitField0_ = (bitField0_ & ~0x00000004); + memberCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User operator_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> operatorBuilder_; + /** + * .User operator = 4; + * @return Whether the operator field is set. + */ + public boolean hasOperator() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .User operator = 4; + * @return The operator. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getOperator() { + if (operatorBuilder_ == null) { + return operator_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } else { + return operatorBuilder_.getMessage(); + } + } + /** + * .User operator = 4; + */ + public Builder setOperator(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (operatorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operator_ = value; + } else { + operatorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User operator = 4; + */ + public Builder setOperator( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (operatorBuilder_ == null) { + operator_ = builderForValue.build(); + } else { + operatorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User operator = 4; + */ + public Builder mergeOperator(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (operatorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + operator_ != null && + operator_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getOperatorBuilder().mergeFrom(value); + } else { + operator_ = value; + } + } else { + operatorBuilder_.mergeFrom(value); + } + if (operator_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .User operator = 4; + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000008); + operator_ = null; + if (operatorBuilder_ != null) { + operatorBuilder_.dispose(); + operatorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User operator = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getOperatorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getOperatorFieldBuilder().getBuilder(); + } + /** + * .User operator = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getOperatorOrBuilder() { + if (operatorBuilder_ != null) { + return operatorBuilder_.getMessageOrBuilder(); + } else { + return operator_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } + } + /** + * .User operator = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getOperatorFieldBuilder() { + if (operatorBuilder_ == null) { + operatorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getOperator(), + getParentForChildren(), + isClean()); + operator_ = null; + } + return operatorBuilder_; + } + + private boolean isSetToAdmin_ ; + /** + * bool isSetToAdmin = 5; + * @return The isSetToAdmin. + */ + @java.lang.Override + public boolean getIsSetToAdmin() { + return isSetToAdmin_; + } + /** + * bool isSetToAdmin = 5; + * @param value The isSetToAdmin to set. + * @return This builder for chaining. + */ + public Builder setIsSetToAdmin(boolean value) { + + isSetToAdmin_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool isSetToAdmin = 5; + * @return This builder for chaining. + */ + public Builder clearIsSetToAdmin() { + bitField0_ = (bitField0_ & ~0x00000010); + isSetToAdmin_ = false; + onChanged(); + return this; + } + + private boolean isTopUser_ ; + /** + * bool isTopUser = 6; + * @return The isTopUser. + */ + @java.lang.Override + public boolean getIsTopUser() { + return isTopUser_; + } + /** + * bool isTopUser = 6; + * @param value The isTopUser to set. + * @return This builder for chaining. + */ + public Builder setIsTopUser(boolean value) { + + isTopUser_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bool isTopUser = 6; + * @return This builder for chaining. + */ + public Builder clearIsTopUser() { + bitField0_ = (bitField0_ & ~0x00000020); + isTopUser_ = false; + onChanged(); + return this; + } + + private long rankScore_ ; + /** + * int64 rankScore = 7; + * @return The rankScore. + */ + @java.lang.Override + public long getRankScore() { + return rankScore_; + } + /** + * int64 rankScore = 7; + * @param value The rankScore to set. + * @return This builder for chaining. + */ + public Builder setRankScore(long value) { + + rankScore_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int64 rankScore = 7; + * @return This builder for chaining. + */ + public Builder clearRankScore() { + bitField0_ = (bitField0_ & ~0x00000040); + rankScore_ = 0L; + onChanged(); + return this; + } + + private long topUserNo_ ; + /** + * int64 topUserNo = 8; + * @return The topUserNo. + */ + @java.lang.Override + public long getTopUserNo() { + return topUserNo_; + } + /** + * int64 topUserNo = 8; + * @param value The topUserNo to set. + * @return This builder for chaining. + */ + public Builder setTopUserNo(long value) { + + topUserNo_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * int64 topUserNo = 8; + * @return This builder for chaining. + */ + public Builder clearTopUserNo() { + bitField0_ = (bitField0_ & ~0x00000080); + topUserNo_ = 0L; + onChanged(); + return this; + } + + private long enterType_ ; + /** + * int64 enterType = 9; + * @return The enterType. + */ + @java.lang.Override + public long getEnterType() { + return enterType_; + } + /** + * int64 enterType = 9; + * @param value The enterType to set. + * @return This builder for chaining. + */ + public Builder setEnterType(long value) { + + enterType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int64 enterType = 9; + * @return This builder for chaining. + */ + public Builder clearEnterType() { + bitField0_ = (bitField0_ & ~0x00000100); + enterType_ = 0L; + onChanged(); + return this; + } + + private long action_ ; + /** + * int64 action = 10; + * @return The action. + */ + @java.lang.Override + public long getAction() { + return action_; + } + /** + * int64 action = 10; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(long value) { + + action_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * int64 action = 10; + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000200); + action_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object actionDescription_ = ""; + /** + * string actionDescription = 11; + * @return The actionDescription. + */ + public java.lang.String getActionDescription() { + java.lang.Object ref = actionDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string actionDescription = 11; + * @return The bytes for actionDescription. + */ + public com.google.protobuf.ByteString + getActionDescriptionBytes() { + java.lang.Object ref = actionDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + actionDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string actionDescription = 11; + * @param value The actionDescription to set. + * @return This builder for chaining. + */ + public Builder setActionDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + actionDescription_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * string actionDescription = 11; + * @return This builder for chaining. + */ + public Builder clearActionDescription() { + actionDescription_ = getDefaultInstance().getActionDescription(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * string actionDescription = 11; + * @param value The bytes for actionDescription to set. + * @return This builder for chaining. + */ + public Builder setActionDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + actionDescription_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private long userId_ ; + /** + * int64 userId = 12; + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + /** + * int64 userId = 12; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(long value) { + + userId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * int64 userId = 12; + * @return This builder for chaining. + */ + public Builder clearUserId() { + bitField0_ = (bitField0_ & ~0x00000800); + userId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object popStr_ = ""; + /** + *
+       * EffectConfig effectConfig = 13;
+       * 
+ * + * string popStr = 14; + * @return The popStr. + */ + public java.lang.String getPopStr() { + java.lang.Object ref = popStr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + popStr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * EffectConfig effectConfig = 13;
+       * 
+ * + * string popStr = 14; + * @return The bytes for popStr. + */ + public com.google.protobuf.ByteString + getPopStrBytes() { + java.lang.Object ref = popStr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + popStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * EffectConfig effectConfig = 13;
+       * 
+ * + * string popStr = 14; + * @param value The popStr to set. + * @return This builder for chaining. + */ + public Builder setPopStr( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + popStr_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+       * EffectConfig effectConfig = 13;
+       * 
+ * + * string popStr = 14; + * @return This builder for chaining. + */ + public Builder clearPopStr() { + popStr_ = getDefaultInstance().getPopStr(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + *
+       * EffectConfig effectConfig = 13;
+       * 
+ * + * string popStr = 14; + * @param value The bytes for popStr to set. + * @return This builder for chaining. + */ + public Builder setPopStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + popStr_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageBuilder_; + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + * @return Whether the backgroundImage field is set. + */ + public boolean hasBackgroundImage() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + * @return The backgroundImage. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + if (backgroundImageBuilder_ == null) { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } else { + return backgroundImageBuilder_.getMessage(); + } + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + */ + public Builder setBackgroundImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImage_ = value; + } else { + backgroundImageBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + */ + public Builder setBackgroundImage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageBuilder_ == null) { + backgroundImage_ = builderForValue.build(); + } else { + backgroundImageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + */ + public Builder mergeBackgroundImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + backgroundImage_ != null && + backgroundImage_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageBuilder().mergeFrom(value); + } else { + backgroundImage_ = value; + } + } else { + backgroundImageBuilder_.mergeFrom(value); + } + if (backgroundImage_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + */ + public Builder clearBackgroundImage() { + bitField0_ = (bitField0_ & ~0x00002000); + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getBackgroundImageFieldBuilder().getBuilder(); + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + if (backgroundImageBuilder_ != null) { + return backgroundImageBuilder_.getMessageOrBuilder(); + } else { + return backgroundImage_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + } + /** + *
+       * EffectConfig enterEffectConfig = 15;
+       * 
+ * + * .Image backgroundImage = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageFieldBuilder() { + if (backgroundImageBuilder_ == null) { + backgroundImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImage(), + getParentForChildren(), + isClean()); + backgroundImage_ = null; + } + return backgroundImageBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageV2Builder_; + /** + * .Image backgroundImageV2 = 17; + * @return Whether the backgroundImageV2 field is set. + */ + public boolean hasBackgroundImageV2() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * .Image backgroundImageV2 = 17; + * @return The backgroundImageV2. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + if (backgroundImageV2Builder_ == null) { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } else { + return backgroundImageV2Builder_.getMessage(); + } + } + /** + * .Image backgroundImageV2 = 17; + */ + public Builder setBackgroundImageV2(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImageV2_ = value; + } else { + backgroundImageV2Builder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * .Image backgroundImageV2 = 17; + */ + public Builder setBackgroundImageV2( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2_ = builderForValue.build(); + } else { + backgroundImageV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * .Image backgroundImageV2 = 17; + */ + public Builder mergeBackgroundImageV2(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (((bitField0_ & 0x00004000) != 0) && + backgroundImageV2_ != null && + backgroundImageV2_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageV2Builder().mergeFrom(value); + } else { + backgroundImageV2_ = value; + } + } else { + backgroundImageV2Builder_.mergeFrom(value); + } + if (backgroundImageV2_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * .Image backgroundImageV2 = 17; + */ + public Builder clearBackgroundImageV2() { + bitField0_ = (bitField0_ & ~0x00004000); + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * .Image backgroundImageV2 = 17; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageV2Builder() { + bitField0_ |= 0x00004000; + onChanged(); + return getBackgroundImageV2FieldBuilder().getBuilder(); + } + /** + * .Image backgroundImageV2 = 17; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + if (backgroundImageV2Builder_ != null) { + return backgroundImageV2Builder_.getMessageOrBuilder(); + } else { + return backgroundImageV2_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + } + /** + * .Image backgroundImageV2 = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageV2FieldBuilder() { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImageV2(), + getParentForChildren(), + isClean()); + backgroundImageV2_ = null; + } + return backgroundImageV2Builder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text anchorDisplayText_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> anchorDisplayTextBuilder_; + /** + * .Text anchorDisplayText = 18; + * @return Whether the anchorDisplayText field is set. + */ + public boolean hasAnchorDisplayText() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * .Text anchorDisplayText = 18; + * @return The anchorDisplayText. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getAnchorDisplayText() { + if (anchorDisplayTextBuilder_ == null) { + return anchorDisplayText_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } else { + return anchorDisplayTextBuilder_.getMessage(); + } + } + /** + * .Text anchorDisplayText = 18; + */ + public Builder setAnchorDisplayText(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text value) { + if (anchorDisplayTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anchorDisplayText_ = value; + } else { + anchorDisplayTextBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * .Text anchorDisplayText = 18; + */ + public Builder setAnchorDisplayText( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder builderForValue) { + if (anchorDisplayTextBuilder_ == null) { + anchorDisplayText_ = builderForValue.build(); + } else { + anchorDisplayTextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * .Text anchorDisplayText = 18; + */ + public Builder mergeAnchorDisplayText(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text value) { + if (anchorDisplayTextBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) && + anchorDisplayText_ != null && + anchorDisplayText_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) { + getAnchorDisplayTextBuilder().mergeFrom(value); + } else { + anchorDisplayText_ = value; + } + } else { + anchorDisplayTextBuilder_.mergeFrom(value); + } + if (anchorDisplayText_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * .Text anchorDisplayText = 18; + */ + public Builder clearAnchorDisplayText() { + bitField0_ = (bitField0_ & ~0x00008000); + anchorDisplayText_ = null; + if (anchorDisplayTextBuilder_ != null) { + anchorDisplayTextBuilder_.dispose(); + anchorDisplayTextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Text anchorDisplayText = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder getAnchorDisplayTextBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getAnchorDisplayTextFieldBuilder().getBuilder(); + } + /** + * .Text anchorDisplayText = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getAnchorDisplayTextOrBuilder() { + if (anchorDisplayTextBuilder_ != null) { + return anchorDisplayTextBuilder_.getMessageOrBuilder(); + } else { + return anchorDisplayText_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } + } + /** + * .Text anchorDisplayText = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> + getAnchorDisplayTextFieldBuilder() { + if (anchorDisplayTextBuilder_ == null) { + anchorDisplayTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder>( + getAnchorDisplayText(), + getParentForChildren(), + isClean()); + anchorDisplayText_ = null; + } + return anchorDisplayTextBuilder_; + } + + private long userEnterTipType_ ; + /** + *
+       * PublicAreaCommon publicAreaCommon = 19;
+       * 
+ * + * int64 userEnterTipType = 20; + * @return The userEnterTipType. + */ + @java.lang.Override + public long getUserEnterTipType() { + return userEnterTipType_; + } + /** + *
+       * PublicAreaCommon publicAreaCommon = 19;
+       * 
+ * + * int64 userEnterTipType = 20; + * @param value The userEnterTipType to set. + * @return This builder for chaining. + */ + public Builder setUserEnterTipType(long value) { + + userEnterTipType_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+       * PublicAreaCommon publicAreaCommon = 19;
+       * 
+ * + * int64 userEnterTipType = 20; + * @return This builder for chaining. + */ + public Builder clearUserEnterTipType() { + bitField0_ = (bitField0_ & ~0x00010000); + userEnterTipType_ = 0L; + onChanged(); + return this; + } + + private long anchorEnterTipType_ ; + /** + * int64 anchorEnterTipType = 21; + * @return The anchorEnterTipType. + */ + @java.lang.Override + public long getAnchorEnterTipType() { + return anchorEnterTipType_; + } + /** + * int64 anchorEnterTipType = 21; + * @param value The anchorEnterTipType to set. + * @return This builder for chaining. + */ + public Builder setAnchorEnterTipType(long value) { + + anchorEnterTipType_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * int64 anchorEnterTipType = 21; + * @return This builder for chaining. + */ + public Builder clearAnchorEnterTipType() { + bitField0_ = (bitField0_ & ~0x00020000); + anchorEnterTipType_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buriedPointMap_; + private com.google.protobuf.MapField + internalGetBuriedPointMap() { + if (buriedPointMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuriedPointMapDefaultEntryHolder.defaultEntry); + } + return buriedPointMap_; + } + private com.google.protobuf.MapField + internalGetMutableBuriedPointMap() { + if (buriedPointMap_ == null) { + buriedPointMap_ = com.google.protobuf.MapField.newMapField( + BuriedPointMapDefaultEntryHolder.defaultEntry); + } + if (!buriedPointMap_.isMutable()) { + buriedPointMap_ = buriedPointMap_.copy(); + } + bitField0_ |= 0x00040000; + onChanged(); + return buriedPointMap_; + } + public int getBuriedPointMapCount() { + return internalGetBuriedPointMap().getMap().size(); + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public boolean containsBuriedPointMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuriedPointMap().getMap().containsKey(key); + } + /** + * Use {@link #getBuriedPointMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuriedPointMap() { + return getBuriedPointMapMap(); + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public java.util.Map getBuriedPointMapMap() { + return internalGetBuriedPointMap().getMap(); + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuriedPointMapOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuriedPointMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> buriedPointMap = 22; + */ + @java.lang.Override + public java.lang.String getBuriedPointMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetBuriedPointMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearBuriedPointMap() { + bitField0_ = (bitField0_ & ~0x00040000); + internalGetMutableBuriedPointMap().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> buriedPointMap = 22; + */ + public Builder removeBuriedPointMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableBuriedPointMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableBuriedPointMap() { + bitField0_ |= 0x00040000; + return internalGetMutableBuriedPointMap().getMutableMap(); + } + /** + * map<string, string> buriedPointMap = 22; + */ + public Builder putBuriedPointMap( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableBuriedPointMap().getMutableMap() + .put(key, value); + bitField0_ |= 0x00040000; + return this; + } + /** + * map<string, string> buriedPointMap = 22; + */ + public Builder putAllBuriedPointMap( + java.util.Map values) { + internalGetMutableBuriedPointMap().getMutableMap() + .putAll(values); + bitField0_ |= 0x00040000; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastMemberMessageMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastMemberMessageMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebcastMemberMessageMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_BuriedPointMapEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_BuriedPointMapEntry_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#DouyinWebcastMemberMessageMsg.proto\0222t" + + "ech.ordinaryroad.live.chat.client.douyin" + + ".protobuf\032\014Common.proto\032\nUser.proto\032\013Ima" + + "ge.proto\032\nText.proto\"\372\004\n\035DouyinWebcastMe" + + "mberMessageMsg\022\027\n\006common\030\001 \001(\0132\007.Common\022" + + "\023\n\004user\030\002 \001(\0132\005.User\022\023\n\013memberCount\030\003 \001(" + + "\004\022\027\n\010operator\030\004 \001(\0132\005.User\022\024\n\014isSetToAdm" + + "in\030\005 \001(\010\022\021\n\tisTopUser\030\006 \001(\010\022\021\n\trankScore" + + "\030\007 \001(\003\022\021\n\ttopUserNo\030\010 \001(\003\022\021\n\tenterType\030\t" + + " \001(\003\022\016\n\006action\030\n \001(\003\022\031\n\021actionDescriptio" + + "n\030\013 \001(\t\022\016\n\006userId\030\014 \001(\003\022\016\n\006popStr\030\016 \001(\t\022" + + "\037\n\017backgroundImage\030\020 \001(\0132\006.Image\022!\n\021back" + + "groundImageV2\030\021 \001(\0132\006.Image\022 \n\021anchorDis" + + "playText\030\022 \001(\0132\005.Text\022\030\n\020userEnterTipTyp" + + "e\030\024 \001(\003\022\032\n\022anchorEnterTipType\030\025 \001(\003\022}\n\016b" + + "uriedPointMap\030\026 \003(\0132e.tech.ordinaryroad." + + "live.chat.client.douyin.protobuf.DouyinW" + + "ebcastMemberMessageMsg.BuriedPointMapEnt" + + "ry\0325\n\023BuriedPointMapEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001B:\n8tech.ordinaryroad.l" + + "ive.chat.client.codec.douyin.protobufb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_descriptor, + new java.lang.String[] { "Common", "User", "MemberCount", "Operator", "IsSetToAdmin", "IsTopUser", "RankScore", "TopUserNo", "EnterType", "Action", "ActionDescription", "UserId", "PopStr", "BackgroundImage", "BackgroundImageV2", "AnchorDisplayText", "UserEnterTipType", "AnchorEnterTipType", "BuriedPointMap", }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_BuriedPointMapEntry_descriptor = + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_descriptor.getNestedTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_BuriedPointMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastMemberMessageMsg_BuriedPointMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastRoomStatsMessageMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastRoomStatsMessageMsgOuterClass.java new file mode 100644 index 0000000..51d5f64 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastRoomStatsMessageMsgOuterClass.java @@ -0,0 +1,1577 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebcastRoomStatsMessageMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebcastRoomStatsMessageMsgOuterClass { + private DouyinWebcastRoomStatsMessageMsgOuterClass() {} + 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 DouyinWebcastRoomStatsMessageMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastRoomStatsMessageMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * .Common common = 1; + * @return The common. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * .Common common = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * string displayShort = 2; + * @return The displayShort. + */ + java.lang.String getDisplayShort(); + /** + * string displayShort = 2; + * @return The bytes for displayShort. + */ + com.google.protobuf.ByteString + getDisplayShortBytes(); + + /** + * string displayMiddle = 3; + * @return The displayMiddle. + */ + java.lang.String getDisplayMiddle(); + /** + * string displayMiddle = 3; + * @return The bytes for displayMiddle. + */ + com.google.protobuf.ByteString + getDisplayMiddleBytes(); + + /** + * string displayLong = 4; + * @return The displayLong. + */ + java.lang.String getDisplayLong(); + /** + * string displayLong = 4; + * @return The bytes for displayLong. + */ + com.google.protobuf.ByteString + getDisplayLongBytes(); + + /** + * int64 displayValue = 5; + * @return The displayValue. + */ + long getDisplayValue(); + + /** + * int64 displayVersion = 6; + * @return The displayVersion. + */ + long getDisplayVersion(); + + /** + * bool incremental = 7; + * @return The incremental. + */ + boolean getIncremental(); + + /** + * bool isHidden = 8; + * @return The isHidden. + */ + boolean getIsHidden(); + + /** + * int64 total = 9; + * @return The total. + */ + long getTotal(); + + /** + * int64 displayType = 10; + * @return The displayType. + */ + long getDisplayType(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastRoomStatsMessageMsg} + */ + public static final class DouyinWebcastRoomStatsMessageMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastRoomStatsMessageMsg) + DouyinWebcastRoomStatsMessageMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebcastRoomStatsMessageMsg.newBuilder() to construct. + private DouyinWebcastRoomStatsMessageMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebcastRoomStatsMessageMsg() { + displayShort_ = ""; + displayMiddle_ = ""; + displayLong_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebcastRoomStatsMessageMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.Builder.class); + } + + private int bitField0_; + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * .Common common = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int DISPLAYSHORT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object displayShort_ = ""; + /** + * string displayShort = 2; + * @return The displayShort. + */ + @java.lang.Override + public java.lang.String getDisplayShort() { + java.lang.Object ref = displayShort_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayShort_ = s; + return s; + } + } + /** + * string displayShort = 2; + * @return The bytes for displayShort. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayShortBytes() { + java.lang.Object ref = displayShort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayShort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYMIDDLE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object displayMiddle_ = ""; + /** + * string displayMiddle = 3; + * @return The displayMiddle. + */ + @java.lang.Override + public java.lang.String getDisplayMiddle() { + java.lang.Object ref = displayMiddle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayMiddle_ = s; + return s; + } + } + /** + * string displayMiddle = 3; + * @return The bytes for displayMiddle. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayMiddleBytes() { + java.lang.Object ref = displayMiddle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayMiddle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYLONG_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object displayLong_ = ""; + /** + * string displayLong = 4; + * @return The displayLong. + */ + @java.lang.Override + public java.lang.String getDisplayLong() { + java.lang.Object ref = displayLong_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayLong_ = s; + return s; + } + } + /** + * string displayLong = 4; + * @return The bytes for displayLong. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayLongBytes() { + java.lang.Object ref = displayLong_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayLong_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYVALUE_FIELD_NUMBER = 5; + private long displayValue_ = 0L; + /** + * int64 displayValue = 5; + * @return The displayValue. + */ + @java.lang.Override + public long getDisplayValue() { + return displayValue_; + } + + public static final int DISPLAYVERSION_FIELD_NUMBER = 6; + private long displayVersion_ = 0L; + /** + * int64 displayVersion = 6; + * @return The displayVersion. + */ + @java.lang.Override + public long getDisplayVersion() { + return displayVersion_; + } + + public static final int INCREMENTAL_FIELD_NUMBER = 7; + private boolean incremental_ = false; + /** + * bool incremental = 7; + * @return The incremental. + */ + @java.lang.Override + public boolean getIncremental() { + return incremental_; + } + + public static final int ISHIDDEN_FIELD_NUMBER = 8; + private boolean isHidden_ = false; + /** + * bool isHidden = 8; + * @return The isHidden. + */ + @java.lang.Override + public boolean getIsHidden() { + return isHidden_; + } + + public static final int TOTAL_FIELD_NUMBER = 9; + private long total_ = 0L; + /** + * int64 total = 9; + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return total_; + } + + public static final int DISPLAYTYPE_FIELD_NUMBER = 10; + private long displayType_ = 0L; + /** + * int64 displayType = 10; + * @return The displayType. + */ + @java.lang.Override + public long getDisplayType() { + return displayType_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayShort_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayShort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayMiddle_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayMiddle_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLong_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayLong_); + } + if (displayValue_ != 0L) { + output.writeInt64(5, displayValue_); + } + if (displayVersion_ != 0L) { + output.writeInt64(6, displayVersion_); + } + if (incremental_ != false) { + output.writeBool(7, incremental_); + } + if (isHidden_ != false) { + output.writeBool(8, isHidden_); + } + if (total_ != 0L) { + output.writeInt64(9, total_); + } + if (displayType_ != 0L) { + output.writeInt64(10, displayType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayShort_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayShort_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayMiddle_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayMiddle_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLong_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayLong_); + } + if (displayValue_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, displayValue_); + } + if (displayVersion_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, displayVersion_); + } + if (incremental_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, incremental_); + } + if (isHidden_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, isHidden_); + } + if (total_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, total_); + } + if (displayType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, displayType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (!getDisplayShort() + .equals(other.getDisplayShort())) return false; + if (!getDisplayMiddle() + .equals(other.getDisplayMiddle())) return false; + if (!getDisplayLong() + .equals(other.getDisplayLong())) return false; + if (getDisplayValue() + != other.getDisplayValue()) return false; + if (getDisplayVersion() + != other.getDisplayVersion()) return false; + if (getIncremental() + != other.getIncremental()) return false; + if (getIsHidden() + != other.getIsHidden()) return false; + if (getTotal() + != other.getTotal()) return false; + if (getDisplayType() + != other.getDisplayType()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (37 * hash) + DISPLAYSHORT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayShort().hashCode(); + hash = (37 * hash) + DISPLAYMIDDLE_FIELD_NUMBER; + hash = (53 * hash) + getDisplayMiddle().hashCode(); + hash = (37 * hash) + DISPLAYLONG_FIELD_NUMBER; + hash = (53 * hash) + getDisplayLong().hashCode(); + hash = (37 * hash) + DISPLAYVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayValue()); + hash = (37 * hash) + DISPLAYVERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayVersion()); + hash = (37 * hash) + INCREMENTAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncremental()); + hash = (37 * hash) + ISHIDDEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsHidden()); + hash = (37 * hash) + TOTAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotal()); + hash = (37 * hash) + DISPLAYTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayType()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastRoomStatsMessageMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastRoomStatsMessageMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCommonFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + displayShort_ = ""; + displayMiddle_ = ""; + displayLong_ = ""; + displayValue_ = 0L; + displayVersion_ = 0L; + incremental_ = false; + isHidden_ = false; + total_ = 0L; + displayType_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayShort_ = displayShort_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayMiddle_ = displayMiddle_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayLong_ = displayLong_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayValue_ = displayValue_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.displayVersion_ = displayVersion_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.incremental_ = incremental_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.isHidden_ = isHidden_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.total_ = total_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.displayType_ = displayType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (!other.getDisplayShort().isEmpty()) { + displayShort_ = other.displayShort_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayMiddle().isEmpty()) { + displayMiddle_ = other.displayMiddle_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayLong().isEmpty()) { + displayLong_ = other.displayLong_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getDisplayValue() != 0L) { + setDisplayValue(other.getDisplayValue()); + } + if (other.getDisplayVersion() != 0L) { + setDisplayVersion(other.getDisplayVersion()); + } + if (other.getIncremental() != false) { + setIncremental(other.getIncremental()); + } + if (other.getIsHidden() != false) { + setIsHidden(other.getIsHidden()); + } + if (other.getTotal() != 0L) { + setTotal(other.getTotal()); + } + if (other.getDisplayType() != 0L) { + setDisplayType(other.getDisplayType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + displayShort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + displayMiddle_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + displayLong_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + displayValue_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + displayVersion_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + incremental_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + isHidden_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + total_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + displayType_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * .Common common = 1; + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + if (common_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Common common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * .Common common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private java.lang.Object displayShort_ = ""; + /** + * string displayShort = 2; + * @return The displayShort. + */ + public java.lang.String getDisplayShort() { + java.lang.Object ref = displayShort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayShort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayShort = 2; + * @return The bytes for displayShort. + */ + public com.google.protobuf.ByteString + getDisplayShortBytes() { + java.lang.Object ref = displayShort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayShort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayShort = 2; + * @param value The displayShort to set. + * @return This builder for chaining. + */ + public Builder setDisplayShort( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayShort_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string displayShort = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayShort() { + displayShort_ = getDefaultInstance().getDisplayShort(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string displayShort = 2; + * @param value The bytes for displayShort to set. + * @return This builder for chaining. + */ + public Builder setDisplayShortBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayShort_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayMiddle_ = ""; + /** + * string displayMiddle = 3; + * @return The displayMiddle. + */ + public java.lang.String getDisplayMiddle() { + java.lang.Object ref = displayMiddle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayMiddle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayMiddle = 3; + * @return The bytes for displayMiddle. + */ + public com.google.protobuf.ByteString + getDisplayMiddleBytes() { + java.lang.Object ref = displayMiddle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayMiddle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayMiddle = 3; + * @param value The displayMiddle to set. + * @return This builder for chaining. + */ + public Builder setDisplayMiddle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayMiddle_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string displayMiddle = 3; + * @return This builder for chaining. + */ + public Builder clearDisplayMiddle() { + displayMiddle_ = getDefaultInstance().getDisplayMiddle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string displayMiddle = 3; + * @param value The bytes for displayMiddle to set. + * @return This builder for chaining. + */ + public Builder setDisplayMiddleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayMiddle_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayLong_ = ""; + /** + * string displayLong = 4; + * @return The displayLong. + */ + public java.lang.String getDisplayLong() { + java.lang.Object ref = displayLong_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayLong_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayLong = 4; + * @return The bytes for displayLong. + */ + public com.google.protobuf.ByteString + getDisplayLongBytes() { + java.lang.Object ref = displayLong_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayLong_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayLong = 4; + * @param value The displayLong to set. + * @return This builder for chaining. + */ + public Builder setDisplayLong( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayLong_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string displayLong = 4; + * @return This builder for chaining. + */ + public Builder clearDisplayLong() { + displayLong_ = getDefaultInstance().getDisplayLong(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string displayLong = 4; + * @param value The bytes for displayLong to set. + * @return This builder for chaining. + */ + public Builder setDisplayLongBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayLong_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long displayValue_ ; + /** + * int64 displayValue = 5; + * @return The displayValue. + */ + @java.lang.Override + public long getDisplayValue() { + return displayValue_; + } + /** + * int64 displayValue = 5; + * @param value The displayValue to set. + * @return This builder for chaining. + */ + public Builder setDisplayValue(long value) { + + displayValue_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int64 displayValue = 5; + * @return This builder for chaining. + */ + public Builder clearDisplayValue() { + bitField0_ = (bitField0_ & ~0x00000010); + displayValue_ = 0L; + onChanged(); + return this; + } + + private long displayVersion_ ; + /** + * int64 displayVersion = 6; + * @return The displayVersion. + */ + @java.lang.Override + public long getDisplayVersion() { + return displayVersion_; + } + /** + * int64 displayVersion = 6; + * @param value The displayVersion to set. + * @return This builder for chaining. + */ + public Builder setDisplayVersion(long value) { + + displayVersion_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int64 displayVersion = 6; + * @return This builder for chaining. + */ + public Builder clearDisplayVersion() { + bitField0_ = (bitField0_ & ~0x00000020); + displayVersion_ = 0L; + onChanged(); + return this; + } + + private boolean incremental_ ; + /** + * bool incremental = 7; + * @return The incremental. + */ + @java.lang.Override + public boolean getIncremental() { + return incremental_; + } + /** + * bool incremental = 7; + * @param value The incremental to set. + * @return This builder for chaining. + */ + public Builder setIncremental(boolean value) { + + incremental_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * bool incremental = 7; + * @return This builder for chaining. + */ + public Builder clearIncremental() { + bitField0_ = (bitField0_ & ~0x00000040); + incremental_ = false; + onChanged(); + return this; + } + + private boolean isHidden_ ; + /** + * bool isHidden = 8; + * @return The isHidden. + */ + @java.lang.Override + public boolean getIsHidden() { + return isHidden_; + } + /** + * bool isHidden = 8; + * @param value The isHidden to set. + * @return This builder for chaining. + */ + public Builder setIsHidden(boolean value) { + + isHidden_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bool isHidden = 8; + * @return This builder for chaining. + */ + public Builder clearIsHidden() { + bitField0_ = (bitField0_ & ~0x00000080); + isHidden_ = false; + onChanged(); + return this; + } + + private long total_ ; + /** + * int64 total = 9; + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return total_; + } + /** + * int64 total = 9; + * @param value The total to set. + * @return This builder for chaining. + */ + public Builder setTotal(long value) { + + total_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int64 total = 9; + * @return This builder for chaining. + */ + public Builder clearTotal() { + bitField0_ = (bitField0_ & ~0x00000100); + total_ = 0L; + onChanged(); + return this; + } + + private long displayType_ ; + /** + * int64 displayType = 10; + * @return The displayType. + */ + @java.lang.Override + public long getDisplayType() { + return displayType_; + } + /** + * int64 displayType = 10; + * @param value The displayType to set. + * @return This builder for chaining. + */ + public Builder setDisplayType(long value) { + + displayType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * int64 displayType = 10; + * @return This builder for chaining. + */ + public Builder clearDisplayType() { + bitField0_ = (bitField0_ & ~0x00000200); + displayType_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastRoomStatsMessageMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastRoomStatsMessageMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebcastRoomStatsMessageMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_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&DouyinWebcastRoomStatsMessageMsg.proto" + + "\0222tech.ordinaryroad.live.chat.client.dou" + + "yin.protobuf\032\014Common.proto\"\366\001\n DouyinWeb" + + "castRoomStatsMessageMsg\022\027\n\006common\030\001 \001(\0132" + + "\007.Common\022\024\n\014displayShort\030\002 \001(\t\022\025\n\rdispla" + + "yMiddle\030\003 \001(\t\022\023\n\013displayLong\030\004 \001(\t\022\024\n\014di" + + "splayValue\030\005 \001(\003\022\026\n\016displayVersion\030\006 \001(\003" + + "\022\023\n\013incremental\030\007 \001(\010\022\020\n\010isHidden\030\010 \001(\010\022" + + "\r\n\005total\030\t \001(\003\022\023\n\013displayType\030\n \001(\003B:\n8t" + + "ech.ordinaryroad.live.chat.client.codec." + + "douyin.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastRoomStatsMessageMsg_descriptor, + new java.lang.String[] { "Common", "DisplayShort", "DisplayMiddle", "DisplayLong", "DisplayValue", "DisplayVersion", "Incremental", "IsHidden", "Total", "DisplayType", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastSocialMessageMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastSocialMessageMsgOuterClass.java new file mode 100644 index 0000000..8eedb59 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebcastSocialMessageMsgOuterClass.java @@ -0,0 +1,1466 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebcastSocialMessageMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebcastSocialMessageMsgOuterClass { + private DouyinWebcastSocialMessageMsgOuterClass() {} + 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 DouyinWebcastSocialMessageMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastSocialMessageMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * .Common common = 1; + * @return The common. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * .Common common = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * .User user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .User user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * .User user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * int64 shareType = 3; + * @return The shareType. + */ + long getShareType(); + + /** + * int64 action = 4; + * @return The action. + */ + long getAction(); + + /** + * string shareTarget = 5; + * @return The shareTarget. + */ + java.lang.String getShareTarget(); + /** + * string shareTarget = 5; + * @return The bytes for shareTarget. + */ + com.google.protobuf.ByteString + getShareTargetBytes(); + + /** + * int64 followCount = 6; + * @return The followCount. + */ + long getFollowCount(); + + /** + * .PublicAreaCommon publicAreaCommon = 7; + * @return Whether the publicAreaCommon field is set. + */ + boolean hasPublicAreaCommon(); + /** + * .PublicAreaCommon publicAreaCommon = 7; + * @return The publicAreaCommon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon(); + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastSocialMessageMsg} + */ + public static final class DouyinWebcastSocialMessageMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastSocialMessageMsg) + DouyinWebcastSocialMessageMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebcastSocialMessageMsg.newBuilder() to construct. + private DouyinWebcastSocialMessageMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebcastSocialMessageMsg() { + shareTarget_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebcastSocialMessageMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.Builder.class); + } + + private int bitField0_; + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * .Common common = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * .User user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * .User user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int SHARETYPE_FIELD_NUMBER = 3; + private long shareType_ = 0L; + /** + * int64 shareType = 3; + * @return The shareType. + */ + @java.lang.Override + public long getShareType() { + return shareType_; + } + + public static final int ACTION_FIELD_NUMBER = 4; + private long action_ = 0L; + /** + * int64 action = 4; + * @return The action. + */ + @java.lang.Override + public long getAction() { + return action_; + } + + public static final int SHARETARGET_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object shareTarget_ = ""; + /** + * string shareTarget = 5; + * @return The shareTarget. + */ + @java.lang.Override + public java.lang.String getShareTarget() { + java.lang.Object ref = shareTarget_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareTarget_ = s; + return s; + } + } + /** + * string shareTarget = 5; + * @return The bytes for shareTarget. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShareTargetBytes() { + java.lang.Object ref = shareTarget_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareTarget_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FOLLOWCOUNT_FIELD_NUMBER = 6; + private long followCount_ = 0L; + /** + * int64 followCount = 6; + * @return The followCount. + */ + @java.lang.Override + public long getFollowCount() { + return followCount_; + } + + public static final int PUBLICAREACOMMON_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon publicAreaCommon_; + /** + * .PublicAreaCommon publicAreaCommon = 7; + * @return Whether the publicAreaCommon field is set. + */ + @java.lang.Override + public boolean hasPublicAreaCommon() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + * @return The publicAreaCommon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon() { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder() { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUser()); + } + if (shareType_ != 0L) { + output.writeInt64(3, shareType_); + } + if (action_ != 0L) { + output.writeInt64(4, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareTarget_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, shareTarget_); + } + if (followCount_ != 0L) { + output.writeInt64(6, followCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getPublicAreaCommon()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (shareType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, shareType_); + } + if (action_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareTarget_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, shareTarget_); + } + if (followCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, followCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getPublicAreaCommon()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getShareType() + != other.getShareType()) return false; + if (getAction() + != other.getAction()) return false; + if (!getShareTarget() + .equals(other.getShareTarget())) return false; + if (getFollowCount() + != other.getFollowCount()) return false; + if (hasPublicAreaCommon() != other.hasPublicAreaCommon()) return false; + if (hasPublicAreaCommon()) { + if (!getPublicAreaCommon() + .equals(other.getPublicAreaCommon())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + SHARETYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getShareType()); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAction()); + hash = (37 * hash) + SHARETARGET_FIELD_NUMBER; + hash = (53 * hash) + getShareTarget().hashCode(); + hash = (37 * hash) + FOLLOWCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowCount()); + if (hasPublicAreaCommon()) { + hash = (37 * hash) + PUBLICAREACOMMON_FIELD_NUMBER; + hash = (53 * hash) + getPublicAreaCommon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastSocialMessageMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastSocialMessageMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCommonFieldBuilder(); + getUserFieldBuilder(); + getPublicAreaCommonFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + shareType_ = 0L; + action_ = 0L; + shareTarget_ = ""; + followCount_ = 0L; + publicAreaCommon_ = null; + if (publicAreaCommonBuilder_ != null) { + publicAreaCommonBuilder_.dispose(); + publicAreaCommonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.shareType_ = shareType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.shareTarget_ = shareTarget_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.followCount_ = followCount_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.publicAreaCommon_ = publicAreaCommonBuilder_ == null + ? publicAreaCommon_ + : publicAreaCommonBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getShareType() != 0L) { + setShareType(other.getShareType()); + } + if (other.getAction() != 0L) { + setAction(other.getAction()); + } + if (!other.getShareTarget().isEmpty()) { + shareTarget_ = other.shareTarget_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getFollowCount() != 0L) { + setFollowCount(other.getFollowCount()); + } + if (other.hasPublicAreaCommon()) { + mergePublicAreaCommon(other.getPublicAreaCommon()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + shareType_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + action_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + shareTarget_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + followCount_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + input.readMessage( + getPublicAreaCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * .Common common = 1; + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Common common = 1; + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * .Common common = 1; + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + if (common_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Common common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * .Common common = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * .Common common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * .User user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .User user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .User user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .User user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .User user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * .User user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long shareType_ ; + /** + * int64 shareType = 3; + * @return The shareType. + */ + @java.lang.Override + public long getShareType() { + return shareType_; + } + /** + * int64 shareType = 3; + * @param value The shareType to set. + * @return This builder for chaining. + */ + public Builder setShareType(long value) { + + shareType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 shareType = 3; + * @return This builder for chaining. + */ + public Builder clearShareType() { + bitField0_ = (bitField0_ & ~0x00000004); + shareType_ = 0L; + onChanged(); + return this; + } + + private long action_ ; + /** + * int64 action = 4; + * @return The action. + */ + @java.lang.Override + public long getAction() { + return action_; + } + /** + * int64 action = 4; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(long value) { + + action_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int64 action = 4; + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000008); + action_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object shareTarget_ = ""; + /** + * string shareTarget = 5; + * @return The shareTarget. + */ + public java.lang.String getShareTarget() { + java.lang.Object ref = shareTarget_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareTarget_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string shareTarget = 5; + * @return The bytes for shareTarget. + */ + public com.google.protobuf.ByteString + getShareTargetBytes() { + java.lang.Object ref = shareTarget_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareTarget_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string shareTarget = 5; + * @param value The shareTarget to set. + * @return This builder for chaining. + */ + public Builder setShareTarget( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shareTarget_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string shareTarget = 5; + * @return This builder for chaining. + */ + public Builder clearShareTarget() { + shareTarget_ = getDefaultInstance().getShareTarget(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string shareTarget = 5; + * @param value The bytes for shareTarget to set. + * @return This builder for chaining. + */ + public Builder setShareTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shareTarget_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private long followCount_ ; + /** + * int64 followCount = 6; + * @return The followCount. + */ + @java.lang.Override + public long getFollowCount() { + return followCount_; + } + /** + * int64 followCount = 6; + * @param value The followCount to set. + * @return This builder for chaining. + */ + public Builder setFollowCount(long value) { + + followCount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int64 followCount = 6; + * @return This builder for chaining. + */ + public Builder clearFollowCount() { + bitField0_ = (bitField0_ & ~0x00000020); + followCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon publicAreaCommon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder> publicAreaCommonBuilder_; + /** + * .PublicAreaCommon publicAreaCommon = 7; + * @return Whether the publicAreaCommon field is set. + */ + public boolean hasPublicAreaCommon() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + * @return The publicAreaCommon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon() { + if (publicAreaCommonBuilder_ == null) { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } else { + return publicAreaCommonBuilder_.getMessage(); + } + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + public Builder setPublicAreaCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon value) { + if (publicAreaCommonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicAreaCommon_ = value; + } else { + publicAreaCommonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + public Builder setPublicAreaCommon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder builderForValue) { + if (publicAreaCommonBuilder_ == null) { + publicAreaCommon_ = builderForValue.build(); + } else { + publicAreaCommonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + public Builder mergePublicAreaCommon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon value) { + if (publicAreaCommonBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + publicAreaCommon_ != null && + publicAreaCommon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance()) { + getPublicAreaCommonBuilder().mergeFrom(value); + } else { + publicAreaCommon_ = value; + } + } else { + publicAreaCommonBuilder_.mergeFrom(value); + } + if (publicAreaCommon_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + public Builder clearPublicAreaCommon() { + bitField0_ = (bitField0_ & ~0x00000040); + publicAreaCommon_ = null; + if (publicAreaCommonBuilder_ != null) { + publicAreaCommonBuilder_.dispose(); + publicAreaCommonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder getPublicAreaCommonBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getPublicAreaCommonFieldBuilder().getBuilder(); + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder() { + if (publicAreaCommonBuilder_ != null) { + return publicAreaCommonBuilder_.getMessageOrBuilder(); + } else { + return publicAreaCommon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + } + /** + * .PublicAreaCommon publicAreaCommon = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder> + getPublicAreaCommonFieldBuilder() { + if (publicAreaCommonBuilder_ == null) { + publicAreaCommonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder>( + getPublicAreaCommon(), + getParentForChildren(), + isClean()); + publicAreaCommon_ = null; + } + return publicAreaCommonBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastSocialMessageMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebcastSocialMessageMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebcastSocialMessageMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_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#DouyinWebcastSocialMessageMsg.proto\0222t" + + "ech.ordinaryroad.live.chat.client.douyin" + + ".protobuf\032\014Common.proto\032\nUser.proto\032\026Pub" + + "licAreaCommon.proto\"\307\001\n\035DouyinWebcastSoc" + + "ialMessageMsg\022\027\n\006common\030\001 \001(\0132\007.Common\022\023" + + "\n\004user\030\002 \001(\0132\005.User\022\021\n\tshareType\030\003 \001(\003\022\016" + + "\n\006action\030\004 \001(\003\022\023\n\013shareTarget\030\005 \001(\t\022\023\n\013f" + + "ollowCount\030\006 \001(\003\022+\n\020publicAreaCommon\030\007 \001" + + "(\0132\021.PublicAreaCommonB:\n8tech.ordinaryro" + + "ad.live.chat.client.codec.douyin.protobu" + + "fb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebcastSocialMessageMsg_descriptor, + new java.lang.String[] { "Common", "User", "ShareType", "Action", "ShareTarget", "FollowCount", "PublicAreaCommon", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebsocketFrameMsgOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebsocketFrameMsgOuterClass.java new file mode 100644 index 0000000..6fbf69a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebsocketFrameMsgOuterClass.java @@ -0,0 +1,2224 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebsocketFrameMsg.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebsocketFrameMsgOuterClass { + private DouyinWebsocketFrameMsgOuterClass() {} + 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 DouyinWebsocketFrameMsgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrameMsg) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + java.util.List + getMessagesListList(); + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg getMessagesList(int index); + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + int getMessagesListCount(); + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + java.util.List + getMessagesListOrBuilderList(); + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsgOrBuilder getMessagesListOrBuilder( + int index); + + /** + * string cursor = 2; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + * string cursor = 2; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); + + /** + * uint64 fetch_interval = 3; + * @return The fetchInterval. + */ + long getFetchInterval(); + + /** + * uint64 now = 4; + * @return The now. + */ + long getNow(); + + /** + * string internal_ext = 5; + * @return The internalExt. + */ + java.lang.String getInternalExt(); + /** + * string internal_ext = 5; + * @return The bytes for internalExt. + */ + com.google.protobuf.ByteString + getInternalExtBytes(); + + /** + * uint32 fetch_type = 6; + * @return The fetchType. + */ + int getFetchType(); + + /** + * map<string, string> route_params = 7; + */ + int getRouteParamsCount(); + /** + * map<string, string> route_params = 7; + */ + boolean containsRouteParams( + java.lang.String key); + /** + * Use {@link #getRouteParamsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getRouteParams(); + /** + * map<string, string> route_params = 7; + */ + java.util.Map + getRouteParamsMap(); + /** + * map<string, string> route_params = 7; + */ + /* nullable */ +java.lang.String getRouteParamsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> route_params = 7; + */ + java.lang.String getRouteParamsOrThrow( + java.lang.String key); + + /** + * uint64 heartbeat_duration = 8; + * @return The heartbeatDuration. + */ + long getHeartbeatDuration(); + + /** + * bool need_ack = 9; + * @return The needAck. + */ + boolean getNeedAck(); + + /** + * string push_server = 10; + * @return The pushServer. + */ + java.lang.String getPushServer(); + /** + * string push_server = 10; + * @return The bytes for pushServer. + */ + com.google.protobuf.ByteString + getPushServerBytes(); + + /** + * string live_cursor = 11; + * @return The liveCursor. + */ + java.lang.String getLiveCursor(); + /** + * string live_cursor = 11; + * @return The bytes for liveCursor. + */ + com.google.protobuf.ByteString + getLiveCursorBytes(); + + /** + * bool history_no_more = 12; + * @return The historyNoMore. + */ + boolean getHistoryNoMore(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrameMsg} + */ + public static final class DouyinWebsocketFrameMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrameMsg) + DouyinWebsocketFrameMsgOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebsocketFrameMsg.newBuilder() to construct. + private DouyinWebsocketFrameMsg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebsocketFrameMsg() { + messagesList_ = java.util.Collections.emptyList(); + cursor_ = ""; + internalExt_ = ""; + pushServer_ = ""; + liveCursor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebsocketFrameMsg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetRouteParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.Builder.class); + } + + public static final int MESSAGES_LIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List messagesList_; + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + @java.lang.Override + public java.util.List getMessagesListList() { + return messagesList_; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + @java.lang.Override + public java.util.List + getMessagesListOrBuilderList() { + return messagesList_; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + @java.lang.Override + public int getMessagesListCount() { + return messagesList_.size(); + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg getMessagesList(int index) { + return messagesList_.get(index); + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsgOrBuilder getMessagesListOrBuilder( + int index) { + return messagesList_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + * string cursor = 2; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + * string cursor = 2; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FETCH_INTERVAL_FIELD_NUMBER = 3; + private long fetchInterval_ = 0L; + /** + * uint64 fetch_interval = 3; + * @return The fetchInterval. + */ + @java.lang.Override + public long getFetchInterval() { + return fetchInterval_; + } + + public static final int NOW_FIELD_NUMBER = 4; + private long now_ = 0L; + /** + * uint64 now = 4; + * @return The now. + */ + @java.lang.Override + public long getNow() { + return now_; + } + + public static final int INTERNAL_EXT_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object internalExt_ = ""; + /** + * string internal_ext = 5; + * @return The internalExt. + */ + @java.lang.Override + public java.lang.String getInternalExt() { + java.lang.Object ref = internalExt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalExt_ = s; + return s; + } + } + /** + * string internal_ext = 5; + * @return The bytes for internalExt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInternalExtBytes() { + java.lang.Object ref = internalExt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internalExt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FETCH_TYPE_FIELD_NUMBER = 6; + private int fetchType_ = 0; + /** + * uint32 fetch_type = 6; + * @return The fetchType. + */ + @java.lang.Override + public int getFetchType() { + return fetchType_; + } + + public static final int ROUTE_PARAMS_FIELD_NUMBER = 7; + private static final class RouteParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_RouteParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> routeParams_; + private com.google.protobuf.MapField + internalGetRouteParams() { + if (routeParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RouteParamsDefaultEntryHolder.defaultEntry); + } + return routeParams_; + } + public int getRouteParamsCount() { + return internalGetRouteParams().getMap().size(); + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public boolean containsRouteParams( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRouteParams().getMap().containsKey(key); + } + /** + * Use {@link #getRouteParamsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRouteParams() { + return getRouteParamsMap(); + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public java.util.Map getRouteParamsMap() { + return internalGetRouteParams().getMap(); + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getRouteParamsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRouteParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public java.lang.String getRouteParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRouteParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int HEARTBEAT_DURATION_FIELD_NUMBER = 8; + private long heartbeatDuration_ = 0L; + /** + * uint64 heartbeat_duration = 8; + * @return The heartbeatDuration. + */ + @java.lang.Override + public long getHeartbeatDuration() { + return heartbeatDuration_; + } + + public static final int NEED_ACK_FIELD_NUMBER = 9; + private boolean needAck_ = false; + /** + * bool need_ack = 9; + * @return The needAck. + */ + @java.lang.Override + public boolean getNeedAck() { + return needAck_; + } + + public static final int PUSH_SERVER_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object pushServer_ = ""; + /** + * string push_server = 10; + * @return The pushServer. + */ + @java.lang.Override + public java.lang.String getPushServer() { + java.lang.Object ref = pushServer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushServer_ = s; + return s; + } + } + /** + * string push_server = 10; + * @return The bytes for pushServer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPushServerBytes() { + java.lang.Object ref = pushServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIVE_CURSOR_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object liveCursor_ = ""; + /** + * string live_cursor = 11; + * @return The liveCursor. + */ + @java.lang.Override + public java.lang.String getLiveCursor() { + java.lang.Object ref = liveCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveCursor_ = s; + return s; + } + } + /** + * string live_cursor = 11; + * @return The bytes for liveCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLiveCursorBytes() { + java.lang.Object ref = liveCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HISTORY_NO_MORE_FIELD_NUMBER = 12; + private boolean historyNoMore_ = false; + /** + * bool history_no_more = 12; + * @return The historyNoMore. + */ + @java.lang.Override + public boolean getHistoryNoMore() { + return historyNoMore_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < messagesList_.size(); i++) { + output.writeMessage(1, messagesList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cursor_); + } + if (fetchInterval_ != 0L) { + output.writeUInt64(3, fetchInterval_); + } + if (now_ != 0L) { + output.writeUInt64(4, now_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalExt_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalExt_); + } + if (fetchType_ != 0) { + output.writeUInt32(6, fetchType_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetRouteParams(), + RouteParamsDefaultEntryHolder.defaultEntry, + 7); + if (heartbeatDuration_ != 0L) { + output.writeUInt64(8, heartbeatDuration_); + } + if (needAck_ != false) { + output.writeBool(9, needAck_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushServer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, pushServer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveCursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, liveCursor_); + } + if (historyNoMore_ != false) { + output.writeBool(12, historyNoMore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < messagesList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, messagesList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cursor_); + } + if (fetchInterval_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, fetchInterval_); + } + if (now_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, now_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalExt_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalExt_); + } + if (fetchType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, fetchType_); + } + for (java.util.Map.Entry entry + : internalGetRouteParams().getMap().entrySet()) { + com.google.protobuf.MapEntry + routeParams__ = RouteParamsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, routeParams__); + } + if (heartbeatDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(8, heartbeatDuration_); + } + if (needAck_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, needAck_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushServer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, pushServer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveCursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, liveCursor_); + } + if (historyNoMore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, historyNoMore_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg) obj; + + if (!getMessagesListList() + .equals(other.getMessagesListList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (getFetchInterval() + != other.getFetchInterval()) return false; + if (getNow() + != other.getNow()) return false; + if (!getInternalExt() + .equals(other.getInternalExt())) return false; + if (getFetchType() + != other.getFetchType()) return false; + if (!internalGetRouteParams().equals( + other.internalGetRouteParams())) return false; + if (getHeartbeatDuration() + != other.getHeartbeatDuration()) return false; + if (getNeedAck() + != other.getNeedAck()) return false; + if (!getPushServer() + .equals(other.getPushServer())) return false; + if (!getLiveCursor() + .equals(other.getLiveCursor())) return false; + if (getHistoryNoMore() + != other.getHistoryNoMore()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMessagesListCount() > 0) { + hash = (37 * hash) + MESSAGES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getMessagesListList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (37 * hash) + FETCH_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFetchInterval()); + hash = (37 * hash) + NOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNow()); + hash = (37 * hash) + INTERNAL_EXT_FIELD_NUMBER; + hash = (53 * hash) + getInternalExt().hashCode(); + hash = (37 * hash) + FETCH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFetchType(); + if (!internalGetRouteParams().getMap().isEmpty()) { + hash = (37 * hash) + ROUTE_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRouteParams().hashCode(); + } + hash = (37 * hash) + HEARTBEAT_DURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeartbeatDuration()); + hash = (37 * hash) + NEED_ACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedAck()); + hash = (37 * hash) + PUSH_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getPushServer().hashCode(); + hash = (37 * hash) + LIVE_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getLiveCursor().hashCode(); + hash = (37 * hash) + HISTORY_NO_MORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHistoryNoMore()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrameMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrameMsg) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetRouteParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableRouteParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (messagesListBuilder_ == null) { + messagesList_ = java.util.Collections.emptyList(); + } else { + messagesList_ = null; + messagesListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + fetchInterval_ = 0L; + now_ = 0L; + internalExt_ = ""; + fetchType_ = 0; + internalGetMutableRouteParams().clear(); + heartbeatDuration_ = 0L; + needAck_ = false; + pushServer_ = ""; + liveCursor_ = ""; + historyNoMore_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg result) { + if (messagesListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + messagesList_ = java.util.Collections.unmodifiableList(messagesList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.messagesList_ = messagesList_; + } else { + result.messagesList_ = messagesListBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fetchInterval_ = fetchInterval_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.now_ = now_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.internalExt_ = internalExt_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fetchType_ = fetchType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.routeParams_ = internalGetRouteParams(); + result.routeParams_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.heartbeatDuration_ = heartbeatDuration_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.needAck_ = needAck_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.pushServer_ = pushServer_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.liveCursor_ = liveCursor_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.historyNoMore_ = historyNoMore_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.getDefaultInstance()) return this; + if (messagesListBuilder_ == null) { + if (!other.messagesList_.isEmpty()) { + if (messagesList_.isEmpty()) { + messagesList_ = other.messagesList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMessagesListIsMutable(); + messagesList_.addAll(other.messagesList_); + } + onChanged(); + } + } else { + if (!other.messagesList_.isEmpty()) { + if (messagesListBuilder_.isEmpty()) { + messagesListBuilder_.dispose(); + messagesListBuilder_ = null; + messagesList_ = other.messagesList_; + bitField0_ = (bitField0_ & ~0x00000001); + messagesListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMessagesListFieldBuilder() : null; + } else { + messagesListBuilder_.addAllMessages(other.messagesList_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFetchInterval() != 0L) { + setFetchInterval(other.getFetchInterval()); + } + if (other.getNow() != 0L) { + setNow(other.getNow()); + } + if (!other.getInternalExt().isEmpty()) { + internalExt_ = other.internalExt_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getFetchType() != 0) { + setFetchType(other.getFetchType()); + } + internalGetMutableRouteParams().mergeFrom( + other.internalGetRouteParams()); + bitField0_ |= 0x00000040; + if (other.getHeartbeatDuration() != 0L) { + setHeartbeatDuration(other.getHeartbeatDuration()); + } + if (other.getNeedAck() != false) { + setNeedAck(other.getNeedAck()); + } + if (!other.getPushServer().isEmpty()) { + pushServer_ = other.pushServer_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getLiveCursor().isEmpty()) { + liveCursor_ = other.liveCursor_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.getHistoryNoMore() != false) { + setHistoryNoMore(other.getHistoryNoMore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.parser(), + extensionRegistry); + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.add(m); + } else { + messagesListBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + fetchInterval_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + now_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + internalExt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + fetchType_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + com.google.protobuf.MapEntry + routeParams__ = input.readMessage( + RouteParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableRouteParams().getMutableMap().put( + routeParams__.getKey(), routeParams__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + heartbeatDuration_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + needAck_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + pushServer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + liveCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: { + historyNoMore_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List messagesList_ = + java.util.Collections.emptyList(); + private void ensureMessagesListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + messagesList_ = new java.util.ArrayList(messagesList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsgOrBuilder> messagesListBuilder_; + + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public java.util.List getMessagesListList() { + if (messagesListBuilder_ == null) { + return java.util.Collections.unmodifiableList(messagesList_); + } else { + return messagesListBuilder_.getMessageList(); + } + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public int getMessagesListCount() { + if (messagesListBuilder_ == null) { + return messagesList_.size(); + } else { + return messagesListBuilder_.getCount(); + } + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg getMessagesList(int index) { + if (messagesListBuilder_ == null) { + return messagesList_.get(index); + } else { + return messagesListBuilder_.getMessage(index); + } + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder setMessagesList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg value) { + if (messagesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesListIsMutable(); + messagesList_.set(index, value); + onChanged(); + } else { + messagesListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder setMessagesList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder builderForValue) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.set(index, builderForValue.build()); + onChanged(); + } else { + messagesListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder addMessagesList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg value) { + if (messagesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesListIsMutable(); + messagesList_.add(value); + onChanged(); + } else { + messagesListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder addMessagesList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg value) { + if (messagesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesListIsMutable(); + messagesList_.add(index, value); + onChanged(); + } else { + messagesListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder addMessagesList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder builderForValue) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.add(builderForValue.build()); + onChanged(); + } else { + messagesListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder addMessagesList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder builderForValue) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.add(index, builderForValue.build()); + onChanged(); + } else { + messagesListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder addAllMessagesList( + java.lang.Iterable values) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, messagesList_); + onChanged(); + } else { + messagesListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder clearMessagesList() { + if (messagesListBuilder_ == null) { + messagesList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + messagesListBuilder_.clear(); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public Builder removeMessagesList(int index) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.remove(index); + onChanged(); + } else { + messagesListBuilder_.remove(index); + } + return this; + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder getMessagesListBuilder( + int index) { + return getMessagesListFieldBuilder().getBuilder(index); + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsgOrBuilder getMessagesListOrBuilder( + int index) { + if (messagesListBuilder_ == null) { + return messagesList_.get(index); } else { + return messagesListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public java.util.List + getMessagesListOrBuilderList() { + if (messagesListBuilder_ != null) { + return messagesListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messagesList_); + } + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder addMessagesListBuilder() { + return getMessagesListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.getDefaultInstance()); + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder addMessagesListBuilder( + int index) { + return getMessagesListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.getDefaultInstance()); + } + /** + * repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinCmdMsg messages_list = 1; + */ + public java.util.List + getMessagesListBuilderList() { + return getMessagesListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsgOrBuilder> + getMessagesListFieldBuilder() { + if (messagesListBuilder_ == null) { + messagesListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsg.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.DouyinCmdMsgOrBuilder>( + messagesList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + messagesList_ = null; + } + return messagesListBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + * string cursor = 2; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cursor = 2; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cursor = 2; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string cursor = 2; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string cursor = 2; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long fetchInterval_ ; + /** + * uint64 fetch_interval = 3; + * @return The fetchInterval. + */ + @java.lang.Override + public long getFetchInterval() { + return fetchInterval_; + } + /** + * uint64 fetch_interval = 3; + * @param value The fetchInterval to set. + * @return This builder for chaining. + */ + public Builder setFetchInterval(long value) { + + fetchInterval_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 fetch_interval = 3; + * @return This builder for chaining. + */ + public Builder clearFetchInterval() { + bitField0_ = (bitField0_ & ~0x00000004); + fetchInterval_ = 0L; + onChanged(); + return this; + } + + private long now_ ; + /** + * uint64 now = 4; + * @return The now. + */ + @java.lang.Override + public long getNow() { + return now_; + } + /** + * uint64 now = 4; + * @param value The now to set. + * @return This builder for chaining. + */ + public Builder setNow(long value) { + + now_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 now = 4; + * @return This builder for chaining. + */ + public Builder clearNow() { + bitField0_ = (bitField0_ & ~0x00000008); + now_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object internalExt_ = ""; + /** + * string internal_ext = 5; + * @return The internalExt. + */ + public java.lang.String getInternalExt() { + java.lang.Object ref = internalExt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalExt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string internal_ext = 5; + * @return The bytes for internalExt. + */ + public com.google.protobuf.ByteString + getInternalExtBytes() { + java.lang.Object ref = internalExt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internalExt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string internal_ext = 5; + * @param value The internalExt to set. + * @return This builder for chaining. + */ + public Builder setInternalExt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + internalExt_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string internal_ext = 5; + * @return This builder for chaining. + */ + public Builder clearInternalExt() { + internalExt_ = getDefaultInstance().getInternalExt(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string internal_ext = 5; + * @param value The bytes for internalExt to set. + * @return This builder for chaining. + */ + public Builder setInternalExtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + internalExt_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int fetchType_ ; + /** + * uint32 fetch_type = 6; + * @return The fetchType. + */ + @java.lang.Override + public int getFetchType() { + return fetchType_; + } + /** + * uint32 fetch_type = 6; + * @param value The fetchType to set. + * @return This builder for chaining. + */ + public Builder setFetchType(int value) { + + fetchType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint32 fetch_type = 6; + * @return This builder for chaining. + */ + public Builder clearFetchType() { + bitField0_ = (bitField0_ & ~0x00000020); + fetchType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> routeParams_; + private com.google.protobuf.MapField + internalGetRouteParams() { + if (routeParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RouteParamsDefaultEntryHolder.defaultEntry); + } + return routeParams_; + } + private com.google.protobuf.MapField + internalGetMutableRouteParams() { + if (routeParams_ == null) { + routeParams_ = com.google.protobuf.MapField.newMapField( + RouteParamsDefaultEntryHolder.defaultEntry); + } + if (!routeParams_.isMutable()) { + routeParams_ = routeParams_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return routeParams_; + } + public int getRouteParamsCount() { + return internalGetRouteParams().getMap().size(); + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public boolean containsRouteParams( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRouteParams().getMap().containsKey(key); + } + /** + * Use {@link #getRouteParamsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRouteParams() { + return getRouteParamsMap(); + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public java.util.Map getRouteParamsMap() { + return internalGetRouteParams().getMap(); + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getRouteParamsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRouteParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> route_params = 7; + */ + @java.lang.Override + public java.lang.String getRouteParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRouteParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearRouteParams() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableRouteParams().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> route_params = 7; + */ + public Builder removeRouteParams( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableRouteParams().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableRouteParams() { + bitField0_ |= 0x00000040; + return internalGetMutableRouteParams().getMutableMap(); + } + /** + * map<string, string> route_params = 7; + */ + public Builder putRouteParams( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableRouteParams().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * map<string, string> route_params = 7; + */ + public Builder putAllRouteParams( + java.util.Map values) { + internalGetMutableRouteParams().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private long heartbeatDuration_ ; + /** + * uint64 heartbeat_duration = 8; + * @return The heartbeatDuration. + */ + @java.lang.Override + public long getHeartbeatDuration() { + return heartbeatDuration_; + } + /** + * uint64 heartbeat_duration = 8; + * @param value The heartbeatDuration to set. + * @return This builder for chaining. + */ + public Builder setHeartbeatDuration(long value) { + + heartbeatDuration_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * uint64 heartbeat_duration = 8; + * @return This builder for chaining. + */ + public Builder clearHeartbeatDuration() { + bitField0_ = (bitField0_ & ~0x00000080); + heartbeatDuration_ = 0L; + onChanged(); + return this; + } + + private boolean needAck_ ; + /** + * bool need_ack = 9; + * @return The needAck. + */ + @java.lang.Override + public boolean getNeedAck() { + return needAck_; + } + /** + * bool need_ack = 9; + * @param value The needAck to set. + * @return This builder for chaining. + */ + public Builder setNeedAck(boolean value) { + + needAck_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * bool need_ack = 9; + * @return This builder for chaining. + */ + public Builder clearNeedAck() { + bitField0_ = (bitField0_ & ~0x00000100); + needAck_ = false; + onChanged(); + return this; + } + + private java.lang.Object pushServer_ = ""; + /** + * string push_server = 10; + * @return The pushServer. + */ + public java.lang.String getPushServer() { + java.lang.Object ref = pushServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string push_server = 10; + * @return The bytes for pushServer. + */ + public com.google.protobuf.ByteString + getPushServerBytes() { + java.lang.Object ref = pushServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string push_server = 10; + * @param value The pushServer to set. + * @return This builder for chaining. + */ + public Builder setPushServer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pushServer_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * string push_server = 10; + * @return This builder for chaining. + */ + public Builder clearPushServer() { + pushServer_ = getDefaultInstance().getPushServer(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * string push_server = 10; + * @param value The bytes for pushServer to set. + * @return This builder for chaining. + */ + public Builder setPushServerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pushServer_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object liveCursor_ = ""; + /** + * string live_cursor = 11; + * @return The liveCursor. + */ + public java.lang.String getLiveCursor() { + java.lang.Object ref = liveCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string live_cursor = 11; + * @return The bytes for liveCursor. + */ + public com.google.protobuf.ByteString + getLiveCursorBytes() { + java.lang.Object ref = liveCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string live_cursor = 11; + * @param value The liveCursor to set. + * @return This builder for chaining. + */ + public Builder setLiveCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + liveCursor_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * string live_cursor = 11; + * @return This builder for chaining. + */ + public Builder clearLiveCursor() { + liveCursor_ = getDefaultInstance().getLiveCursor(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * string live_cursor = 11; + * @param value The bytes for liveCursor to set. + * @return This builder for chaining. + */ + public Builder setLiveCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + liveCursor_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private boolean historyNoMore_ ; + /** + * bool history_no_more = 12; + * @return The historyNoMore. + */ + @java.lang.Override + public boolean getHistoryNoMore() { + return historyNoMore_; + } + /** + * bool history_no_more = 12; + * @param value The historyNoMore to set. + * @return This builder for chaining. + */ + public Builder setHistoryNoMore(boolean value) { + + historyNoMore_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * bool history_no_more = 12; + * @return This builder for chaining. + */ + public Builder clearHistoryNoMore() { + bitField0_ = (bitField0_ & ~0x00000800); + historyNoMore_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrameMsg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrameMsg) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebsocketFrameMsg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_RouteParamsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_RouteParamsEntry_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\035DouyinWebsocketFrameMsg.proto\0222tech.or" + + "dinaryroad.live.chat.client.douyin.proto" + + "buf\032\022DouyinCmdMsg.proto\"\352\003\n\027DouyinWebsoc" + + "ketFrameMsg\022W\n\rmessages_list\030\001 \003(\0132@.tec" + + "h.ordinaryroad.live.chat.client.douyin.p" + + "rotobuf.DouyinCmdMsg\022\016\n\006cursor\030\002 \001(\t\022\026\n\016" + + "fetch_interval\030\003 \001(\004\022\013\n\003now\030\004 \001(\004\022\024\n\014int" + + "ernal_ext\030\005 \001(\t\022\022\n\nfetch_type\030\006 \001(\r\022r\n\014r" + + "oute_params\030\007 \003(\0132\\.tech.ordinaryroad.li" + + "ve.chat.client.douyin.protobuf.DouyinWeb" + + "socketFrameMsg.RouteParamsEntry\022\032\n\022heart" + + "beat_duration\030\010 \001(\004\022\020\n\010need_ack\030\t \001(\010\022\023\n" + + "\013push_server\030\n \001(\t\022\023\n\013live_cursor\030\013 \001(\t\022" + + "\027\n\017history_no_more\030\014 \001(\010\0322\n\020RouteParamsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B:\n8" + + "tech.ordinaryroad.live.chat.client.codec" + + ".douyin.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_descriptor, + new java.lang.String[] { "MessagesList", "Cursor", "FetchInterval", "Now", "InternalExt", "FetchType", "RouteParams", "HeartbeatDuration", "NeedAck", "PushServer", "LiveCursor", "HistoryNoMore", }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_RouteParamsEntry_descriptor = + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_descriptor.getNestedTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_RouteParamsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrameMsg_RouteParamsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebsocketFrameOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebsocketFrameOuterClass.java new file mode 100644 index 0000000..055ef05 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/DouyinWebsocketFrameOuterClass.java @@ -0,0 +1,1471 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DouyinWebsocketFrame.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf; + +public final class DouyinWebsocketFrameOuterClass { + private DouyinWebsocketFrameOuterClass() {} + 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 DouyinWebsocketFrameOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrame) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 seq_id = 1; + * @return The seqId. + */ + long getSeqId(); + + /** + * uint64 log_id = 2; + * @return The logId. + */ + long getLogId(); + + /** + * uint64 service = 3; + * @return The service. + */ + long getService(); + + /** + * uint64 method = 4; + * @return The method. + */ + long getMethod(); + + /** + * map<string, string> headers_list = 5; + */ + int getHeadersListCount(); + /** + * map<string, string> headers_list = 5; + */ + boolean containsHeadersList( + java.lang.String key); + /** + * Use {@link #getHeadersListMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHeadersList(); + /** + * map<string, string> headers_list = 5; + */ + java.util.Map + getHeadersListMap(); + /** + * map<string, string> headers_list = 5; + */ + /* nullable */ +java.lang.String getHeadersListOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> headers_list = 5; + */ + java.lang.String getHeadersListOrThrow( + java.lang.String key); + + /** + * string payload_encoding = 6; + * @return The payloadEncoding. + */ + java.lang.String getPayloadEncoding(); + /** + * string payload_encoding = 6; + * @return The bytes for payloadEncoding. + */ + com.google.protobuf.ByteString + getPayloadEncodingBytes(); + + /** + * string payload_type = 7; + * @return The payloadType. + */ + java.lang.String getPayloadType(); + /** + * string payload_type = 7; + * @return The bytes for payloadType. + */ + com.google.protobuf.ByteString + getPayloadTypeBytes(); + + /** + * bytes payload = 8; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrame} + */ + public static final class DouyinWebsocketFrame extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrame) + DouyinWebsocketFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use DouyinWebsocketFrame.newBuilder() to construct. + private DouyinWebsocketFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DouyinWebsocketFrame() { + payloadEncoding_ = ""; + payloadType_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DouyinWebsocketFrame(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetHeadersList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.Builder.class); + } + + public static final int SEQ_ID_FIELD_NUMBER = 1; + private long seqId_ = 0L; + /** + * uint64 seq_id = 1; + * @return The seqId. + */ + @java.lang.Override + public long getSeqId() { + return seqId_; + } + + public static final int LOG_ID_FIELD_NUMBER = 2; + private long logId_ = 0L; + /** + * uint64 log_id = 2; + * @return The logId. + */ + @java.lang.Override + public long getLogId() { + return logId_; + } + + public static final int SERVICE_FIELD_NUMBER = 3; + private long service_ = 0L; + /** + * uint64 service = 3; + * @return The service. + */ + @java.lang.Override + public long getService() { + return service_; + } + + public static final int METHOD_FIELD_NUMBER = 4; + private long method_ = 0L; + /** + * uint64 method = 4; + * @return The method. + */ + @java.lang.Override + public long getMethod() { + return method_; + } + + public static final int HEADERS_LIST_FIELD_NUMBER = 5; + private static final class HeadersListDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_HeadersListEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headersList_; + private com.google.protobuf.MapField + internalGetHeadersList() { + if (headersList_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersListDefaultEntryHolder.defaultEntry); + } + return headersList_; + } + public int getHeadersListCount() { + return internalGetHeadersList().getMap().size(); + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public boolean containsHeadersList( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadersList().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersListMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeadersList() { + return getHeadersListMap(); + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public java.util.Map getHeadersListMap() { + return internalGetHeadersList().getMap(); + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getHeadersListOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadersList().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public java.lang.String getHeadersListOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadersList().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PAYLOAD_ENCODING_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object payloadEncoding_ = ""; + /** + * string payload_encoding = 6; + * @return The payloadEncoding. + */ + @java.lang.Override + public java.lang.String getPayloadEncoding() { + java.lang.Object ref = payloadEncoding_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadEncoding_ = s; + return s; + } + } + /** + * string payload_encoding = 6; + * @return The bytes for payloadEncoding. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadEncodingBytes() { + java.lang.Object ref = payloadEncoding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadEncoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object payloadType_ = ""; + /** + * string payload_type = 7; + * @return The payloadType. + */ + @java.lang.Override + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } + } + /** + * string payload_type = 7; + * @return The bytes for payloadType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 8; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (seqId_ != 0L) { + output.writeUInt64(1, seqId_); + } + if (logId_ != 0L) { + output.writeUInt64(2, logId_); + } + if (service_ != 0L) { + output.writeUInt64(3, service_); + } + if (method_ != 0L) { + output.writeUInt64(4, method_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeadersList(), + HeadersListDefaultEntryHolder.defaultEntry, + 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, payloadEncoding_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, payloadType_); + } + if (!payload_.isEmpty()) { + output.writeBytes(8, payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (seqId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, seqId_); + } + if (logId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, logId_); + } + if (service_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, service_); + } + if (method_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, method_); + } + for (java.util.Map.Entry entry + : internalGetHeadersList().getMap().entrySet()) { + com.google.protobuf.MapEntry + headersList__ = HeadersListDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, headersList__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, payloadEncoding_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, payloadType_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame) obj; + + if (getSeqId() + != other.getSeqId()) return false; + if (getLogId() + != other.getLogId()) return false; + if (getService() + != other.getService()) return false; + if (getMethod() + != other.getMethod()) return false; + if (!internalGetHeadersList().equals( + other.internalGetHeadersList())) return false; + if (!getPayloadEncoding() + .equals(other.getPayloadEncoding())) return false; + if (!getPayloadType() + .equals(other.getPayloadType())) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SEQ_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSeqId()); + hash = (37 * hash) + LOG_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLogId()); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getService()); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMethod()); + if (!internalGetHeadersList().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_LIST_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeadersList().hashCode(); + } + hash = (37 * hash) + PAYLOAD_ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getPayloadEncoding().hashCode(); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPayloadType().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrame} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrame) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetHeadersList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableHeadersList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + seqId_ = 0L; + logId_ = 0L; + service_ = 0L; + method_ = 0L; + internalGetMutableHeadersList().clear(); + payloadEncoding_ = ""; + payloadType_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.seqId_ = seqId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logId_ = logId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.headersList_ = internalGetHeadersList(); + result.headersList_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.payloadEncoding_ = payloadEncoding_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.payloadType_ = payloadType_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.payload_ = payload_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.getDefaultInstance()) return this; + if (other.getSeqId() != 0L) { + setSeqId(other.getSeqId()); + } + if (other.getLogId() != 0L) { + setLogId(other.getLogId()); + } + if (other.getService() != 0L) { + setService(other.getService()); + } + if (other.getMethod() != 0L) { + setMethod(other.getMethod()); + } + internalGetMutableHeadersList().mergeFrom( + other.internalGetHeadersList()); + bitField0_ |= 0x00000010; + if (!other.getPayloadEncoding().isEmpty()) { + payloadEncoding_ = other.payloadEncoding_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getPayloadType().isEmpty()) { + payloadType_ = other.payloadType_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + seqId_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + logId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + service_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + method_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + com.google.protobuf.MapEntry + headersList__ = input.readMessage( + HeadersListDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableHeadersList().getMutableMap().put( + headersList__.getKey(), headersList__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + payloadEncoding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + payloadType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long seqId_ ; + /** + * uint64 seq_id = 1; + * @return The seqId. + */ + @java.lang.Override + public long getSeqId() { + return seqId_; + } + /** + * uint64 seq_id = 1; + * @param value The seqId to set. + * @return This builder for chaining. + */ + public Builder setSeqId(long value) { + + seqId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 seq_id = 1; + * @return This builder for chaining. + */ + public Builder clearSeqId() { + bitField0_ = (bitField0_ & ~0x00000001); + seqId_ = 0L; + onChanged(); + return this; + } + + private long logId_ ; + /** + * uint64 log_id = 2; + * @return The logId. + */ + @java.lang.Override + public long getLogId() { + return logId_; + } + /** + * uint64 log_id = 2; + * @param value The logId to set. + * @return This builder for chaining. + */ + public Builder setLogId(long value) { + + logId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 log_id = 2; + * @return This builder for chaining. + */ + public Builder clearLogId() { + bitField0_ = (bitField0_ & ~0x00000002); + logId_ = 0L; + onChanged(); + return this; + } + + private long service_ ; + /** + * uint64 service = 3; + * @return The service. + */ + @java.lang.Override + public long getService() { + return service_; + } + /** + * uint64 service = 3; + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(long value) { + + service_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 service = 3; + * @return This builder for chaining. + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000004); + service_ = 0L; + onChanged(); + return this; + } + + private long method_ ; + /** + * uint64 method = 4; + * @return The method. + */ + @java.lang.Override + public long getMethod() { + return method_; + } + /** + * uint64 method = 4; + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod(long value) { + + method_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 method = 4; + * @return This builder for chaining. + */ + public Builder clearMethod() { + bitField0_ = (bitField0_ & ~0x00000008); + method_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headersList_; + private com.google.protobuf.MapField + internalGetHeadersList() { + if (headersList_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersListDefaultEntryHolder.defaultEntry); + } + return headersList_; + } + private com.google.protobuf.MapField + internalGetMutableHeadersList() { + if (headersList_ == null) { + headersList_ = com.google.protobuf.MapField.newMapField( + HeadersListDefaultEntryHolder.defaultEntry); + } + if (!headersList_.isMutable()) { + headersList_ = headersList_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return headersList_; + } + public int getHeadersListCount() { + return internalGetHeadersList().getMap().size(); + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public boolean containsHeadersList( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadersList().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersListMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeadersList() { + return getHeadersListMap(); + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public java.util.Map getHeadersListMap() { + return internalGetHeadersList().getMap(); + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getHeadersListOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadersList().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headers_list = 5; + */ + @java.lang.Override + public java.lang.String getHeadersListOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadersList().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearHeadersList() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableHeadersList().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> headers_list = 5; + */ + public Builder removeHeadersList( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableHeadersList().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHeadersList() { + bitField0_ |= 0x00000010; + return internalGetMutableHeadersList().getMutableMap(); + } + /** + * map<string, string> headers_list = 5; + */ + public Builder putHeadersList( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableHeadersList().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * map<string, string> headers_list = 5; + */ + public Builder putAllHeadersList( + java.util.Map values) { + internalGetMutableHeadersList().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object payloadEncoding_ = ""; + /** + * string payload_encoding = 6; + * @return The payloadEncoding. + */ + public java.lang.String getPayloadEncoding() { + java.lang.Object ref = payloadEncoding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadEncoding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string payload_encoding = 6; + * @return The bytes for payloadEncoding. + */ + public com.google.protobuf.ByteString + getPayloadEncodingBytes() { + java.lang.Object ref = payloadEncoding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadEncoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string payload_encoding = 6; + * @param value The payloadEncoding to set. + * @return This builder for chaining. + */ + public Builder setPayloadEncoding( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + payloadEncoding_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string payload_encoding = 6; + * @return This builder for chaining. + */ + public Builder clearPayloadEncoding() { + payloadEncoding_ = getDefaultInstance().getPayloadEncoding(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string payload_encoding = 6; + * @param value The bytes for payloadEncoding to set. + * @return This builder for chaining. + */ + public Builder setPayloadEncodingBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + payloadEncoding_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object payloadType_ = ""; + /** + * string payload_type = 7; + * @return The payloadType. + */ + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string payload_type = 7; + * @return The bytes for payloadType. + */ + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string payload_type = 7; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + payloadType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * string payload_type = 7; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + payloadType_ = getDefaultInstance().getPayloadType(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * string payload_type = 7; + * @param value The bytes for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + payloadType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 8; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * bytes payload = 8; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bytes payload = 8; + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000080); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrame) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.DouyinWebsocketFrame) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DouyinWebsocketFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_HeadersListEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_HeadersListEntry_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\032DouyinWebsocketFrame.proto\0222tech.ordin" + + "aryroad.live.chat.client.douyin.protobuf" + + "\"\275\002\n\024DouyinWebsocketFrame\022\016\n\006seq_id\030\001 \001(" + + "\004\022\016\n\006log_id\030\002 \001(\004\022\017\n\007service\030\003 \001(\004\022\016\n\006me" + + "thod\030\004 \001(\004\022o\n\014headers_list\030\005 \003(\0132Y.tech." + + "ordinaryroad.live.chat.client.douyin.pro" + + "tobuf.DouyinWebsocketFrame.HeadersListEn" + + "try\022\030\n\020payload_encoding\030\006 \001(\t\022\024\n\014payload" + + "_type\030\007 \001(\t\022\017\n\007payload\030\010 \001(\014\0322\n\020HeadersL" + + "istEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "B:\n8tech.ordinaryroad.live.chat.client.c" + + "odec.douyin.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_descriptor, + new java.lang.String[] { "SeqId", "LogId", "Service", "Method", "HeadersList", "PayloadEncoding", "PayloadType", "Payload", }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_HeadersListEntry_descriptor = + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_descriptor.getNestedTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_HeadersListEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_DouyinWebsocketFrame_HeadersListEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/dto/CommonOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/dto/CommonOuterClass.java new file mode 100644 index 0000000..f8fdfe1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/dto/CommonOuterClass.java @@ -0,0 +1,2571 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Common.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto; + +public final class CommonOuterClass { + private CommonOuterClass() {} + 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 CommonOrBuilder extends + // @@protoc_insertion_point(interface_extends:Common) + com.google.protobuf.MessageOrBuilder { + + /** + * string method = 1; + * @return The method. + */ + java.lang.String getMethod(); + /** + * string method = 1; + * @return The bytes for method. + */ + com.google.protobuf.ByteString + getMethodBytes(); + + /** + * uint64 msgId = 2; + * @return The msgId. + */ + long getMsgId(); + + /** + * uint64 roomId = 3; + * @return The roomId. + */ + long getRoomId(); + + /** + * uint64 createTime = 4; + * @return The createTime. + */ + long getCreateTime(); + + /** + * uint32 monitor = 5; + * @return The monitor. + */ + int getMonitor(); + + /** + * bool isShowMsg = 6; + * @return The isShowMsg. + */ + boolean getIsShowMsg(); + + /** + * string describe = 7; + * @return The describe. + */ + java.lang.String getDescribe(); + /** + * string describe = 7; + * @return The bytes for describe. + */ + com.google.protobuf.ByteString + getDescribeBytes(); + + /** + *
+     * DisplayText displayText = 8;
+     * 
+ * + * uint64 foldType = 9; + * @return The foldType. + */ + long getFoldType(); + + /** + * uint64 anchorFoldType = 10; + * @return The anchorFoldType. + */ + long getAnchorFoldType(); + + /** + * uint64 priorityScore = 11; + * @return The priorityScore. + */ + long getPriorityScore(); + + /** + * string logId = 12; + * @return The logId. + */ + java.lang.String getLogId(); + /** + * string logId = 12; + * @return The bytes for logId. + */ + com.google.protobuf.ByteString + getLogIdBytes(); + + /** + * string msgProcessFilterK = 13; + * @return The msgProcessFilterK. + */ + java.lang.String getMsgProcessFilterK(); + /** + * string msgProcessFilterK = 13; + * @return The bytes for msgProcessFilterK. + */ + com.google.protobuf.ByteString + getMsgProcessFilterKBytes(); + + /** + * string msgProcessFilterV = 14; + * @return The msgProcessFilterV. + */ + java.lang.String getMsgProcessFilterV(); + /** + * string msgProcessFilterV = 14; + * @return The bytes for msgProcessFilterV. + */ + com.google.protobuf.ByteString + getMsgProcessFilterVBytes(); + + /** + * .User user = 15; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .User user = 15; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * .User user = 15; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + *
+     * Room room = 16;
+     * 
+ * + * uint64 anchorFoldTypeV2 = 17; + * @return The anchorFoldTypeV2. + */ + long getAnchorFoldTypeV2(); + + /** + * uint64 processAtSeiTimeMs = 18; + * @return The processAtSeiTimeMs. + */ + long getProcessAtSeiTimeMs(); + + /** + * uint64 randomDispatchMs = 19; + * @return The randomDispatchMs. + */ + long getRandomDispatchMs(); + + /** + * bool isDispatch = 20; + * @return The isDispatch. + */ + boolean getIsDispatch(); + + /** + * uint32 channelId = 21; + * @return The channelId. + */ + int getChannelId(); + + /** + * uint64 diffSei2absSecond = 22; + * @return The diffSei2absSecond. + */ + long getDiffSei2AbsSecond(); + + /** + * uint64 anchorFoldDuration = 23; + * @return The anchorFoldDuration. + */ + long getAnchorFoldDuration(); + } + /** + * Protobuf type {@code Common} + */ + public static final class Common extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Common) + CommonOrBuilder { + private static final long serialVersionUID = 0L; + // Use Common.newBuilder() to construct. + private Common(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Common() { + method_ = ""; + describe_ = ""; + logId_ = ""; + msgProcessFilterK_ = ""; + msgProcessFilterV_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Common(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder.class); + } + + private int bitField0_; + public static final int METHOD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object method_ = ""; + /** + * string method = 1; + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } + } + /** + * string method = 1; + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MSGID_FIELD_NUMBER = 2; + private long msgId_ = 0L; + /** + * uint64 msgId = 2; + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + + public static final int ROOMID_FIELD_NUMBER = 3; + private long roomId_ = 0L; + /** + * uint64 roomId = 3; + * @return The roomId. + */ + @java.lang.Override + public long getRoomId() { + return roomId_; + } + + public static final int CREATETIME_FIELD_NUMBER = 4; + private long createTime_ = 0L; + /** + * uint64 createTime = 4; + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + + public static final int MONITOR_FIELD_NUMBER = 5; + private int monitor_ = 0; + /** + * uint32 monitor = 5; + * @return The monitor. + */ + @java.lang.Override + public int getMonitor() { + return monitor_; + } + + public static final int ISSHOWMSG_FIELD_NUMBER = 6; + private boolean isShowMsg_ = false; + /** + * bool isShowMsg = 6; + * @return The isShowMsg. + */ + @java.lang.Override + public boolean getIsShowMsg() { + return isShowMsg_; + } + + public static final int DESCRIBE_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object describe_ = ""; + /** + * string describe = 7; + * @return The describe. + */ + @java.lang.Override + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } + } + /** + * string describe = 7; + * @return The bytes for describe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FOLDTYPE_FIELD_NUMBER = 9; + private long foldType_ = 0L; + /** + *
+     * DisplayText displayText = 8;
+     * 
+ * + * uint64 foldType = 9; + * @return The foldType. + */ + @java.lang.Override + public long getFoldType() { + return foldType_; + } + + public static final int ANCHORFOLDTYPE_FIELD_NUMBER = 10; + private long anchorFoldType_ = 0L; + /** + * uint64 anchorFoldType = 10; + * @return The anchorFoldType. + */ + @java.lang.Override + public long getAnchorFoldType() { + return anchorFoldType_; + } + + public static final int PRIORITYSCORE_FIELD_NUMBER = 11; + private long priorityScore_ = 0L; + /** + * uint64 priorityScore = 11; + * @return The priorityScore. + */ + @java.lang.Override + public long getPriorityScore() { + return priorityScore_; + } + + public static final int LOGID_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object logId_ = ""; + /** + * string logId = 12; + * @return The logId. + */ + @java.lang.Override + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } + } + /** + * string logId = 12; + * @return The bytes for logId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MSGPROCESSFILTERK_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object msgProcessFilterK_ = ""; + /** + * string msgProcessFilterK = 13; + * @return The msgProcessFilterK. + */ + @java.lang.Override + public java.lang.String getMsgProcessFilterK() { + java.lang.Object ref = msgProcessFilterK_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterK_ = s; + return s; + } + } + /** + * string msgProcessFilterK = 13; + * @return The bytes for msgProcessFilterK. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgProcessFilterKBytes() { + java.lang.Object ref = msgProcessFilterK_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterK_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MSGPROCESSFILTERV_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object msgProcessFilterV_ = ""; + /** + * string msgProcessFilterV = 14; + * @return The msgProcessFilterV. + */ + @java.lang.Override + public java.lang.String getMsgProcessFilterV() { + java.lang.Object ref = msgProcessFilterV_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterV_ = s; + return s; + } + } + /** + * string msgProcessFilterV = 14; + * @return The bytes for msgProcessFilterV. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgProcessFilterVBytes() { + java.lang.Object ref = msgProcessFilterV_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterV_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 15; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * .User user = 15; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .User user = 15; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * .User user = 15; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int ANCHORFOLDTYPEV2_FIELD_NUMBER = 17; + private long anchorFoldTypeV2_ = 0L; + /** + *
+     * Room room = 16;
+     * 
+ * + * uint64 anchorFoldTypeV2 = 17; + * @return The anchorFoldTypeV2. + */ + @java.lang.Override + public long getAnchorFoldTypeV2() { + return anchorFoldTypeV2_; + } + + public static final int PROCESSATSEITIMEMS_FIELD_NUMBER = 18; + private long processAtSeiTimeMs_ = 0L; + /** + * uint64 processAtSeiTimeMs = 18; + * @return The processAtSeiTimeMs. + */ + @java.lang.Override + public long getProcessAtSeiTimeMs() { + return processAtSeiTimeMs_; + } + + public static final int RANDOMDISPATCHMS_FIELD_NUMBER = 19; + private long randomDispatchMs_ = 0L; + /** + * uint64 randomDispatchMs = 19; + * @return The randomDispatchMs. + */ + @java.lang.Override + public long getRandomDispatchMs() { + return randomDispatchMs_; + } + + public static final int ISDISPATCH_FIELD_NUMBER = 20; + private boolean isDispatch_ = false; + /** + * bool isDispatch = 20; + * @return The isDispatch. + */ + @java.lang.Override + public boolean getIsDispatch() { + return isDispatch_; + } + + public static final int CHANNELID_FIELD_NUMBER = 21; + private int channelId_ = 0; + /** + * uint32 channelId = 21; + * @return The channelId. + */ + @java.lang.Override + public int getChannelId() { + return channelId_; + } + + public static final int DIFFSEI2ABSSECOND_FIELD_NUMBER = 22; + private long diffSei2AbsSecond_ = 0L; + /** + * uint64 diffSei2absSecond = 22; + * @return The diffSei2absSecond. + */ + @java.lang.Override + public long getDiffSei2AbsSecond() { + return diffSei2AbsSecond_; + } + + public static final int ANCHORFOLDDURATION_FIELD_NUMBER = 23; + private long anchorFoldDuration_ = 0L; + /** + * uint64 anchorFoldDuration = 23; + * @return The anchorFoldDuration. + */ + @java.lang.Override + public long getAnchorFoldDuration() { + return anchorFoldDuration_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, method_); + } + if (msgId_ != 0L) { + output.writeUInt64(2, msgId_); + } + if (roomId_ != 0L) { + output.writeUInt64(3, roomId_); + } + if (createTime_ != 0L) { + output.writeUInt64(4, createTime_); + } + if (monitor_ != 0) { + output.writeUInt32(5, monitor_); + } + if (isShowMsg_ != false) { + output.writeBool(6, isShowMsg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, describe_); + } + if (foldType_ != 0L) { + output.writeUInt64(9, foldType_); + } + if (anchorFoldType_ != 0L) { + output.writeUInt64(10, anchorFoldType_); + } + if (priorityScore_ != 0L) { + output.writeUInt64(11, priorityScore_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, logId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterK_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, msgProcessFilterK_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterV_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, msgProcessFilterV_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(15, getUser()); + } + if (anchorFoldTypeV2_ != 0L) { + output.writeUInt64(17, anchorFoldTypeV2_); + } + if (processAtSeiTimeMs_ != 0L) { + output.writeUInt64(18, processAtSeiTimeMs_); + } + if (randomDispatchMs_ != 0L) { + output.writeUInt64(19, randomDispatchMs_); + } + if (isDispatch_ != false) { + output.writeBool(20, isDispatch_); + } + if (channelId_ != 0) { + output.writeUInt32(21, channelId_); + } + if (diffSei2AbsSecond_ != 0L) { + output.writeUInt64(22, diffSei2AbsSecond_); + } + if (anchorFoldDuration_ != 0L) { + output.writeUInt64(23, anchorFoldDuration_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, method_); + } + if (msgId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, msgId_); + } + if (roomId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, roomId_); + } + if (createTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, createTime_); + } + if (monitor_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, monitor_); + } + if (isShowMsg_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, isShowMsg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, describe_); + } + if (foldType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(9, foldType_); + } + if (anchorFoldType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(10, anchorFoldType_); + } + if (priorityScore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, priorityScore_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, logId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterK_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, msgProcessFilterK_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterV_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, msgProcessFilterV_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getUser()); + } + if (anchorFoldTypeV2_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(17, anchorFoldTypeV2_); + } + if (processAtSeiTimeMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(18, processAtSeiTimeMs_); + } + if (randomDispatchMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(19, randomDispatchMs_); + } + if (isDispatch_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(20, isDispatch_); + } + if (channelId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(21, channelId_); + } + if (diffSei2AbsSecond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(22, diffSei2AbsSecond_); + } + if (anchorFoldDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(23, anchorFoldDuration_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common) obj; + + if (!getMethod() + .equals(other.getMethod())) return false; + if (getMsgId() + != other.getMsgId()) return false; + if (getRoomId() + != other.getRoomId()) return false; + if (getCreateTime() + != other.getCreateTime()) return false; + if (getMonitor() + != other.getMonitor()) return false; + if (getIsShowMsg() + != other.getIsShowMsg()) return false; + if (!getDescribe() + .equals(other.getDescribe())) return false; + if (getFoldType() + != other.getFoldType()) return false; + if (getAnchorFoldType() + != other.getAnchorFoldType()) return false; + if (getPriorityScore() + != other.getPriorityScore()) return false; + if (!getLogId() + .equals(other.getLogId())) return false; + if (!getMsgProcessFilterK() + .equals(other.getMsgProcessFilterK())) return false; + if (!getMsgProcessFilterV() + .equals(other.getMsgProcessFilterV())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getAnchorFoldTypeV2() + != other.getAnchorFoldTypeV2()) return false; + if (getProcessAtSeiTimeMs() + != other.getProcessAtSeiTimeMs()) return false; + if (getRandomDispatchMs() + != other.getRandomDispatchMs()) return false; + if (getIsDispatch() + != other.getIsDispatch()) return false; + if (getChannelId() + != other.getChannelId()) return false; + if (getDiffSei2AbsSecond() + != other.getDiffSei2AbsSecond()) return false; + if (getAnchorFoldDuration() + != other.getAnchorFoldDuration()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (37 * hash) + MSGID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMsgId()); + hash = (37 * hash) + ROOMID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRoomId()); + hash = (37 * hash) + CREATETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCreateTime()); + hash = (37 * hash) + MONITOR_FIELD_NUMBER; + hash = (53 * hash) + getMonitor(); + hash = (37 * hash) + ISSHOWMSG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsShowMsg()); + hash = (37 * hash) + DESCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getDescribe().hashCode(); + hash = (37 * hash) + FOLDTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFoldType()); + hash = (37 * hash) + ANCHORFOLDTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorFoldType()); + hash = (37 * hash) + PRIORITYSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPriorityScore()); + hash = (37 * hash) + LOGID_FIELD_NUMBER; + hash = (53 * hash) + getLogId().hashCode(); + hash = (37 * hash) + MSGPROCESSFILTERK_FIELD_NUMBER; + hash = (53 * hash) + getMsgProcessFilterK().hashCode(); + hash = (37 * hash) + MSGPROCESSFILTERV_FIELD_NUMBER; + hash = (53 * hash) + getMsgProcessFilterV().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + ANCHORFOLDTYPEV2_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorFoldTypeV2()); + hash = (37 * hash) + PROCESSATSEITIMEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getProcessAtSeiTimeMs()); + hash = (37 * hash) + RANDOMDISPATCHMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRandomDispatchMs()); + hash = (37 * hash) + ISDISPATCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDispatch()); + hash = (37 * hash) + CHANNELID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId(); + hash = (37 * hash) + DIFFSEI2ABSSECOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDiffSei2AbsSecond()); + hash = (37 * hash) + ANCHORFOLDDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorFoldDuration()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 Common} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Common) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + method_ = ""; + msgId_ = 0L; + roomId_ = 0L; + createTime_ = 0L; + monitor_ = 0; + isShowMsg_ = false; + describe_ = ""; + foldType_ = 0L; + anchorFoldType_ = 0L; + priorityScore_ = 0L; + logId_ = ""; + msgProcessFilterK_ = ""; + msgProcessFilterV_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + anchorFoldTypeV2_ = 0L; + processAtSeiTimeMs_ = 0L; + randomDispatchMs_ = 0L; + isDispatch_ = false; + channelId_ = 0; + diffSei2AbsSecond_ = 0L; + anchorFoldDuration_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.roomId_ = roomId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTime_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.monitor_ = monitor_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.isShowMsg_ = isShowMsg_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.describe_ = describe_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.foldType_ = foldType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.anchorFoldType_ = anchorFoldType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.priorityScore_ = priorityScore_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.logId_ = logId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.msgProcessFilterK_ = msgProcessFilterK_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.msgProcessFilterV_ = msgProcessFilterV_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00002000) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.anchorFoldTypeV2_ = anchorFoldTypeV2_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.processAtSeiTimeMs_ = processAtSeiTimeMs_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.randomDispatchMs_ = randomDispatchMs_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.isDispatch_ = isDispatch_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.diffSei2AbsSecond_ = diffSei2AbsSecond_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.anchorFoldDuration_ = anchorFoldDuration_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getMsgId() != 0L) { + setMsgId(other.getMsgId()); + } + if (other.getRoomId() != 0L) { + setRoomId(other.getRoomId()); + } + if (other.getCreateTime() != 0L) { + setCreateTime(other.getCreateTime()); + } + if (other.getMonitor() != 0) { + setMonitor(other.getMonitor()); + } + if (other.getIsShowMsg() != false) { + setIsShowMsg(other.getIsShowMsg()); + } + if (!other.getDescribe().isEmpty()) { + describe_ = other.describe_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getFoldType() != 0L) { + setFoldType(other.getFoldType()); + } + if (other.getAnchorFoldType() != 0L) { + setAnchorFoldType(other.getAnchorFoldType()); + } + if (other.getPriorityScore() != 0L) { + setPriorityScore(other.getPriorityScore()); + } + if (!other.getLogId().isEmpty()) { + logId_ = other.logId_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getMsgProcessFilterK().isEmpty()) { + msgProcessFilterK_ = other.msgProcessFilterK_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getMsgProcessFilterV().isEmpty()) { + msgProcessFilterV_ = other.msgProcessFilterV_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getAnchorFoldTypeV2() != 0L) { + setAnchorFoldTypeV2(other.getAnchorFoldTypeV2()); + } + if (other.getProcessAtSeiTimeMs() != 0L) { + setProcessAtSeiTimeMs(other.getProcessAtSeiTimeMs()); + } + if (other.getRandomDispatchMs() != 0L) { + setRandomDispatchMs(other.getRandomDispatchMs()); + } + if (other.getIsDispatch() != false) { + setIsDispatch(other.getIsDispatch()); + } + if (other.getChannelId() != 0) { + setChannelId(other.getChannelId()); + } + if (other.getDiffSei2AbsSecond() != 0L) { + setDiffSei2AbsSecond(other.getDiffSei2AbsSecond()); + } + if (other.getAnchorFoldDuration() != 0L) { + setAnchorFoldDuration(other.getAnchorFoldDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + method_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + msgId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + roomId_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + createTime_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + monitor_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + isShowMsg_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + describe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 72: { + foldType_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + anchorFoldType_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: { + priorityScore_ = input.readUInt64(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 98: { + logId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: { + msgProcessFilterK_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 114: { + msgProcessFilterV_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 122: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 136: { + anchorFoldTypeV2_ = input.readUInt64(); + bitField0_ |= 0x00004000; + break; + } // case 136 + case 144: { + processAtSeiTimeMs_ = input.readUInt64(); + bitField0_ |= 0x00008000; + break; + } // case 144 + case 152: { + randomDispatchMs_ = input.readUInt64(); + bitField0_ |= 0x00010000; + break; + } // case 152 + case 160: { + isDispatch_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 160 + case 168: { + channelId_ = input.readUInt32(); + bitField0_ |= 0x00040000; + break; + } // case 168 + case 176: { + diffSei2AbsSecond_ = input.readUInt64(); + bitField0_ |= 0x00080000; + break; + } // case 176 + case 184: { + anchorFoldDuration_ = input.readUInt64(); + bitField0_ |= 0x00100000; + break; + } // case 184 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object method_ = ""; + /** + * string method = 1; + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string method = 1; + * @return The bytes for method. + */ + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string method = 1; + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string method = 1; + * @return This builder for chaining. + */ + public Builder clearMethod() { + method_ = getDefaultInstance().getMethod(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string method = 1; + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long msgId_ ; + /** + * uint64 msgId = 2; + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + /** + * uint64 msgId = 2; + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId(long value) { + + msgId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 msgId = 2; + * @return This builder for chaining. + */ + public Builder clearMsgId() { + bitField0_ = (bitField0_ & ~0x00000002); + msgId_ = 0L; + onChanged(); + return this; + } + + private long roomId_ ; + /** + * uint64 roomId = 3; + * @return The roomId. + */ + @java.lang.Override + public long getRoomId() { + return roomId_; + } + /** + * uint64 roomId = 3; + * @param value The roomId to set. + * @return This builder for chaining. + */ + public Builder setRoomId(long value) { + + roomId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 roomId = 3; + * @return This builder for chaining. + */ + public Builder clearRoomId() { + bitField0_ = (bitField0_ & ~0x00000004); + roomId_ = 0L; + onChanged(); + return this; + } + + private long createTime_ ; + /** + * uint64 createTime = 4; + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + /** + * uint64 createTime = 4; + * @param value The createTime to set. + * @return This builder for chaining. + */ + public Builder setCreateTime(long value) { + + createTime_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 createTime = 4; + * @return This builder for chaining. + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = 0L; + onChanged(); + return this; + } + + private int monitor_ ; + /** + * uint32 monitor = 5; + * @return The monitor. + */ + @java.lang.Override + public int getMonitor() { + return monitor_; + } + /** + * uint32 monitor = 5; + * @param value The monitor to set. + * @return This builder for chaining. + */ + public Builder setMonitor(int value) { + + monitor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 monitor = 5; + * @return This builder for chaining. + */ + public Builder clearMonitor() { + bitField0_ = (bitField0_ & ~0x00000010); + monitor_ = 0; + onChanged(); + return this; + } + + private boolean isShowMsg_ ; + /** + * bool isShowMsg = 6; + * @return The isShowMsg. + */ + @java.lang.Override + public boolean getIsShowMsg() { + return isShowMsg_; + } + /** + * bool isShowMsg = 6; + * @param value The isShowMsg to set. + * @return This builder for chaining. + */ + public Builder setIsShowMsg(boolean value) { + + isShowMsg_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bool isShowMsg = 6; + * @return This builder for chaining. + */ + public Builder clearIsShowMsg() { + bitField0_ = (bitField0_ & ~0x00000020); + isShowMsg_ = false; + onChanged(); + return this; + } + + private java.lang.Object describe_ = ""; + /** + * string describe = 7; + * @return The describe. + */ + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string describe = 7; + * @return The bytes for describe. + */ + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string describe = 7; + * @param value The describe to set. + * @return This builder for chaining. + */ + public Builder setDescribe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + describe_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * string describe = 7; + * @return This builder for chaining. + */ + public Builder clearDescribe() { + describe_ = getDefaultInstance().getDescribe(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * string describe = 7; + * @param value The bytes for describe to set. + * @return This builder for chaining. + */ + public Builder setDescribeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + describe_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private long foldType_ ; + /** + *
+       * DisplayText displayText = 8;
+       * 
+ * + * uint64 foldType = 9; + * @return The foldType. + */ + @java.lang.Override + public long getFoldType() { + return foldType_; + } + /** + *
+       * DisplayText displayText = 8;
+       * 
+ * + * uint64 foldType = 9; + * @param value The foldType to set. + * @return This builder for chaining. + */ + public Builder setFoldType(long value) { + + foldType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * DisplayText displayText = 8;
+       * 
+ * + * uint64 foldType = 9; + * @return This builder for chaining. + */ + public Builder clearFoldType() { + bitField0_ = (bitField0_ & ~0x00000080); + foldType_ = 0L; + onChanged(); + return this; + } + + private long anchorFoldType_ ; + /** + * uint64 anchorFoldType = 10; + * @return The anchorFoldType. + */ + @java.lang.Override + public long getAnchorFoldType() { + return anchorFoldType_; + } + /** + * uint64 anchorFoldType = 10; + * @param value The anchorFoldType to set. + * @return This builder for chaining. + */ + public Builder setAnchorFoldType(long value) { + + anchorFoldType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * uint64 anchorFoldType = 10; + * @return This builder for chaining. + */ + public Builder clearAnchorFoldType() { + bitField0_ = (bitField0_ & ~0x00000100); + anchorFoldType_ = 0L; + onChanged(); + return this; + } + + private long priorityScore_ ; + /** + * uint64 priorityScore = 11; + * @return The priorityScore. + */ + @java.lang.Override + public long getPriorityScore() { + return priorityScore_; + } + /** + * uint64 priorityScore = 11; + * @param value The priorityScore to set. + * @return This builder for chaining. + */ + public Builder setPriorityScore(long value) { + + priorityScore_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * uint64 priorityScore = 11; + * @return This builder for chaining. + */ + public Builder clearPriorityScore() { + bitField0_ = (bitField0_ & ~0x00000200); + priorityScore_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object logId_ = ""; + /** + * string logId = 12; + * @return The logId. + */ + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string logId = 12; + * @return The bytes for logId. + */ + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string logId = 12; + * @param value The logId to set. + * @return This builder for chaining. + */ + public Builder setLogId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + logId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * string logId = 12; + * @return This builder for chaining. + */ + public Builder clearLogId() { + logId_ = getDefaultInstance().getLogId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * string logId = 12; + * @param value The bytes for logId to set. + * @return This builder for chaining. + */ + public Builder setLogIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + logId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object msgProcessFilterK_ = ""; + /** + * string msgProcessFilterK = 13; + * @return The msgProcessFilterK. + */ + public java.lang.String getMsgProcessFilterK() { + java.lang.Object ref = msgProcessFilterK_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterK_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msgProcessFilterK = 13; + * @return The bytes for msgProcessFilterK. + */ + public com.google.protobuf.ByteString + getMsgProcessFilterKBytes() { + java.lang.Object ref = msgProcessFilterK_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterK_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msgProcessFilterK = 13; + * @param value The msgProcessFilterK to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterK( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgProcessFilterK_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * string msgProcessFilterK = 13; + * @return This builder for chaining. + */ + public Builder clearMsgProcessFilterK() { + msgProcessFilterK_ = getDefaultInstance().getMsgProcessFilterK(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * string msgProcessFilterK = 13; + * @param value The bytes for msgProcessFilterK to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterKBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgProcessFilterK_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object msgProcessFilterV_ = ""; + /** + * string msgProcessFilterV = 14; + * @return The msgProcessFilterV. + */ + public java.lang.String getMsgProcessFilterV() { + java.lang.Object ref = msgProcessFilterV_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterV_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msgProcessFilterV = 14; + * @return The bytes for msgProcessFilterV. + */ + public com.google.protobuf.ByteString + getMsgProcessFilterVBytes() { + java.lang.Object ref = msgProcessFilterV_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterV_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msgProcessFilterV = 14; + * @param value The msgProcessFilterV to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterV( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgProcessFilterV_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * string msgProcessFilterV = 14; + * @return This builder for chaining. + */ + public Builder clearMsgProcessFilterV() { + msgProcessFilterV_ = getDefaultInstance().getMsgProcessFilterV(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * string msgProcessFilterV = 14; + * @param value The bytes for msgProcessFilterV to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterVBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgProcessFilterV_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * .User user = 15; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * .User user = 15; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .User user = 15; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .User user = 15; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .User user = 15; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * .User user = 15; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00002000); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User user = 15; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .User user = 15; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * .User user = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long anchorFoldTypeV2_ ; + /** + *
+       * Room room = 16;
+       * 
+ * + * uint64 anchorFoldTypeV2 = 17; + * @return The anchorFoldTypeV2. + */ + @java.lang.Override + public long getAnchorFoldTypeV2() { + return anchorFoldTypeV2_; + } + /** + *
+       * Room room = 16;
+       * 
+ * + * uint64 anchorFoldTypeV2 = 17; + * @param value The anchorFoldTypeV2 to set. + * @return This builder for chaining. + */ + public Builder setAnchorFoldTypeV2(long value) { + + anchorFoldTypeV2_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+       * Room room = 16;
+       * 
+ * + * uint64 anchorFoldTypeV2 = 17; + * @return This builder for chaining. + */ + public Builder clearAnchorFoldTypeV2() { + bitField0_ = (bitField0_ & ~0x00004000); + anchorFoldTypeV2_ = 0L; + onChanged(); + return this; + } + + private long processAtSeiTimeMs_ ; + /** + * uint64 processAtSeiTimeMs = 18; + * @return The processAtSeiTimeMs. + */ + @java.lang.Override + public long getProcessAtSeiTimeMs() { + return processAtSeiTimeMs_; + } + /** + * uint64 processAtSeiTimeMs = 18; + * @param value The processAtSeiTimeMs to set. + * @return This builder for chaining. + */ + public Builder setProcessAtSeiTimeMs(long value) { + + processAtSeiTimeMs_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * uint64 processAtSeiTimeMs = 18; + * @return This builder for chaining. + */ + public Builder clearProcessAtSeiTimeMs() { + bitField0_ = (bitField0_ & ~0x00008000); + processAtSeiTimeMs_ = 0L; + onChanged(); + return this; + } + + private long randomDispatchMs_ ; + /** + * uint64 randomDispatchMs = 19; + * @return The randomDispatchMs. + */ + @java.lang.Override + public long getRandomDispatchMs() { + return randomDispatchMs_; + } + /** + * uint64 randomDispatchMs = 19; + * @param value The randomDispatchMs to set. + * @return This builder for chaining. + */ + public Builder setRandomDispatchMs(long value) { + + randomDispatchMs_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * uint64 randomDispatchMs = 19; + * @return This builder for chaining. + */ + public Builder clearRandomDispatchMs() { + bitField0_ = (bitField0_ & ~0x00010000); + randomDispatchMs_ = 0L; + onChanged(); + return this; + } + + private boolean isDispatch_ ; + /** + * bool isDispatch = 20; + * @return The isDispatch. + */ + @java.lang.Override + public boolean getIsDispatch() { + return isDispatch_; + } + /** + * bool isDispatch = 20; + * @param value The isDispatch to set. + * @return This builder for chaining. + */ + public Builder setIsDispatch(boolean value) { + + isDispatch_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * bool isDispatch = 20; + * @return This builder for chaining. + */ + public Builder clearIsDispatch() { + bitField0_ = (bitField0_ & ~0x00020000); + isDispatch_ = false; + onChanged(); + return this; + } + + private int channelId_ ; + /** + * uint32 channelId = 21; + * @return The channelId. + */ + @java.lang.Override + public int getChannelId() { + return channelId_; + } + /** + * uint32 channelId = 21; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId(int value) { + + channelId_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * uint32 channelId = 21; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + bitField0_ = (bitField0_ & ~0x00040000); + channelId_ = 0; + onChanged(); + return this; + } + + private long diffSei2AbsSecond_ ; + /** + * uint64 diffSei2absSecond = 22; + * @return The diffSei2absSecond. + */ + @java.lang.Override + public long getDiffSei2AbsSecond() { + return diffSei2AbsSecond_; + } + /** + * uint64 diffSei2absSecond = 22; + * @param value The diffSei2absSecond to set. + * @return This builder for chaining. + */ + public Builder setDiffSei2AbsSecond(long value) { + + diffSei2AbsSecond_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * uint64 diffSei2absSecond = 22; + * @return This builder for chaining. + */ + public Builder clearDiffSei2AbsSecond() { + bitField0_ = (bitField0_ & ~0x00080000); + diffSei2AbsSecond_ = 0L; + onChanged(); + return this; + } + + private long anchorFoldDuration_ ; + /** + * uint64 anchorFoldDuration = 23; + * @return The anchorFoldDuration. + */ + @java.lang.Override + public long getAnchorFoldDuration() { + return anchorFoldDuration_; + } + /** + * uint64 anchorFoldDuration = 23; + * @param value The anchorFoldDuration to set. + * @return This builder for chaining. + */ + public Builder setAnchorFoldDuration(long value) { + + anchorFoldDuration_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * uint64 anchorFoldDuration = 23; + * @return This builder for chaining. + */ + public Builder clearAnchorFoldDuration() { + bitField0_ = (bitField0_ & ~0x00100000); + anchorFoldDuration_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Common) + } + + // @@protoc_insertion_point(class_scope:Common) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Common parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.CommonOuterClass.Common getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Common_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Common_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\014Common.proto\032\nUser.proto\"\312\003\n\006Common\022\016\n" + + "\006method\030\001 \001(\t\022\r\n\005msgId\030\002 \001(\004\022\016\n\006roomId\030\003" + + " \001(\004\022\022\n\ncreateTime\030\004 \001(\004\022\017\n\007monitor\030\005 \001(" + + "\r\022\021\n\tisShowMsg\030\006 \001(\010\022\020\n\010describe\030\007 \001(\t\022\020" + + "\n\010foldType\030\t \001(\004\022\026\n\016anchorFoldType\030\n \001(\004" + + "\022\025\n\rpriorityScore\030\013 \001(\004\022\r\n\005logId\030\014 \001(\t\022\031" + + "\n\021msgProcessFilterK\030\r \001(\t\022\031\n\021msgProcessF" + + "ilterV\030\016 \001(\t\022\023\n\004user\030\017 \001(\0132\005.User\022\030\n\020anc" + + "horFoldTypeV2\030\021 \001(\004\022\032\n\022processAtSeiTimeM" + + "s\030\022 \001(\004\022\030\n\020randomDispatchMs\030\023 \001(\004\022\022\n\nisD" + + "ispatch\030\024 \001(\010\022\021\n\tchannelId\030\025 \001(\r\022\031\n\021diff" + + "Sei2absSecond\030\026 \001(\004\022\032\n\022anchorFoldDuratio" + + "n\030\027 \001(\004B>\nbool doubleFlag = 1; + * @return The doubleFlag. + */ + boolean getDoubleFlag(); + + /** + * uint32 seqId = 2; + * @return The seqId. + */ + int getSeqId(); + + /** + * uint32 renewalsNum = 3; + * @return The renewalsNum. + */ + int getRenewalsNum(); + + /** + * uint32 triggersNum = 4; + * @return The triggersNum. + */ + int getTriggersNum(); + } + /** + * Protobuf type {@code DoubleLikeDetail} + */ + public static final class DoubleLikeDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:DoubleLikeDetail) + DoubleLikeDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use DoubleLikeDetail.newBuilder() to construct. + private DoubleLikeDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DoubleLikeDetail() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DoubleLikeDetail(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder.class); + } + + public static final int DOUBLEFLAG_FIELD_NUMBER = 1; + private boolean doubleFlag_ = false; + /** + * bool doubleFlag = 1; + * @return The doubleFlag. + */ + @java.lang.Override + public boolean getDoubleFlag() { + return doubleFlag_; + } + + public static final int SEQID_FIELD_NUMBER = 2; + private int seqId_ = 0; + /** + * uint32 seqId = 2; + * @return The seqId. + */ + @java.lang.Override + public int getSeqId() { + return seqId_; + } + + public static final int RENEWALSNUM_FIELD_NUMBER = 3; + private int renewalsNum_ = 0; + /** + * uint32 renewalsNum = 3; + * @return The renewalsNum. + */ + @java.lang.Override + public int getRenewalsNum() { + return renewalsNum_; + } + + public static final int TRIGGERSNUM_FIELD_NUMBER = 4; + private int triggersNum_ = 0; + /** + * uint32 triggersNum = 4; + * @return The triggersNum. + */ + @java.lang.Override + public int getTriggersNum() { + return triggersNum_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (doubleFlag_ != false) { + output.writeBool(1, doubleFlag_); + } + if (seqId_ != 0) { + output.writeUInt32(2, seqId_); + } + if (renewalsNum_ != 0) { + output.writeUInt32(3, renewalsNum_); + } + if (triggersNum_ != 0) { + output.writeUInt32(4, triggersNum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (doubleFlag_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, doubleFlag_); + } + if (seqId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, seqId_); + } + if (renewalsNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, renewalsNum_); + } + if (triggersNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, triggersNum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail) obj; + + if (getDoubleFlag() + != other.getDoubleFlag()) return false; + if (getSeqId() + != other.getSeqId()) return false; + if (getRenewalsNum() + != other.getRenewalsNum()) return false; + if (getTriggersNum() + != other.getTriggersNum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOUBLEFLAG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDoubleFlag()); + hash = (37 * hash) + SEQID_FIELD_NUMBER; + hash = (53 * hash) + getSeqId(); + hash = (37 * hash) + RENEWALSNUM_FIELD_NUMBER; + hash = (53 * hash) + getRenewalsNum(); + hash = (37 * hash) + TRIGGERSNUM_FIELD_NUMBER; + hash = (53 * hash) + getTriggersNum(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 DoubleLikeDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:DoubleLikeDetail) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + doubleFlag_ = false; + seqId_ = 0; + renewalsNum_ = 0; + triggersNum_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.doubleFlag_ = doubleFlag_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.seqId_ = seqId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.renewalsNum_ = renewalsNum_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.triggersNum_ = triggersNum_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance()) return this; + if (other.getDoubleFlag() != false) { + setDoubleFlag(other.getDoubleFlag()); + } + if (other.getSeqId() != 0) { + setSeqId(other.getSeqId()); + } + if (other.getRenewalsNum() != 0) { + setRenewalsNum(other.getRenewalsNum()); + } + if (other.getTriggersNum() != 0) { + setTriggersNum(other.getTriggersNum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + doubleFlag_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + seqId_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + renewalsNum_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + triggersNum_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean doubleFlag_ ; + /** + * bool doubleFlag = 1; + * @return The doubleFlag. + */ + @java.lang.Override + public boolean getDoubleFlag() { + return doubleFlag_; + } + /** + * bool doubleFlag = 1; + * @param value The doubleFlag to set. + * @return This builder for chaining. + */ + public Builder setDoubleFlag(boolean value) { + + doubleFlag_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool doubleFlag = 1; + * @return This builder for chaining. + */ + public Builder clearDoubleFlag() { + bitField0_ = (bitField0_ & ~0x00000001); + doubleFlag_ = false; + onChanged(); + return this; + } + + private int seqId_ ; + /** + * uint32 seqId = 2; + * @return The seqId. + */ + @java.lang.Override + public int getSeqId() { + return seqId_; + } + /** + * uint32 seqId = 2; + * @param value The seqId to set. + * @return This builder for chaining. + */ + public Builder setSeqId(int value) { + + seqId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 seqId = 2; + * @return This builder for chaining. + */ + public Builder clearSeqId() { + bitField0_ = (bitField0_ & ~0x00000002); + seqId_ = 0; + onChanged(); + return this; + } + + private int renewalsNum_ ; + /** + * uint32 renewalsNum = 3; + * @return The renewalsNum. + */ + @java.lang.Override + public int getRenewalsNum() { + return renewalsNum_; + } + /** + * uint32 renewalsNum = 3; + * @param value The renewalsNum to set. + * @return This builder for chaining. + */ + public Builder setRenewalsNum(int value) { + + renewalsNum_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 renewalsNum = 3; + * @return This builder for chaining. + */ + public Builder clearRenewalsNum() { + bitField0_ = (bitField0_ & ~0x00000004); + renewalsNum_ = 0; + onChanged(); + return this; + } + + private int triggersNum_ ; + /** + * uint32 triggersNum = 4; + * @return The triggersNum. + */ + @java.lang.Override + public int getTriggersNum() { + return triggersNum_; + } + /** + * uint32 triggersNum = 4; + * @param value The triggersNum to set. + * @return This builder for chaining. + */ + public Builder setTriggersNum(int value) { + + triggersNum_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 triggersNum = 4; + * @return This builder for chaining. + */ + public Builder clearTriggersNum() { + bitField0_ = (bitField0_ & ~0x00000008); + triggersNum_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:DoubleLikeDetail) + } + + // @@protoc_insertion_point(class_scope:DoubleLikeDetail) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DoubleLikeDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_DoubleLikeDetail_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_DoubleLikeDetail_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\026DoubleLikeDetail.proto\"_\n\020DoubleLikeDe" + + "tail\022\022\n\ndoubleFlag\030\001 \001(\010\022\r\n\005seqId\030\002 \001(\r\022" + + "\023\n\013renewalsNum\030\003 \001(\r\022\023\n\013triggersNum\030\004 \001(" + + "\rB>\nrepeated uint64 queue_sizes_list = 1; + * @return A list containing the queueSizesList. + */ + java.util.List getQueueSizesListList(); + /** + * repeated uint64 queue_sizes_list = 1; + * @return The count of queueSizesList. + */ + int getQueueSizesListCount(); + /** + * repeated uint64 queue_sizes_list = 1; + * @param index The index of the element to return. + * @return The queueSizesList at the given index. + */ + long getQueueSizesList(int index); + + /** + * uint64 self_queue_priority = 2; + * @return The selfQueuePriority. + */ + long getSelfQueuePriority(); + + /** + * uint64 priority = 3; + * @return The priority. + */ + long getPriority(); + } + /** + * Protobuf type {@code GiftIMPriority} + */ + public static final class GiftIMPriority extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GiftIMPriority) + GiftIMPriorityOrBuilder { + private static final long serialVersionUID = 0L; + // Use GiftIMPriority.newBuilder() to construct. + private GiftIMPriority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GiftIMPriority() { + queueSizesList_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GiftIMPriority(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder.class); + } + + public static final int QUEUE_SIZES_LIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList queueSizesList_ = + emptyLongList(); + /** + * repeated uint64 queue_sizes_list = 1; + * @return A list containing the queueSizesList. + */ + @java.lang.Override + public java.util.List + getQueueSizesListList() { + return queueSizesList_; + } + /** + * repeated uint64 queue_sizes_list = 1; + * @return The count of queueSizesList. + */ + public int getQueueSizesListCount() { + return queueSizesList_.size(); + } + /** + * repeated uint64 queue_sizes_list = 1; + * @param index The index of the element to return. + * @return The queueSizesList at the given index. + */ + public long getQueueSizesList(int index) { + return queueSizesList_.getLong(index); + } + private int queueSizesListMemoizedSerializedSize = -1; + + public static final int SELF_QUEUE_PRIORITY_FIELD_NUMBER = 2; + private long selfQueuePriority_ = 0L; + /** + * uint64 self_queue_priority = 2; + * @return The selfQueuePriority. + */ + @java.lang.Override + public long getSelfQueuePriority() { + return selfQueuePriority_; + } + + public static final int PRIORITY_FIELD_NUMBER = 3; + private long priority_ = 0L; + /** + * uint64 priority = 3; + * @return The priority. + */ + @java.lang.Override + public long getPriority() { + return priority_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getQueueSizesListList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(queueSizesListMemoizedSerializedSize); + } + for (int i = 0; i < queueSizesList_.size(); i++) { + output.writeUInt64NoTag(queueSizesList_.getLong(i)); + } + if (selfQueuePriority_ != 0L) { + output.writeUInt64(2, selfQueuePriority_); + } + if (priority_ != 0L) { + output.writeUInt64(3, priority_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < queueSizesList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(queueSizesList_.getLong(i)); + } + size += dataSize; + if (!getQueueSizesListList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + queueSizesListMemoizedSerializedSize = dataSize; + } + if (selfQueuePriority_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, selfQueuePriority_); + } + if (priority_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, priority_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority) obj; + + if (!getQueueSizesListList() + .equals(other.getQueueSizesListList())) return false; + if (getSelfQueuePriority() + != other.getSelfQueuePriority()) return false; + if (getPriority() + != other.getPriority()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQueueSizesListCount() > 0) { + hash = (37 * hash) + QUEUE_SIZES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getQueueSizesListList().hashCode(); + } + hash = (37 * hash) + SELF_QUEUE_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSelfQueuePriority()); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPriority()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 GiftIMPriority} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GiftIMPriority) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queueSizesList_ = emptyLongList(); + selfQueuePriority_ = 0L; + priority_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + queueSizesList_.makeImmutable(); + result.queueSizesList_ = queueSizesList_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.selfQueuePriority_ = selfQueuePriority_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.priority_ = priority_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance()) return this; + if (!other.queueSizesList_.isEmpty()) { + if (queueSizesList_.isEmpty()) { + queueSizesList_ = other.queueSizesList_; + queueSizesList_.makeImmutable(); + bitField0_ |= 0x00000001; + } else { + ensureQueueSizesListIsMutable(); + queueSizesList_.addAll(other.queueSizesList_); + } + onChanged(); + } + if (other.getSelfQueuePriority() != 0L) { + setSelfQueuePriority(other.getSelfQueuePriority()); + } + if (other.getPriority() != 0L) { + setPriority(other.getPriority()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + long v = input.readUInt64(); + ensureQueueSizesListIsMutable(); + queueSizesList_.addLong(v); + break; + } // case 8 + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureQueueSizesListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + queueSizesList_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } // case 10 + case 16: { + selfQueuePriority_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + priority_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.LongList queueSizesList_ = emptyLongList(); + private void ensureQueueSizesListIsMutable() { + if (!queueSizesList_.isModifiable()) { + queueSizesList_ = makeMutableCopy(queueSizesList_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated uint64 queue_sizes_list = 1; + * @return A list containing the queueSizesList. + */ + public java.util.List + getQueueSizesListList() { + queueSizesList_.makeImmutable(); + return queueSizesList_; + } + /** + * repeated uint64 queue_sizes_list = 1; + * @return The count of queueSizesList. + */ + public int getQueueSizesListCount() { + return queueSizesList_.size(); + } + /** + * repeated uint64 queue_sizes_list = 1; + * @param index The index of the element to return. + * @return The queueSizesList at the given index. + */ + public long getQueueSizesList(int index) { + return queueSizesList_.getLong(index); + } + /** + * repeated uint64 queue_sizes_list = 1; + * @param index The index to set the value at. + * @param value The queueSizesList to set. + * @return This builder for chaining. + */ + public Builder setQueueSizesList( + int index, long value) { + + ensureQueueSizesListIsMutable(); + queueSizesList_.setLong(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated uint64 queue_sizes_list = 1; + * @param value The queueSizesList to add. + * @return This builder for chaining. + */ + public Builder addQueueSizesList(long value) { + + ensureQueueSizesListIsMutable(); + queueSizesList_.addLong(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated uint64 queue_sizes_list = 1; + * @param values The queueSizesList to add. + * @return This builder for chaining. + */ + public Builder addAllQueueSizesList( + java.lang.Iterable values) { + ensureQueueSizesListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, queueSizesList_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated uint64 queue_sizes_list = 1; + * @return This builder for chaining. + */ + public Builder clearQueueSizesList() { + queueSizesList_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private long selfQueuePriority_ ; + /** + * uint64 self_queue_priority = 2; + * @return The selfQueuePriority. + */ + @java.lang.Override + public long getSelfQueuePriority() { + return selfQueuePriority_; + } + /** + * uint64 self_queue_priority = 2; + * @param value The selfQueuePriority to set. + * @return This builder for chaining. + */ + public Builder setSelfQueuePriority(long value) { + + selfQueuePriority_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 self_queue_priority = 2; + * @return This builder for chaining. + */ + public Builder clearSelfQueuePriority() { + bitField0_ = (bitField0_ & ~0x00000002); + selfQueuePriority_ = 0L; + onChanged(); + return this; + } + + private long priority_ ; + /** + * uint64 priority = 3; + * @return The priority. + */ + @java.lang.Override + public long getPriority() { + return priority_; + } + /** + * uint64 priority = 3; + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(long value) { + + priority_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 priority = 3; + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000004); + priority_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GiftIMPriority) + } + + // @@protoc_insertion_point(class_scope:GiftIMPriority) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GiftIMPriority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GiftIMPriority_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GiftIMPriority_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\024GiftIMPriority.proto\"Y\n\016GiftIMPriority" + + "\022\030\n\020queue_sizes_list\030\001 \003(\004\022\033\n\023self_queue" + + "_priority\030\002 \001(\004\022\020\n\010priority\030\003 \001(\004B>\n.Image image = 1; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + * .Image image = 1; + * @return The image. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImage(); + /** + * .Image image = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder(); + + /** + * string describe = 2; + * @return The describe. + */ + java.lang.String getDescribe(); + /** + * string describe = 2; + * @return The bytes for describe. + */ + com.google.protobuf.ByteString + getDescribeBytes(); + + /** + * bool notify = 3; + * @return The notify. + */ + boolean getNotify(); + + /** + * uint64 duration = 4; + * @return The duration. + */ + long getDuration(); + + /** + * uint64 id = 5; + * @return The id. + */ + long getId(); + + /** + *
+     * GiftStructFansClubInfo fansclubInfo = 6;
+     * 
+ * + * bool for_linkmic = 7; + * @return The forLinkmic. + */ + boolean getForLinkmic(); + + /** + * bool doodle = 8; + * @return The doodle. + */ + boolean getDoodle(); + + /** + * bool for_fansclub = 9; + * @return The forFansclub. + */ + boolean getForFansclub(); + + /** + * bool combo = 10; + * @return The combo. + */ + boolean getCombo(); + + /** + * uint32 type = 11; + * @return The type. + */ + int getType(); + + /** + * uint32 diamond_count = 12; + * @return The diamondCount. + */ + int getDiamondCount(); + + /** + * bool is_displayed_on_panel = 13; + * @return The isDisplayedOnPanel. + */ + boolean getIsDisplayedOnPanel(); + + /** + * uint64 primary_effect_id = 14; + * @return The primaryEffectId. + */ + long getPrimaryEffectId(); + + /** + * .Image gift_label_icon = 15; + * @return Whether the giftLabelIcon field is set. + */ + boolean hasGiftLabelIcon(); + /** + * .Image gift_label_icon = 15; + * @return The giftLabelIcon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getGiftLabelIcon(); + /** + * .Image gift_label_icon = 15; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftLabelIconOrBuilder(); + + /** + * string name = 16; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 16; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string region = 17; + * @return The region. + */ + java.lang.String getRegion(); + /** + * string region = 17; + * @return The bytes for region. + */ + com.google.protobuf.ByteString + getRegionBytes(); + + /** + * string manual = 18; + * @return The manual. + */ + java.lang.String getManual(); + /** + * string manual = 18; + * @return The bytes for manual. + */ + com.google.protobuf.ByteString + getManualBytes(); + + /** + * bool for_custom = 19; + * @return The forCustom. + */ + boolean getForCustom(); + + /** + * map<string, int64> specialEffectsMap = 20; + */ + int getSpecialEffectsMapCount(); + /** + * map<string, int64> specialEffectsMap = 20; + */ + boolean containsSpecialEffectsMap( + java.lang.String key); + /** + * Use {@link #getSpecialEffectsMapMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSpecialEffectsMap(); + /** + * map<string, int64> specialEffectsMap = 20; + */ + java.util.Map + getSpecialEffectsMapMap(); + /** + * map<string, int64> specialEffectsMap = 20; + */ + long getSpecialEffectsMapOrDefault( + java.lang.String key, + long defaultValue); + /** + * map<string, int64> specialEffectsMap = 20; + */ + long getSpecialEffectsMapOrThrow( + java.lang.String key); + + /** + * .Image icon = 21; + * @return Whether the icon field is set. + */ + boolean hasIcon(); + /** + * .Image icon = 21; + * @return The icon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon(); + /** + * .Image icon = 21; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder(); + + /** + * uint32 action_type = 22; + * @return The actionType. + */ + int getActionType(); + + /** + * int32 watermelonSeeds = 23; + * @return The watermelonSeeds. + */ + int getWatermelonSeeds(); + + /** + * string goldEffect = 24; + * @return The goldEffect. + */ + java.lang.String getGoldEffect(); + /** + * string goldEffect = 24; + * @return The bytes for goldEffect. + */ + com.google.protobuf.ByteString + getGoldEffectBytes(); + + /** + *
+     * repeated LuckyMoneyGiftMeta subs = 25;
+     * 
+ * + * int64 goldenBeans = 26; + * @return The goldenBeans. + */ + long getGoldenBeans(); + + /** + * int64 honorLevel = 27; + * @return The honorLevel. + */ + long getHonorLevel(); + + /** + * int32 itemType = 28; + * @return The itemType. + */ + int getItemType(); + + /** + * string schemeUrl = 29; + * @return The schemeUrl. + */ + java.lang.String getSchemeUrl(); + /** + * string schemeUrl = 29; + * @return The bytes for schemeUrl. + */ + com.google.protobuf.ByteString + getSchemeUrlBytes(); + + /** + *
+     * GiftPanelOperation giftOperation = 30;
+     * 
+ * + * string eventName = 31; + * @return The eventName. + */ + java.lang.String getEventName(); + /** + *
+     * GiftPanelOperation giftOperation = 30;
+     * 
+ * + * string eventName = 31; + * @return The bytes for eventName. + */ + com.google.protobuf.ByteString + getEventNameBytes(); + + /** + * int64 nobleLevel = 32; + * @return The nobleLevel. + */ + long getNobleLevel(); + + /** + * string guideUrl = 33; + * @return The guideUrl. + */ + java.lang.String getGuideUrl(); + /** + * string guideUrl = 33; + * @return The bytes for guideUrl. + */ + com.google.protobuf.ByteString + getGuideUrlBytes(); + + /** + * bool punishMedicine = 34; + * @return The punishMedicine. + */ + boolean getPunishMedicine(); + + /** + * bool forPortal = 35; + * @return The forPortal. + */ + boolean getForPortal(); + + /** + * string businessText = 36; + * @return The businessText. + */ + java.lang.String getBusinessText(); + /** + * string businessText = 36; + * @return The bytes for businessText. + */ + com.google.protobuf.ByteString + getBusinessTextBytes(); + + /** + * bool cnyGift = 37; + * @return The cnyGift. + */ + boolean getCnyGift(); + + /** + * int64 appId = 38; + * @return The appId. + */ + long getAppId(); + + /** + * int64 vipLevel = 39; + * @return The vipLevel. + */ + long getVipLevel(); + + /** + * bool isGray = 40; + * @return The isGray. + */ + boolean getIsGray(); + + /** + * string graySchemeUrl = 41; + * @return The graySchemeUrl. + */ + java.lang.String getGraySchemeUrl(); + /** + * string graySchemeUrl = 41; + * @return The bytes for graySchemeUrl. + */ + com.google.protobuf.ByteString + getGraySchemeUrlBytes(); + + /** + * int64 giftScene = 42; + * @return The giftScene. + */ + long getGiftScene(); + + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @return A list containing the triggerWords. + */ + java.util.List + getTriggerWordsList(); + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @return The count of triggerWords. + */ + int getTriggerWordsCount(); + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @param index The index of the element to return. + * @return The triggerWords at the given index. + */ + java.lang.String getTriggerWords(int index); + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @param index The index of the value to return. + * @return The bytes of the triggerWords at the given index. + */ + com.google.protobuf.ByteString + getTriggerWordsBytes(int index); + + /** + *
+     * repeated GiftBuffInfo giftBuffInfos = 45;
+     * 
+ * + * bool forFirstRecharge = 46; + * @return The forFirstRecharge. + */ + boolean getForFirstRecharge(); + + /** + * .Image dynamicImgForSelected = 47; + * @return Whether the dynamicImgForSelected field is set. + */ + boolean hasDynamicImgForSelected(); + /** + * .Image dynamicImgForSelected = 47; + * @return The dynamicImgForSelected. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDynamicImgForSelected(); + /** + * .Image dynamicImgForSelected = 47; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDynamicImgForSelectedOrBuilder(); + + /** + * int32 afterSendAction = 48; + * @return The afterSendAction. + */ + int getAfterSendAction(); + + /** + * int64 giftOfflineTime = 49; + * @return The giftOfflineTime. + */ + long getGiftOfflineTime(); + + /** + * string topBarText = 50; + * @return The topBarText. + */ + java.lang.String getTopBarText(); + /** + * string topBarText = 50; + * @return The bytes for topBarText. + */ + com.google.protobuf.ByteString + getTopBarTextBytes(); + + /** + * .Image topRightAvatar = 51; + * @return Whether the topRightAvatar field is set. + */ + boolean hasTopRightAvatar(); + /** + * .Image topRightAvatar = 51; + * @return The topRightAvatar. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getTopRightAvatar(); + /** + * .Image topRightAvatar = 51; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getTopRightAvatarOrBuilder(); + + /** + * string bannerSchemeUrl = 52; + * @return The bannerSchemeUrl. + */ + java.lang.String getBannerSchemeUrl(); + /** + * string bannerSchemeUrl = 52; + * @return The bytes for bannerSchemeUrl. + */ + com.google.protobuf.ByteString + getBannerSchemeUrlBytes(); + + /** + * bool isLocked = 53; + * @return The isLocked. + */ + boolean getIsLocked(); + + /** + * int64 reqExtraType = 54; + * @return The reqExtraType. + */ + long getReqExtraType(); + + /** + * repeated int64 assetIds = 55; + * @return A list containing the assetIds. + */ + java.util.List getAssetIdsList(); + /** + * repeated int64 assetIds = 55; + * @return The count of assetIds. + */ + int getAssetIdsCount(); + /** + * repeated int64 assetIds = 55; + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + long getAssetIds(int index); + + /** + *
+     * GiftPreviewInfo giftPreviewInfo = 56;
+     * GiftTip giftTip = 57;
+     * 
+ * + * int32 needSweepLightCount = 58; + * @return The needSweepLightCount. + */ + int getNeedSweepLightCount(); + } + /** + * Protobuf type {@code GiftStruct} + */ + public static final class GiftStruct extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GiftStruct) + GiftStructOrBuilder { + private static final long serialVersionUID = 0L; + // Use GiftStruct.newBuilder() to construct. + private GiftStruct(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GiftStruct() { + describe_ = ""; + name_ = ""; + region_ = ""; + manual_ = ""; + goldEffect_ = ""; + schemeUrl_ = ""; + eventName_ = ""; + guideUrl_ = ""; + businessText_ = ""; + graySchemeUrl_ = ""; + triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + topBarText_ = ""; + bannerSchemeUrl_ = ""; + assetIds_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GiftStruct(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 20: + return internalGetSpecialEffectsMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder.class); + } + + private int bitField0_; + public static final int IMAGE_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image image_; + /** + * .Image image = 1; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image image = 1; + * @return The image. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + return image_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + /** + * .Image image = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + return image_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + + public static final int DESCRIBE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object describe_ = ""; + /** + * string describe = 2; + * @return The describe. + */ + @java.lang.Override + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } + } + /** + * string describe = 2; + * @return The bytes for describe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTIFY_FIELD_NUMBER = 3; + private boolean notify_ = false; + /** + * bool notify = 3; + * @return The notify. + */ + @java.lang.Override + public boolean getNotify() { + return notify_; + } + + public static final int DURATION_FIELD_NUMBER = 4; + private long duration_ = 0L; + /** + * uint64 duration = 4; + * @return The duration. + */ + @java.lang.Override + public long getDuration() { + return duration_; + } + + public static final int ID_FIELD_NUMBER = 5; + private long id_ = 0L; + /** + * uint64 id = 5; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int FOR_LINKMIC_FIELD_NUMBER = 7; + private boolean forLinkmic_ = false; + /** + *
+     * GiftStructFansClubInfo fansclubInfo = 6;
+     * 
+ * + * bool for_linkmic = 7; + * @return The forLinkmic. + */ + @java.lang.Override + public boolean getForLinkmic() { + return forLinkmic_; + } + + public static final int DOODLE_FIELD_NUMBER = 8; + private boolean doodle_ = false; + /** + * bool doodle = 8; + * @return The doodle. + */ + @java.lang.Override + public boolean getDoodle() { + return doodle_; + } + + public static final int FOR_FANSCLUB_FIELD_NUMBER = 9; + private boolean forFansclub_ = false; + /** + * bool for_fansclub = 9; + * @return The forFansclub. + */ + @java.lang.Override + public boolean getForFansclub() { + return forFansclub_; + } + + public static final int COMBO_FIELD_NUMBER = 10; + private boolean combo_ = false; + /** + * bool combo = 10; + * @return The combo. + */ + @java.lang.Override + public boolean getCombo() { + return combo_; + } + + public static final int TYPE_FIELD_NUMBER = 11; + private int type_ = 0; + /** + * uint32 type = 11; + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + + public static final int DIAMOND_COUNT_FIELD_NUMBER = 12; + private int diamondCount_ = 0; + /** + * uint32 diamond_count = 12; + * @return The diamondCount. + */ + @java.lang.Override + public int getDiamondCount() { + return diamondCount_; + } + + public static final int IS_DISPLAYED_ON_PANEL_FIELD_NUMBER = 13; + private boolean isDisplayedOnPanel_ = false; + /** + * bool is_displayed_on_panel = 13; + * @return The isDisplayedOnPanel. + */ + @java.lang.Override + public boolean getIsDisplayedOnPanel() { + return isDisplayedOnPanel_; + } + + public static final int PRIMARY_EFFECT_ID_FIELD_NUMBER = 14; + private long primaryEffectId_ = 0L; + /** + * uint64 primary_effect_id = 14; + * @return The primaryEffectId. + */ + @java.lang.Override + public long getPrimaryEffectId() { + return primaryEffectId_; + } + + public static final int GIFT_LABEL_ICON_FIELD_NUMBER = 15; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image giftLabelIcon_; + /** + * .Image gift_label_icon = 15; + * @return Whether the giftLabelIcon field is set. + */ + @java.lang.Override + public boolean hasGiftLabelIcon() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .Image gift_label_icon = 15; + * @return The giftLabelIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getGiftLabelIcon() { + return giftLabelIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } + /** + * .Image gift_label_icon = 15; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftLabelIconOrBuilder() { + return giftLabelIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } + + public static final int NAME_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 16; + * @return The name. + */ + @java.lang.Override + 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 = 16; + * @return The bytes for name. + */ + @java.lang.Override + 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 REGION_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + /** + * string region = 17; + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } + } + /** + * string region = 17; + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MANUAL_FIELD_NUMBER = 18; + @SuppressWarnings("serial") + private volatile java.lang.Object manual_ = ""; + /** + * string manual = 18; + * @return The manual. + */ + @java.lang.Override + public java.lang.String getManual() { + java.lang.Object ref = manual_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manual_ = s; + return s; + } + } + /** + * string manual = 18; + * @return The bytes for manual. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getManualBytes() { + java.lang.Object ref = manual_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + manual_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FOR_CUSTOM_FIELD_NUMBER = 19; + private boolean forCustom_ = false; + /** + * bool for_custom = 19; + * @return The forCustom. + */ + @java.lang.Override + public boolean getForCustom() { + return forCustom_; + } + + public static final int SPECIALEFFECTSMAP_FIELD_NUMBER = 20; + private static final class SpecialEffectsMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_SpecialEffectsMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> specialEffectsMap_; + private com.google.protobuf.MapField + internalGetSpecialEffectsMap() { + if (specialEffectsMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SpecialEffectsMapDefaultEntryHolder.defaultEntry); + } + return specialEffectsMap_; + } + public int getSpecialEffectsMapCount() { + return internalGetSpecialEffectsMap().getMap().size(); + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public boolean containsSpecialEffectsMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSpecialEffectsMap().getMap().containsKey(key); + } + /** + * Use {@link #getSpecialEffectsMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSpecialEffectsMap() { + return getSpecialEffectsMapMap(); + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public java.util.Map getSpecialEffectsMapMap() { + return internalGetSpecialEffectsMap().getMap(); + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public long getSpecialEffectsMapOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSpecialEffectsMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public long getSpecialEffectsMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSpecialEffectsMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ICON_FIELD_NUMBER = 21; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image icon_; + /** + * .Image icon = 21; + * @return Whether the icon field is set. + */ + @java.lang.Override + public boolean hasIcon() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .Image icon = 21; + * @return The icon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + /** + * .Image icon = 21; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + + public static final int ACTION_TYPE_FIELD_NUMBER = 22; + private int actionType_ = 0; + /** + * uint32 action_type = 22; + * @return The actionType. + */ + @java.lang.Override + public int getActionType() { + return actionType_; + } + + public static final int WATERMELONSEEDS_FIELD_NUMBER = 23; + private int watermelonSeeds_ = 0; + /** + * int32 watermelonSeeds = 23; + * @return The watermelonSeeds. + */ + @java.lang.Override + public int getWatermelonSeeds() { + return watermelonSeeds_; + } + + public static final int GOLDEFFECT_FIELD_NUMBER = 24; + @SuppressWarnings("serial") + private volatile java.lang.Object goldEffect_ = ""; + /** + * string goldEffect = 24; + * @return The goldEffect. + */ + @java.lang.Override + public java.lang.String getGoldEffect() { + java.lang.Object ref = goldEffect_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + goldEffect_ = s; + return s; + } + } + /** + * string goldEffect = 24; + * @return The bytes for goldEffect. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGoldEffectBytes() { + java.lang.Object ref = goldEffect_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + goldEffect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOLDENBEANS_FIELD_NUMBER = 26; + private long goldenBeans_ = 0L; + /** + *
+     * repeated LuckyMoneyGiftMeta subs = 25;
+     * 
+ * + * int64 goldenBeans = 26; + * @return The goldenBeans. + */ + @java.lang.Override + public long getGoldenBeans() { + return goldenBeans_; + } + + public static final int HONORLEVEL_FIELD_NUMBER = 27; + private long honorLevel_ = 0L; + /** + * int64 honorLevel = 27; + * @return The honorLevel. + */ + @java.lang.Override + public long getHonorLevel() { + return honorLevel_; + } + + public static final int ITEMTYPE_FIELD_NUMBER = 28; + private int itemType_ = 0; + /** + * int32 itemType = 28; + * @return The itemType. + */ + @java.lang.Override + public int getItemType() { + return itemType_; + } + + public static final int SCHEMEURL_FIELD_NUMBER = 29; + @SuppressWarnings("serial") + private volatile java.lang.Object schemeUrl_ = ""; + /** + * string schemeUrl = 29; + * @return The schemeUrl. + */ + @java.lang.Override + public java.lang.String getSchemeUrl() { + java.lang.Object ref = schemeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemeUrl_ = s; + return s; + } + } + /** + * string schemeUrl = 29; + * @return The bytes for schemeUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemeUrlBytes() { + java.lang.Object ref = schemeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENTNAME_FIELD_NUMBER = 31; + @SuppressWarnings("serial") + private volatile java.lang.Object eventName_ = ""; + /** + *
+     * GiftPanelOperation giftOperation = 30;
+     * 
+ * + * string eventName = 31; + * @return The eventName. + */ + @java.lang.Override + public java.lang.String getEventName() { + java.lang.Object ref = eventName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventName_ = s; + return s; + } + } + /** + *
+     * GiftPanelOperation giftOperation = 30;
+     * 
+ * + * string eventName = 31; + * @return The bytes for eventName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEventNameBytes() { + java.lang.Object ref = eventName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + eventName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOBLELEVEL_FIELD_NUMBER = 32; + private long nobleLevel_ = 0L; + /** + * int64 nobleLevel = 32; + * @return The nobleLevel. + */ + @java.lang.Override + public long getNobleLevel() { + return nobleLevel_; + } + + public static final int GUIDEURL_FIELD_NUMBER = 33; + @SuppressWarnings("serial") + private volatile java.lang.Object guideUrl_ = ""; + /** + * string guideUrl = 33; + * @return The guideUrl. + */ + @java.lang.Override + public java.lang.String getGuideUrl() { + java.lang.Object ref = guideUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guideUrl_ = s; + return s; + } + } + /** + * string guideUrl = 33; + * @return The bytes for guideUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGuideUrlBytes() { + java.lang.Object ref = guideUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guideUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUNISHMEDICINE_FIELD_NUMBER = 34; + private boolean punishMedicine_ = false; + /** + * bool punishMedicine = 34; + * @return The punishMedicine. + */ + @java.lang.Override + public boolean getPunishMedicine() { + return punishMedicine_; + } + + public static final int FORPORTAL_FIELD_NUMBER = 35; + private boolean forPortal_ = false; + /** + * bool forPortal = 35; + * @return The forPortal. + */ + @java.lang.Override + public boolean getForPortal() { + return forPortal_; + } + + public static final int BUSINESSTEXT_FIELD_NUMBER = 36; + @SuppressWarnings("serial") + private volatile java.lang.Object businessText_ = ""; + /** + * string businessText = 36; + * @return The businessText. + */ + @java.lang.Override + public java.lang.String getBusinessText() { + java.lang.Object ref = businessText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + businessText_ = s; + return s; + } + } + /** + * string businessText = 36; + * @return The bytes for businessText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBusinessTextBytes() { + java.lang.Object ref = businessText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + businessText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CNYGIFT_FIELD_NUMBER = 37; + private boolean cnyGift_ = false; + /** + * bool cnyGift = 37; + * @return The cnyGift. + */ + @java.lang.Override + public boolean getCnyGift() { + return cnyGift_; + } + + public static final int APPID_FIELD_NUMBER = 38; + private long appId_ = 0L; + /** + * int64 appId = 38; + * @return The appId. + */ + @java.lang.Override + public long getAppId() { + return appId_; + } + + public static final int VIPLEVEL_FIELD_NUMBER = 39; + private long vipLevel_ = 0L; + /** + * int64 vipLevel = 39; + * @return The vipLevel. + */ + @java.lang.Override + public long getVipLevel() { + return vipLevel_; + } + + public static final int ISGRAY_FIELD_NUMBER = 40; + private boolean isGray_ = false; + /** + * bool isGray = 40; + * @return The isGray. + */ + @java.lang.Override + public boolean getIsGray() { + return isGray_; + } + + public static final int GRAYSCHEMEURL_FIELD_NUMBER = 41; + @SuppressWarnings("serial") + private volatile java.lang.Object graySchemeUrl_ = ""; + /** + * string graySchemeUrl = 41; + * @return The graySchemeUrl. + */ + @java.lang.Override + public java.lang.String getGraySchemeUrl() { + java.lang.Object ref = graySchemeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + graySchemeUrl_ = s; + return s; + } + } + /** + * string graySchemeUrl = 41; + * @return The bytes for graySchemeUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGraySchemeUrlBytes() { + java.lang.Object ref = graySchemeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + graySchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GIFTSCENE_FIELD_NUMBER = 42; + private long giftScene_ = 0L; + /** + * int64 giftScene = 42; + * @return The giftScene. + */ + @java.lang.Override + public long getGiftScene() { + return giftScene_; + } + + public static final int TRIGGERWORDS_FIELD_NUMBER = 44; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @return A list containing the triggerWords. + */ + public com.google.protobuf.ProtocolStringList + getTriggerWordsList() { + return triggerWords_; + } + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @return The count of triggerWords. + */ + public int getTriggerWordsCount() { + return triggerWords_.size(); + } + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @param index The index of the element to return. + * @return The triggerWords at the given index. + */ + public java.lang.String getTriggerWords(int index) { + return triggerWords_.get(index); + } + /** + *
+     * GiftBanner giftBanner = 43;
+     * 
+ * + * repeated string triggerWords = 44; + * @param index The index of the value to return. + * @return The bytes of the triggerWords at the given index. + */ + public com.google.protobuf.ByteString + getTriggerWordsBytes(int index) { + return triggerWords_.getByteString(index); + } + + public static final int FORFIRSTRECHARGE_FIELD_NUMBER = 46; + private boolean forFirstRecharge_ = false; + /** + *
+     * repeated GiftBuffInfo giftBuffInfos = 45;
+     * 
+ * + * bool forFirstRecharge = 46; + * @return The forFirstRecharge. + */ + @java.lang.Override + public boolean getForFirstRecharge() { + return forFirstRecharge_; + } + + public static final int DYNAMICIMGFORSELECTED_FIELD_NUMBER = 47; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image dynamicImgForSelected_; + /** + * .Image dynamicImgForSelected = 47; + * @return Whether the dynamicImgForSelected field is set. + */ + @java.lang.Override + public boolean hasDynamicImgForSelected() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .Image dynamicImgForSelected = 47; + * @return The dynamicImgForSelected. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDynamicImgForSelected() { + return dynamicImgForSelected_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } + /** + * .Image dynamicImgForSelected = 47; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDynamicImgForSelectedOrBuilder() { + return dynamicImgForSelected_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } + + public static final int AFTERSENDACTION_FIELD_NUMBER = 48; + private int afterSendAction_ = 0; + /** + * int32 afterSendAction = 48; + * @return The afterSendAction. + */ + @java.lang.Override + public int getAfterSendAction() { + return afterSendAction_; + } + + public static final int GIFTOFFLINETIME_FIELD_NUMBER = 49; + private long giftOfflineTime_ = 0L; + /** + * int64 giftOfflineTime = 49; + * @return The giftOfflineTime. + */ + @java.lang.Override + public long getGiftOfflineTime() { + return giftOfflineTime_; + } + + public static final int TOPBARTEXT_FIELD_NUMBER = 50; + @SuppressWarnings("serial") + private volatile java.lang.Object topBarText_ = ""; + /** + * string topBarText = 50; + * @return The topBarText. + */ + @java.lang.Override + public java.lang.String getTopBarText() { + java.lang.Object ref = topBarText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topBarText_ = s; + return s; + } + } + /** + * string topBarText = 50; + * @return The bytes for topBarText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTopBarTextBytes() { + java.lang.Object ref = topBarText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topBarText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOPRIGHTAVATAR_FIELD_NUMBER = 51; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image topRightAvatar_; + /** + * .Image topRightAvatar = 51; + * @return Whether the topRightAvatar field is set. + */ + @java.lang.Override + public boolean hasTopRightAvatar() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .Image topRightAvatar = 51; + * @return The topRightAvatar. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getTopRightAvatar() { + return topRightAvatar_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } + /** + * .Image topRightAvatar = 51; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getTopRightAvatarOrBuilder() { + return topRightAvatar_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } + + public static final int BANNERSCHEMEURL_FIELD_NUMBER = 52; + @SuppressWarnings("serial") + private volatile java.lang.Object bannerSchemeUrl_ = ""; + /** + * string bannerSchemeUrl = 52; + * @return The bannerSchemeUrl. + */ + @java.lang.Override + public java.lang.String getBannerSchemeUrl() { + java.lang.Object ref = bannerSchemeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bannerSchemeUrl_ = s; + return s; + } + } + /** + * string bannerSchemeUrl = 52; + * @return The bytes for bannerSchemeUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBannerSchemeUrlBytes() { + java.lang.Object ref = bannerSchemeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bannerSchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISLOCKED_FIELD_NUMBER = 53; + private boolean isLocked_ = false; + /** + * bool isLocked = 53; + * @return The isLocked. + */ + @java.lang.Override + public boolean getIsLocked() { + return isLocked_; + } + + public static final int REQEXTRATYPE_FIELD_NUMBER = 54; + private long reqExtraType_ = 0L; + /** + * int64 reqExtraType = 54; + * @return The reqExtraType. + */ + @java.lang.Override + public long getReqExtraType() { + return reqExtraType_; + } + + public static final int ASSETIDS_FIELD_NUMBER = 55; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList assetIds_ = + emptyLongList(); + /** + * repeated int64 assetIds = 55; + * @return A list containing the assetIds. + */ + @java.lang.Override + public java.util.List + getAssetIdsList() { + return assetIds_; + } + /** + * repeated int64 assetIds = 55; + * @return The count of assetIds. + */ + public int getAssetIdsCount() { + return assetIds_.size(); + } + /** + * repeated int64 assetIds = 55; + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + public long getAssetIds(int index) { + return assetIds_.getLong(index); + } + private int assetIdsMemoizedSerializedSize = -1; + + public static final int NEEDSWEEPLIGHTCOUNT_FIELD_NUMBER = 58; + private int needSweepLightCount_ = 0; + /** + *
+     * GiftPreviewInfo giftPreviewInfo = 56;
+     * GiftTip giftTip = 57;
+     * 
+ * + * int32 needSweepLightCount = 58; + * @return The needSweepLightCount. + */ + @java.lang.Override + public int getNeedSweepLightCount() { + return needSweepLightCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, describe_); + } + if (notify_ != false) { + output.writeBool(3, notify_); + } + if (duration_ != 0L) { + output.writeUInt64(4, duration_); + } + if (id_ != 0L) { + output.writeUInt64(5, id_); + } + if (forLinkmic_ != false) { + output.writeBool(7, forLinkmic_); + } + if (doodle_ != false) { + output.writeBool(8, doodle_); + } + if (forFansclub_ != false) { + output.writeBool(9, forFansclub_); + } + if (combo_ != false) { + output.writeBool(10, combo_); + } + if (type_ != 0) { + output.writeUInt32(11, type_); + } + if (diamondCount_ != 0) { + output.writeUInt32(12, diamondCount_); + } + if (isDisplayedOnPanel_ != false) { + output.writeBool(13, isDisplayedOnPanel_); + } + if (primaryEffectId_ != 0L) { + output.writeUInt64(14, primaryEffectId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(15, getGiftLabelIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, region_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manual_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, manual_); + } + if (forCustom_ != false) { + output.writeBool(19, forCustom_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSpecialEffectsMap(), + SpecialEffectsMapDefaultEntryHolder.defaultEntry, + 20); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(21, getIcon()); + } + if (actionType_ != 0) { + output.writeUInt32(22, actionType_); + } + if (watermelonSeeds_ != 0) { + output.writeInt32(23, watermelonSeeds_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goldEffect_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, goldEffect_); + } + if (goldenBeans_ != 0L) { + output.writeInt64(26, goldenBeans_); + } + if (honorLevel_ != 0L) { + output.writeInt64(27, honorLevel_); + } + if (itemType_ != 0) { + output.writeInt32(28, itemType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemeUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, schemeUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 31, eventName_); + } + if (nobleLevel_ != 0L) { + output.writeInt64(32, nobleLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guideUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 33, guideUrl_); + } + if (punishMedicine_ != false) { + output.writeBool(34, punishMedicine_); + } + if (forPortal_ != false) { + output.writeBool(35, forPortal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 36, businessText_); + } + if (cnyGift_ != false) { + output.writeBool(37, cnyGift_); + } + if (appId_ != 0L) { + output.writeInt64(38, appId_); + } + if (vipLevel_ != 0L) { + output.writeInt64(39, vipLevel_); + } + if (isGray_ != false) { + output.writeBool(40, isGray_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graySchemeUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 41, graySchemeUrl_); + } + if (giftScene_ != 0L) { + output.writeInt64(42, giftScene_); + } + for (int i = 0; i < triggerWords_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 44, triggerWords_.getRaw(i)); + } + if (forFirstRecharge_ != false) { + output.writeBool(46, forFirstRecharge_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(47, getDynamicImgForSelected()); + } + if (afterSendAction_ != 0) { + output.writeInt32(48, afterSendAction_); + } + if (giftOfflineTime_ != 0L) { + output.writeInt64(49, giftOfflineTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topBarText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 50, topBarText_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(51, getTopRightAvatar()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bannerSchemeUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 52, bannerSchemeUrl_); + } + if (isLocked_ != false) { + output.writeBool(53, isLocked_); + } + if (reqExtraType_ != 0L) { + output.writeInt64(54, reqExtraType_); + } + if (getAssetIdsList().size() > 0) { + output.writeUInt32NoTag(442); + output.writeUInt32NoTag(assetIdsMemoizedSerializedSize); + } + for (int i = 0; i < assetIds_.size(); i++) { + output.writeInt64NoTag(assetIds_.getLong(i)); + } + if (needSweepLightCount_ != 0) { + output.writeInt32(58, needSweepLightCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, describe_); + } + if (notify_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, notify_); + } + if (duration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, duration_); + } + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, id_); + } + if (forLinkmic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, forLinkmic_); + } + if (doodle_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, doodle_); + } + if (forFansclub_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, forFansclub_); + } + if (combo_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, combo_); + } + if (type_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(11, type_); + } + if (diamondCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, diamondCount_); + } + if (isDisplayedOnPanel_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(13, isDisplayedOnPanel_); + } + if (primaryEffectId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(14, primaryEffectId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getGiftLabelIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, region_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manual_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, manual_); + } + if (forCustom_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(19, forCustom_); + } + for (java.util.Map.Entry entry + : internalGetSpecialEffectsMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + specialEffectsMap__ = SpecialEffectsMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, specialEffectsMap__); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getIcon()); + } + if (actionType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(22, actionType_); + } + if (watermelonSeeds_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(23, watermelonSeeds_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goldEffect_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, goldEffect_); + } + if (goldenBeans_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(26, goldenBeans_); + } + if (honorLevel_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(27, honorLevel_); + } + if (itemType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(28, itemType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemeUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, schemeUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(31, eventName_); + } + if (nobleLevel_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(32, nobleLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guideUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(33, guideUrl_); + } + if (punishMedicine_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(34, punishMedicine_); + } + if (forPortal_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(35, forPortal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, businessText_); + } + if (cnyGift_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(37, cnyGift_); + } + if (appId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(38, appId_); + } + if (vipLevel_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(39, vipLevel_); + } + if (isGray_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(40, isGray_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graySchemeUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(41, graySchemeUrl_); + } + if (giftScene_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(42, giftScene_); + } + { + int dataSize = 0; + for (int i = 0; i < triggerWords_.size(); i++) { + dataSize += computeStringSizeNoTag(triggerWords_.getRaw(i)); + } + size += dataSize; + size += 2 * getTriggerWordsList().size(); + } + if (forFirstRecharge_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(46, forFirstRecharge_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(47, getDynamicImgForSelected()); + } + if (afterSendAction_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(48, afterSendAction_); + } + if (giftOfflineTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(49, giftOfflineTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topBarText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(50, topBarText_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(51, getTopRightAvatar()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bannerSchemeUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(52, bannerSchemeUrl_); + } + if (isLocked_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(53, isLocked_); + } + if (reqExtraType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(54, reqExtraType_); + } + { + int dataSize = 0; + for (int i = 0; i < assetIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(assetIds_.getLong(i)); + } + size += dataSize; + if (!getAssetIdsList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + assetIdsMemoizedSerializedSize = dataSize; + } + if (needSweepLightCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(58, needSweepLightCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (!getDescribe() + .equals(other.getDescribe())) return false; + if (getNotify() + != other.getNotify()) return false; + if (getDuration() + != other.getDuration()) return false; + if (getId() + != other.getId()) return false; + if (getForLinkmic() + != other.getForLinkmic()) return false; + if (getDoodle() + != other.getDoodle()) return false; + if (getForFansclub() + != other.getForFansclub()) return false; + if (getCombo() + != other.getCombo()) return false; + if (getType() + != other.getType()) return false; + if (getDiamondCount() + != other.getDiamondCount()) return false; + if (getIsDisplayedOnPanel() + != other.getIsDisplayedOnPanel()) return false; + if (getPrimaryEffectId() + != other.getPrimaryEffectId()) return false; + if (hasGiftLabelIcon() != other.hasGiftLabelIcon()) return false; + if (hasGiftLabelIcon()) { + if (!getGiftLabelIcon() + .equals(other.getGiftLabelIcon())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getRegion() + .equals(other.getRegion())) return false; + if (!getManual() + .equals(other.getManual())) return false; + if (getForCustom() + != other.getForCustom()) return false; + if (!internalGetSpecialEffectsMap().equals( + other.internalGetSpecialEffectsMap())) return false; + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon() + .equals(other.getIcon())) return false; + } + if (getActionType() + != other.getActionType()) return false; + if (getWatermelonSeeds() + != other.getWatermelonSeeds()) return false; + if (!getGoldEffect() + .equals(other.getGoldEffect())) return false; + if (getGoldenBeans() + != other.getGoldenBeans()) return false; + if (getHonorLevel() + != other.getHonorLevel()) return false; + if (getItemType() + != other.getItemType()) return false; + if (!getSchemeUrl() + .equals(other.getSchemeUrl())) return false; + if (!getEventName() + .equals(other.getEventName())) return false; + if (getNobleLevel() + != other.getNobleLevel()) return false; + if (!getGuideUrl() + .equals(other.getGuideUrl())) return false; + if (getPunishMedicine() + != other.getPunishMedicine()) return false; + if (getForPortal() + != other.getForPortal()) return false; + if (!getBusinessText() + .equals(other.getBusinessText())) return false; + if (getCnyGift() + != other.getCnyGift()) return false; + if (getAppId() + != other.getAppId()) return false; + if (getVipLevel() + != other.getVipLevel()) return false; + if (getIsGray() + != other.getIsGray()) return false; + if (!getGraySchemeUrl() + .equals(other.getGraySchemeUrl())) return false; + if (getGiftScene() + != other.getGiftScene()) return false; + if (!getTriggerWordsList() + .equals(other.getTriggerWordsList())) return false; + if (getForFirstRecharge() + != other.getForFirstRecharge()) return false; + if (hasDynamicImgForSelected() != other.hasDynamicImgForSelected()) return false; + if (hasDynamicImgForSelected()) { + if (!getDynamicImgForSelected() + .equals(other.getDynamicImgForSelected())) return false; + } + if (getAfterSendAction() + != other.getAfterSendAction()) return false; + if (getGiftOfflineTime() + != other.getGiftOfflineTime()) return false; + if (!getTopBarText() + .equals(other.getTopBarText())) return false; + if (hasTopRightAvatar() != other.hasTopRightAvatar()) return false; + if (hasTopRightAvatar()) { + if (!getTopRightAvatar() + .equals(other.getTopRightAvatar())) return false; + } + if (!getBannerSchemeUrl() + .equals(other.getBannerSchemeUrl())) return false; + if (getIsLocked() + != other.getIsLocked()) return false; + if (getReqExtraType() + != other.getReqExtraType()) return false; + if (!getAssetIdsList() + .equals(other.getAssetIdsList())) return false; + if (getNeedSweepLightCount() + != other.getNeedSweepLightCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + hash = (37 * hash) + DESCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getDescribe().hashCode(); + hash = (37 * hash) + NOTIFY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNotify()); + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDuration()); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + FOR_LINKMIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForLinkmic()); + hash = (37 * hash) + DOODLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDoodle()); + hash = (37 * hash) + FOR_FANSCLUB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForFansclub()); + hash = (37 * hash) + COMBO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCombo()); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType(); + hash = (37 * hash) + DIAMOND_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDiamondCount(); + hash = (37 * hash) + IS_DISPLAYED_ON_PANEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDisplayedOnPanel()); + hash = (37 * hash) + PRIMARY_EFFECT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPrimaryEffectId()); + if (hasGiftLabelIcon()) { + hash = (37 * hash) + GIFT_LABEL_ICON_FIELD_NUMBER; + hash = (53 * hash) + getGiftLabelIcon().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (37 * hash) + MANUAL_FIELD_NUMBER; + hash = (53 * hash) + getManual().hashCode(); + hash = (37 * hash) + FOR_CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForCustom()); + if (!internalGetSpecialEffectsMap().getMap().isEmpty()) { + hash = (37 * hash) + SPECIALEFFECTSMAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetSpecialEffectsMap().hashCode(); + } + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + hash = (37 * hash) + ACTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getActionType(); + hash = (37 * hash) + WATERMELONSEEDS_FIELD_NUMBER; + hash = (53 * hash) + getWatermelonSeeds(); + hash = (37 * hash) + GOLDEFFECT_FIELD_NUMBER; + hash = (53 * hash) + getGoldEffect().hashCode(); + hash = (37 * hash) + GOLDENBEANS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGoldenBeans()); + hash = (37 * hash) + HONORLEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHonorLevel()); + hash = (37 * hash) + ITEMTYPE_FIELD_NUMBER; + hash = (53 * hash) + getItemType(); + hash = (37 * hash) + SCHEMEURL_FIELD_NUMBER; + hash = (53 * hash) + getSchemeUrl().hashCode(); + hash = (37 * hash) + EVENTNAME_FIELD_NUMBER; + hash = (53 * hash) + getEventName().hashCode(); + hash = (37 * hash) + NOBLELEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNobleLevel()); + hash = (37 * hash) + GUIDEURL_FIELD_NUMBER; + hash = (53 * hash) + getGuideUrl().hashCode(); + hash = (37 * hash) + PUNISHMEDICINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPunishMedicine()); + hash = (37 * hash) + FORPORTAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForPortal()); + hash = (37 * hash) + BUSINESSTEXT_FIELD_NUMBER; + hash = (53 * hash) + getBusinessText().hashCode(); + hash = (37 * hash) + CNYGIFT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCnyGift()); + hash = (37 * hash) + APPID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAppId()); + hash = (37 * hash) + VIPLEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getVipLevel()); + hash = (37 * hash) + ISGRAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsGray()); + hash = (37 * hash) + GRAYSCHEMEURL_FIELD_NUMBER; + hash = (53 * hash) + getGraySchemeUrl().hashCode(); + hash = (37 * hash) + GIFTSCENE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGiftScene()); + if (getTriggerWordsCount() > 0) { + hash = (37 * hash) + TRIGGERWORDS_FIELD_NUMBER; + hash = (53 * hash) + getTriggerWordsList().hashCode(); + } + hash = (37 * hash) + FORFIRSTRECHARGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForFirstRecharge()); + if (hasDynamicImgForSelected()) { + hash = (37 * hash) + DYNAMICIMGFORSELECTED_FIELD_NUMBER; + hash = (53 * hash) + getDynamicImgForSelected().hashCode(); + } + hash = (37 * hash) + AFTERSENDACTION_FIELD_NUMBER; + hash = (53 * hash) + getAfterSendAction(); + hash = (37 * hash) + GIFTOFFLINETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGiftOfflineTime()); + hash = (37 * hash) + TOPBARTEXT_FIELD_NUMBER; + hash = (53 * hash) + getTopBarText().hashCode(); + if (hasTopRightAvatar()) { + hash = (37 * hash) + TOPRIGHTAVATAR_FIELD_NUMBER; + hash = (53 * hash) + getTopRightAvatar().hashCode(); + } + hash = (37 * hash) + BANNERSCHEMEURL_FIELD_NUMBER; + hash = (53 * hash) + getBannerSchemeUrl().hashCode(); + hash = (37 * hash) + ISLOCKED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsLocked()); + hash = (37 * hash) + REQEXTRATYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getReqExtraType()); + if (getAssetIdsCount() > 0) { + hash = (37 * hash) + ASSETIDS_FIELD_NUMBER; + hash = (53 * hash) + getAssetIdsList().hashCode(); + } + hash = (37 * hash) + NEEDSWEEPLIGHTCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getNeedSweepLightCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 GiftStruct} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GiftStruct) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 20: + return internalGetSpecialEffectsMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 20: + return internalGetMutableSpecialEffectsMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getImageFieldBuilder(); + getGiftLabelIconFieldBuilder(); + getIconFieldBuilder(); + getDynamicImgForSelectedFieldBuilder(); + getTopRightAvatarFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + describe_ = ""; + notify_ = false; + duration_ = 0L; + id_ = 0L; + forLinkmic_ = false; + doodle_ = false; + forFansclub_ = false; + combo_ = false; + type_ = 0; + diamondCount_ = 0; + isDisplayedOnPanel_ = false; + primaryEffectId_ = 0L; + giftLabelIcon_ = null; + if (giftLabelIconBuilder_ != null) { + giftLabelIconBuilder_.dispose(); + giftLabelIconBuilder_ = null; + } + name_ = ""; + region_ = ""; + manual_ = ""; + forCustom_ = false; + internalGetMutableSpecialEffectsMap().clear(); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + actionType_ = 0; + watermelonSeeds_ = 0; + goldEffect_ = ""; + goldenBeans_ = 0L; + honorLevel_ = 0L; + itemType_ = 0; + schemeUrl_ = ""; + eventName_ = ""; + nobleLevel_ = 0L; + guideUrl_ = ""; + punishMedicine_ = false; + forPortal_ = false; + businessText_ = ""; + cnyGift_ = false; + appId_ = 0L; + vipLevel_ = 0L; + isGray_ = false; + graySchemeUrl_ = ""; + giftScene_ = 0L; + triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + forFirstRecharge_ = false; + dynamicImgForSelected_ = null; + if (dynamicImgForSelectedBuilder_ != null) { + dynamicImgForSelectedBuilder_.dispose(); + dynamicImgForSelectedBuilder_ = null; + } + afterSendAction_ = 0; + giftOfflineTime_ = 0L; + topBarText_ = ""; + topRightAvatar_ = null; + if (topRightAvatarBuilder_ != null) { + topRightAvatarBuilder_.dispose(); + topRightAvatarBuilder_ = null; + } + bannerSchemeUrl_ = ""; + isLocked_ = false; + reqExtraType_ = 0L; + assetIds_ = emptyLongList(); + needSweepLightCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct(this); + if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { buildPartial1(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.image_ = imageBuilder_ == null + ? image_ + : imageBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.describe_ = describe_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notify_ = notify_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.duration_ = duration_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.forLinkmic_ = forLinkmic_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.doodle_ = doodle_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.forFansclub_ = forFansclub_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.combo_ = combo_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.diamondCount_ = diamondCount_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.isDisplayedOnPanel_ = isDisplayedOnPanel_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.primaryEffectId_ = primaryEffectId_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.giftLabelIcon_ = giftLabelIconBuilder_ == null + ? giftLabelIcon_ + : giftLabelIconBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.region_ = region_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.manual_ = manual_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.forCustom_ = forCustom_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.specialEffectsMap_ = internalGetSpecialEffectsMap(); + result.specialEffectsMap_.makeImmutable(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.icon_ = iconBuilder_ == null + ? icon_ + : iconBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.actionType_ = actionType_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.watermelonSeeds_ = watermelonSeeds_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.goldEffect_ = goldEffect_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.goldenBeans_ = goldenBeans_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.honorLevel_ = honorLevel_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.itemType_ = itemType_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.schemeUrl_ = schemeUrl_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.eventName_ = eventName_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.nobleLevel_ = nobleLevel_; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.guideUrl_ = guideUrl_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.punishMedicine_ = punishMedicine_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.forPortal_ = forPortal_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.businessText_ = businessText_; + } + if (((from_bitField1_ & 0x00000002) != 0)) { + result.cnyGift_ = cnyGift_; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + result.appId_ = appId_; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.vipLevel_ = vipLevel_; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.isGray_ = isGray_; + } + if (((from_bitField1_ & 0x00000020) != 0)) { + result.graySchemeUrl_ = graySchemeUrl_; + } + if (((from_bitField1_ & 0x00000040) != 0)) { + result.giftScene_ = giftScene_; + } + if (((from_bitField1_ & 0x00000080) != 0)) { + triggerWords_.makeImmutable(); + result.triggerWords_ = triggerWords_; + } + if (((from_bitField1_ & 0x00000100) != 0)) { + result.forFirstRecharge_ = forFirstRecharge_; + } + int to_bitField0_ = 0; + if (((from_bitField1_ & 0x00000200) != 0)) { + result.dynamicImgForSelected_ = dynamicImgForSelectedBuilder_ == null + ? dynamicImgForSelected_ + : dynamicImgForSelectedBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField1_ & 0x00000400) != 0)) { + result.afterSendAction_ = afterSendAction_; + } + if (((from_bitField1_ & 0x00000800) != 0)) { + result.giftOfflineTime_ = giftOfflineTime_; + } + if (((from_bitField1_ & 0x00001000) != 0)) { + result.topBarText_ = topBarText_; + } + if (((from_bitField1_ & 0x00002000) != 0)) { + result.topRightAvatar_ = topRightAvatarBuilder_ == null + ? topRightAvatar_ + : topRightAvatarBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField1_ & 0x00004000) != 0)) { + result.bannerSchemeUrl_ = bannerSchemeUrl_; + } + if (((from_bitField1_ & 0x00008000) != 0)) { + result.isLocked_ = isLocked_; + } + if (((from_bitField1_ & 0x00010000) != 0)) { + result.reqExtraType_ = reqExtraType_; + } + if (((from_bitField1_ & 0x00020000) != 0)) { + assetIds_.makeImmutable(); + result.assetIds_ = assetIds_; + } + if (((from_bitField1_ & 0x00040000) != 0)) { + result.needSweepLightCount_ = needSweepLightCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (!other.getDescribe().isEmpty()) { + describe_ = other.describe_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getNotify() != false) { + setNotify(other.getNotify()); + } + if (other.getDuration() != 0L) { + setDuration(other.getDuration()); + } + if (other.getId() != 0L) { + setId(other.getId()); + } + if (other.getForLinkmic() != false) { + setForLinkmic(other.getForLinkmic()); + } + if (other.getDoodle() != false) { + setDoodle(other.getDoodle()); + } + if (other.getForFansclub() != false) { + setForFansclub(other.getForFansclub()); + } + if (other.getCombo() != false) { + setCombo(other.getCombo()); + } + if (other.getType() != 0) { + setType(other.getType()); + } + if (other.getDiamondCount() != 0) { + setDiamondCount(other.getDiamondCount()); + } + if (other.getIsDisplayedOnPanel() != false) { + setIsDisplayedOnPanel(other.getIsDisplayedOnPanel()); + } + if (other.getPrimaryEffectId() != 0L) { + setPrimaryEffectId(other.getPrimaryEffectId()); + } + if (other.hasGiftLabelIcon()) { + mergeGiftLabelIcon(other.getGiftLabelIcon()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (!other.getManual().isEmpty()) { + manual_ = other.manual_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (other.getForCustom() != false) { + setForCustom(other.getForCustom()); + } + internalGetMutableSpecialEffectsMap().mergeFrom( + other.internalGetSpecialEffectsMap()); + bitField0_ |= 0x00040000; + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (other.getActionType() != 0) { + setActionType(other.getActionType()); + } + if (other.getWatermelonSeeds() != 0) { + setWatermelonSeeds(other.getWatermelonSeeds()); + } + if (!other.getGoldEffect().isEmpty()) { + goldEffect_ = other.goldEffect_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (other.getGoldenBeans() != 0L) { + setGoldenBeans(other.getGoldenBeans()); + } + if (other.getHonorLevel() != 0L) { + setHonorLevel(other.getHonorLevel()); + } + if (other.getItemType() != 0) { + setItemType(other.getItemType()); + } + if (!other.getSchemeUrl().isEmpty()) { + schemeUrl_ = other.schemeUrl_; + bitField0_ |= 0x04000000; + onChanged(); + } + if (!other.getEventName().isEmpty()) { + eventName_ = other.eventName_; + bitField0_ |= 0x08000000; + onChanged(); + } + if (other.getNobleLevel() != 0L) { + setNobleLevel(other.getNobleLevel()); + } + if (!other.getGuideUrl().isEmpty()) { + guideUrl_ = other.guideUrl_; + bitField0_ |= 0x20000000; + onChanged(); + } + if (other.getPunishMedicine() != false) { + setPunishMedicine(other.getPunishMedicine()); + } + if (other.getForPortal() != false) { + setForPortal(other.getForPortal()); + } + if (!other.getBusinessText().isEmpty()) { + businessText_ = other.businessText_; + bitField1_ |= 0x00000001; + onChanged(); + } + if (other.getCnyGift() != false) { + setCnyGift(other.getCnyGift()); + } + if (other.getAppId() != 0L) { + setAppId(other.getAppId()); + } + if (other.getVipLevel() != 0L) { + setVipLevel(other.getVipLevel()); + } + if (other.getIsGray() != false) { + setIsGray(other.getIsGray()); + } + if (!other.getGraySchemeUrl().isEmpty()) { + graySchemeUrl_ = other.graySchemeUrl_; + bitField1_ |= 0x00000020; + onChanged(); + } + if (other.getGiftScene() != 0L) { + setGiftScene(other.getGiftScene()); + } + if (!other.triggerWords_.isEmpty()) { + if (triggerWords_.isEmpty()) { + triggerWords_ = other.triggerWords_; + bitField1_ |= 0x00000080; + } else { + ensureTriggerWordsIsMutable(); + triggerWords_.addAll(other.triggerWords_); + } + onChanged(); + } + if (other.getForFirstRecharge() != false) { + setForFirstRecharge(other.getForFirstRecharge()); + } + if (other.hasDynamicImgForSelected()) { + mergeDynamicImgForSelected(other.getDynamicImgForSelected()); + } + if (other.getAfterSendAction() != 0) { + setAfterSendAction(other.getAfterSendAction()); + } + if (other.getGiftOfflineTime() != 0L) { + setGiftOfflineTime(other.getGiftOfflineTime()); + } + if (!other.getTopBarText().isEmpty()) { + topBarText_ = other.topBarText_; + bitField1_ |= 0x00001000; + onChanged(); + } + if (other.hasTopRightAvatar()) { + mergeTopRightAvatar(other.getTopRightAvatar()); + } + if (!other.getBannerSchemeUrl().isEmpty()) { + bannerSchemeUrl_ = other.bannerSchemeUrl_; + bitField1_ |= 0x00004000; + onChanged(); + } + if (other.getIsLocked() != false) { + setIsLocked(other.getIsLocked()); + } + if (other.getReqExtraType() != 0L) { + setReqExtraType(other.getReqExtraType()); + } + if (!other.assetIds_.isEmpty()) { + if (assetIds_.isEmpty()) { + assetIds_ = other.assetIds_; + assetIds_.makeImmutable(); + bitField1_ |= 0x00020000; + } else { + ensureAssetIdsIsMutable(); + assetIds_.addAll(other.assetIds_); + } + onChanged(); + } + if (other.getNeedSweepLightCount() != 0) { + setNeedSweepLightCount(other.getNeedSweepLightCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + describe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + notify_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + duration_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 56: { + forLinkmic_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 56 + case 64: { + doodle_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 72: { + forFansclub_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + combo_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: { + type_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: { + diamondCount_ = input.readUInt32(); + bitField0_ |= 0x00000400; + break; + } // case 96 + case 104: { + isDisplayedOnPanel_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 104 + case 112: { + primaryEffectId_ = input.readUInt64(); + bitField0_ |= 0x00001000; + break; + } // case 112 + case 122: { + input.readMessage( + getGiftLabelIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 130: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 130 + case 138: { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 138 + case 146: { + manual_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 146 + case 152: { + forCustom_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 152 + case 162: { + com.google.protobuf.MapEntry + specialEffectsMap__ = input.readMessage( + SpecialEffectsMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSpecialEffectsMap().getMutableMap().put( + specialEffectsMap__.getKey(), specialEffectsMap__.getValue()); + bitField0_ |= 0x00040000; + break; + } // case 162 + case 170: { + input.readMessage( + getIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 170 + case 176: { + actionType_ = input.readUInt32(); + bitField0_ |= 0x00100000; + break; + } // case 176 + case 184: { + watermelonSeeds_ = input.readInt32(); + bitField0_ |= 0x00200000; + break; + } // case 184 + case 194: { + goldEffect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 194 + case 208: { + goldenBeans_ = input.readInt64(); + bitField0_ |= 0x00800000; + break; + } // case 208 + case 216: { + honorLevel_ = input.readInt64(); + bitField0_ |= 0x01000000; + break; + } // case 216 + case 224: { + itemType_ = input.readInt32(); + bitField0_ |= 0x02000000; + break; + } // case 224 + case 234: { + schemeUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x04000000; + break; + } // case 234 + case 250: { + eventName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x08000000; + break; + } // case 250 + case 256: { + nobleLevel_ = input.readInt64(); + bitField0_ |= 0x10000000; + break; + } // case 256 + case 266: { + guideUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 266 + case 272: { + punishMedicine_ = input.readBool(); + bitField0_ |= 0x40000000; + break; + } // case 272 + case 280: { + forPortal_ = input.readBool(); + bitField0_ |= 0x80000000; + break; + } // case 280 + case 290: { + businessText_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000001; + break; + } // case 290 + case 296: { + cnyGift_ = input.readBool(); + bitField1_ |= 0x00000002; + break; + } // case 296 + case 304: { + appId_ = input.readInt64(); + bitField1_ |= 0x00000004; + break; + } // case 304 + case 312: { + vipLevel_ = input.readInt64(); + bitField1_ |= 0x00000008; + break; + } // case 312 + case 320: { + isGray_ = input.readBool(); + bitField1_ |= 0x00000010; + break; + } // case 320 + case 330: { + graySchemeUrl_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000020; + break; + } // case 330 + case 336: { + giftScene_ = input.readInt64(); + bitField1_ |= 0x00000040; + break; + } // case 336 + case 354: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTriggerWordsIsMutable(); + triggerWords_.add(s); + break; + } // case 354 + case 368: { + forFirstRecharge_ = input.readBool(); + bitField1_ |= 0x00000100; + break; + } // case 368 + case 378: { + input.readMessage( + getDynamicImgForSelectedFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000200; + break; + } // case 378 + case 384: { + afterSendAction_ = input.readInt32(); + bitField1_ |= 0x00000400; + break; + } // case 384 + case 392: { + giftOfflineTime_ = input.readInt64(); + bitField1_ |= 0x00000800; + break; + } // case 392 + case 402: { + topBarText_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00001000; + break; + } // case 402 + case 410: { + input.readMessage( + getTopRightAvatarFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00002000; + break; + } // case 410 + case 418: { + bannerSchemeUrl_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00004000; + break; + } // case 418 + case 424: { + isLocked_ = input.readBool(); + bitField1_ |= 0x00008000; + break; + } // case 424 + case 432: { + reqExtraType_ = input.readInt64(); + bitField1_ |= 0x00010000; + break; + } // case 432 + case 440: { + long v = input.readInt64(); + ensureAssetIdsIsMutable(); + assetIds_.addLong(v); + break; + } // case 440 + case 442: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAssetIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + assetIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 442 + case 464: { + needSweepLightCount_ = input.readInt32(); + bitField1_ |= 0x00040000; + break; + } // case 464 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + private int bitField1_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imageBuilder_; + /** + * .Image image = 1; + * @return Whether the image field is set. + */ + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image image = 1; + * @return The image. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + * .Image image = 1; + */ + public Builder setImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + } else { + imageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image image = 1; + */ + public Builder setImage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image image = 1; + */ + public Builder mergeImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + image_ != null && + image_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImageBuilder().mergeFrom(value); + } else { + image_ = value; + } + } else { + imageBuilder_.mergeFrom(value); + } + if (image_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Image image = 1; + */ + public Builder clearImage() { + bitField0_ = (bitField0_ & ~0x00000001); + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image image = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImageBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + * .Image image = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + } + /** + * .Image image = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.lang.Object describe_ = ""; + /** + * string describe = 2; + * @return The describe. + */ + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string describe = 2; + * @return The bytes for describe. + */ + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string describe = 2; + * @param value The describe to set. + * @return This builder for chaining. + */ + public Builder setDescribe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + describe_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string describe = 2; + * @return This builder for chaining. + */ + public Builder clearDescribe() { + describe_ = getDefaultInstance().getDescribe(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string describe = 2; + * @param value The bytes for describe to set. + * @return This builder for chaining. + */ + public Builder setDescribeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + describe_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean notify_ ; + /** + * bool notify = 3; + * @return The notify. + */ + @java.lang.Override + public boolean getNotify() { + return notify_; + } + /** + * bool notify = 3; + * @param value The notify to set. + * @return This builder for chaining. + */ + public Builder setNotify(boolean value) { + + notify_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool notify = 3; + * @return This builder for chaining. + */ + public Builder clearNotify() { + bitField0_ = (bitField0_ & ~0x00000004); + notify_ = false; + onChanged(); + return this; + } + + private long duration_ ; + /** + * uint64 duration = 4; + * @return The duration. + */ + @java.lang.Override + public long getDuration() { + return duration_; + } + /** + * uint64 duration = 4; + * @param value The duration to set. + * @return This builder for chaining. + */ + public Builder setDuration(long value) { + + duration_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 duration = 4; + * @return This builder for chaining. + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000008); + duration_ = 0L; + onChanged(); + return this; + } + + private long id_ ; + /** + * uint64 id = 5; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + * uint64 id = 5; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 id = 5; + * @return This builder for chaining. + */ + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000010); + id_ = 0L; + onChanged(); + return this; + } + + private boolean forLinkmic_ ; + /** + *
+       * GiftStructFansClubInfo fansclubInfo = 6;
+       * 
+ * + * bool for_linkmic = 7; + * @return The forLinkmic. + */ + @java.lang.Override + public boolean getForLinkmic() { + return forLinkmic_; + } + /** + *
+       * GiftStructFansClubInfo fansclubInfo = 6;
+       * 
+ * + * bool for_linkmic = 7; + * @param value The forLinkmic to set. + * @return This builder for chaining. + */ + public Builder setForLinkmic(boolean value) { + + forLinkmic_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+       * GiftStructFansClubInfo fansclubInfo = 6;
+       * 
+ * + * bool for_linkmic = 7; + * @return This builder for chaining. + */ + public Builder clearForLinkmic() { + bitField0_ = (bitField0_ & ~0x00000020); + forLinkmic_ = false; + onChanged(); + return this; + } + + private boolean doodle_ ; + /** + * bool doodle = 8; + * @return The doodle. + */ + @java.lang.Override + public boolean getDoodle() { + return doodle_; + } + /** + * bool doodle = 8; + * @param value The doodle to set. + * @return This builder for chaining. + */ + public Builder setDoodle(boolean value) { + + doodle_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * bool doodle = 8; + * @return This builder for chaining. + */ + public Builder clearDoodle() { + bitField0_ = (bitField0_ & ~0x00000040); + doodle_ = false; + onChanged(); + return this; + } + + private boolean forFansclub_ ; + /** + * bool for_fansclub = 9; + * @return The forFansclub. + */ + @java.lang.Override + public boolean getForFansclub() { + return forFansclub_; + } + /** + * bool for_fansclub = 9; + * @param value The forFansclub to set. + * @return This builder for chaining. + */ + public Builder setForFansclub(boolean value) { + + forFansclub_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bool for_fansclub = 9; + * @return This builder for chaining. + */ + public Builder clearForFansclub() { + bitField0_ = (bitField0_ & ~0x00000080); + forFansclub_ = false; + onChanged(); + return this; + } + + private boolean combo_ ; + /** + * bool combo = 10; + * @return The combo. + */ + @java.lang.Override + public boolean getCombo() { + return combo_; + } + /** + * bool combo = 10; + * @param value The combo to set. + * @return This builder for chaining. + */ + public Builder setCombo(boolean value) { + + combo_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * bool combo = 10; + * @return This builder for chaining. + */ + public Builder clearCombo() { + bitField0_ = (bitField0_ & ~0x00000100); + combo_ = false; + onChanged(); + return this; + } + + private int type_ ; + /** + * uint32 type = 11; + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + /** + * uint32 type = 11; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(int value) { + + type_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * uint32 type = 11; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000200); + type_ = 0; + onChanged(); + return this; + } + + private int diamondCount_ ; + /** + * uint32 diamond_count = 12; + * @return The diamondCount. + */ + @java.lang.Override + public int getDiamondCount() { + return diamondCount_; + } + /** + * uint32 diamond_count = 12; + * @param value The diamondCount to set. + * @return This builder for chaining. + */ + public Builder setDiamondCount(int value) { + + diamondCount_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * uint32 diamond_count = 12; + * @return This builder for chaining. + */ + public Builder clearDiamondCount() { + bitField0_ = (bitField0_ & ~0x00000400); + diamondCount_ = 0; + onChanged(); + return this; + } + + private boolean isDisplayedOnPanel_ ; + /** + * bool is_displayed_on_panel = 13; + * @return The isDisplayedOnPanel. + */ + @java.lang.Override + public boolean getIsDisplayedOnPanel() { + return isDisplayedOnPanel_; + } + /** + * bool is_displayed_on_panel = 13; + * @param value The isDisplayedOnPanel to set. + * @return This builder for chaining. + */ + public Builder setIsDisplayedOnPanel(boolean value) { + + isDisplayedOnPanel_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * bool is_displayed_on_panel = 13; + * @return This builder for chaining. + */ + public Builder clearIsDisplayedOnPanel() { + bitField0_ = (bitField0_ & ~0x00000800); + isDisplayedOnPanel_ = false; + onChanged(); + return this; + } + + private long primaryEffectId_ ; + /** + * uint64 primary_effect_id = 14; + * @return The primaryEffectId. + */ + @java.lang.Override + public long getPrimaryEffectId() { + return primaryEffectId_; + } + /** + * uint64 primary_effect_id = 14; + * @param value The primaryEffectId to set. + * @return This builder for chaining. + */ + public Builder setPrimaryEffectId(long value) { + + primaryEffectId_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * uint64 primary_effect_id = 14; + * @return This builder for chaining. + */ + public Builder clearPrimaryEffectId() { + bitField0_ = (bitField0_ & ~0x00001000); + primaryEffectId_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image giftLabelIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> giftLabelIconBuilder_; + /** + * .Image gift_label_icon = 15; + * @return Whether the giftLabelIcon field is set. + */ + public boolean hasGiftLabelIcon() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * .Image gift_label_icon = 15; + * @return The giftLabelIcon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getGiftLabelIcon() { + if (giftLabelIconBuilder_ == null) { + return giftLabelIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } else { + return giftLabelIconBuilder_.getMessage(); + } + } + /** + * .Image gift_label_icon = 15; + */ + public Builder setGiftLabelIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftLabelIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + giftLabelIcon_ = value; + } else { + giftLabelIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .Image gift_label_icon = 15; + */ + public Builder setGiftLabelIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (giftLabelIconBuilder_ == null) { + giftLabelIcon_ = builderForValue.build(); + } else { + giftLabelIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .Image gift_label_icon = 15; + */ + public Builder mergeGiftLabelIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftLabelIconBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + giftLabelIcon_ != null && + giftLabelIcon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getGiftLabelIconBuilder().mergeFrom(value); + } else { + giftLabelIcon_ = value; + } + } else { + giftLabelIconBuilder_.mergeFrom(value); + } + if (giftLabelIcon_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * .Image gift_label_icon = 15; + */ + public Builder clearGiftLabelIcon() { + bitField0_ = (bitField0_ & ~0x00002000); + giftLabelIcon_ = null; + if (giftLabelIconBuilder_ != null) { + giftLabelIconBuilder_.dispose(); + giftLabelIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image gift_label_icon = 15; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getGiftLabelIconBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getGiftLabelIconFieldBuilder().getBuilder(); + } + /** + * .Image gift_label_icon = 15; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftLabelIconOrBuilder() { + if (giftLabelIconBuilder_ != null) { + return giftLabelIconBuilder_.getMessageOrBuilder(); + } else { + return giftLabelIcon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } + } + /** + * .Image gift_label_icon = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getGiftLabelIconFieldBuilder() { + if (giftLabelIconBuilder_ == null) { + giftLabelIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getGiftLabelIcon(), + getParentForChildren(), + isClean()); + giftLabelIcon_ = null; + } + return giftLabelIconBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * string name = 16; + * @return The name. + */ + 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 = 16; + * @return The bytes for name. + */ + 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 = 16; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * string name = 16; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * string name = 16; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * string region = 17; + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string region = 17; + * @return The bytes for region. + */ + public com.google.protobuf.ByteString + getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string region = 17; + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + region_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * string region = 17; + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * string region = 17; + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private java.lang.Object manual_ = ""; + /** + * string manual = 18; + * @return The manual. + */ + public java.lang.String getManual() { + java.lang.Object ref = manual_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manual_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string manual = 18; + * @return The bytes for manual. + */ + public com.google.protobuf.ByteString + getManualBytes() { + java.lang.Object ref = manual_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + manual_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string manual = 18; + * @param value The manual to set. + * @return This builder for chaining. + */ + public Builder setManual( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + manual_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * string manual = 18; + * @return This builder for chaining. + */ + public Builder clearManual() { + manual_ = getDefaultInstance().getManual(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + * string manual = 18; + * @param value The bytes for manual to set. + * @return This builder for chaining. + */ + public Builder setManualBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + manual_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private boolean forCustom_ ; + /** + * bool for_custom = 19; + * @return The forCustom. + */ + @java.lang.Override + public boolean getForCustom() { + return forCustom_; + } + /** + * bool for_custom = 19; + * @param value The forCustom to set. + * @return This builder for chaining. + */ + public Builder setForCustom(boolean value) { + + forCustom_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * bool for_custom = 19; + * @return This builder for chaining. + */ + public Builder clearForCustom() { + bitField0_ = (bitField0_ & ~0x00020000); + forCustom_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> specialEffectsMap_; + private com.google.protobuf.MapField + internalGetSpecialEffectsMap() { + if (specialEffectsMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SpecialEffectsMapDefaultEntryHolder.defaultEntry); + } + return specialEffectsMap_; + } + private com.google.protobuf.MapField + internalGetMutableSpecialEffectsMap() { + if (specialEffectsMap_ == null) { + specialEffectsMap_ = com.google.protobuf.MapField.newMapField( + SpecialEffectsMapDefaultEntryHolder.defaultEntry); + } + if (!specialEffectsMap_.isMutable()) { + specialEffectsMap_ = specialEffectsMap_.copy(); + } + bitField0_ |= 0x00040000; + onChanged(); + return specialEffectsMap_; + } + public int getSpecialEffectsMapCount() { + return internalGetSpecialEffectsMap().getMap().size(); + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public boolean containsSpecialEffectsMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSpecialEffectsMap().getMap().containsKey(key); + } + /** + * Use {@link #getSpecialEffectsMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSpecialEffectsMap() { + return getSpecialEffectsMapMap(); + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public java.util.Map getSpecialEffectsMapMap() { + return internalGetSpecialEffectsMap().getMap(); + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public long getSpecialEffectsMapOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSpecialEffectsMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + @java.lang.Override + public long getSpecialEffectsMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSpecialEffectsMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearSpecialEffectsMap() { + bitField0_ = (bitField0_ & ~0x00040000); + internalGetMutableSpecialEffectsMap().getMutableMap() + .clear(); + return this; + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + public Builder removeSpecialEffectsMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableSpecialEffectsMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSpecialEffectsMap() { + bitField0_ |= 0x00040000; + return internalGetMutableSpecialEffectsMap().getMutableMap(); + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + public Builder putSpecialEffectsMap( + java.lang.String key, + long value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableSpecialEffectsMap().getMutableMap() + .put(key, value); + bitField0_ |= 0x00040000; + return this; + } + /** + * map<string, int64> specialEffectsMap = 20; + */ + public Builder putAllSpecialEffectsMap( + java.util.Map values) { + internalGetMutableSpecialEffectsMap().getMutableMap() + .putAll(values); + bitField0_ |= 0x00040000; + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image icon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> iconBuilder_; + /** + * .Image icon = 21; + * @return Whether the icon field is set. + */ + public boolean hasIcon() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * .Image icon = 21; + * @return The icon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + if (iconBuilder_ == null) { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } else { + return iconBuilder_.getMessage(); + } + } + /** + * .Image icon = 21; + */ + public Builder setIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + icon_ = value; + } else { + iconBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .Image icon = 21; + */ + public Builder setIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .Image icon = 21; + */ + public Builder mergeIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) && + icon_ != null && + icon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getIconBuilder().mergeFrom(value); + } else { + icon_ = value; + } + } else { + iconBuilder_.mergeFrom(value); + } + if (icon_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + /** + * .Image icon = 21; + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00080000); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image icon = 21; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getIconBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getIconFieldBuilder().getBuilder(); + } + /** + * .Image icon = 21; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + if (iconBuilder_ != null) { + return iconBuilder_.getMessageOrBuilder(); + } else { + return icon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + } + /** + * .Image icon = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getIconFieldBuilder() { + if (iconBuilder_ == null) { + iconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getIcon(), + getParentForChildren(), + isClean()); + icon_ = null; + } + return iconBuilder_; + } + + private int actionType_ ; + /** + * uint32 action_type = 22; + * @return The actionType. + */ + @java.lang.Override + public int getActionType() { + return actionType_; + } + /** + * uint32 action_type = 22; + * @param value The actionType to set. + * @return This builder for chaining. + */ + public Builder setActionType(int value) { + + actionType_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * uint32 action_type = 22; + * @return This builder for chaining. + */ + public Builder clearActionType() { + bitField0_ = (bitField0_ & ~0x00100000); + actionType_ = 0; + onChanged(); + return this; + } + + private int watermelonSeeds_ ; + /** + * int32 watermelonSeeds = 23; + * @return The watermelonSeeds. + */ + @java.lang.Override + public int getWatermelonSeeds() { + return watermelonSeeds_; + } + /** + * int32 watermelonSeeds = 23; + * @param value The watermelonSeeds to set. + * @return This builder for chaining. + */ + public Builder setWatermelonSeeds(int value) { + + watermelonSeeds_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * int32 watermelonSeeds = 23; + * @return This builder for chaining. + */ + public Builder clearWatermelonSeeds() { + bitField0_ = (bitField0_ & ~0x00200000); + watermelonSeeds_ = 0; + onChanged(); + return this; + } + + private java.lang.Object goldEffect_ = ""; + /** + * string goldEffect = 24; + * @return The goldEffect. + */ + public java.lang.String getGoldEffect() { + java.lang.Object ref = goldEffect_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + goldEffect_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string goldEffect = 24; + * @return The bytes for goldEffect. + */ + public com.google.protobuf.ByteString + getGoldEffectBytes() { + java.lang.Object ref = goldEffect_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + goldEffect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string goldEffect = 24; + * @param value The goldEffect to set. + * @return This builder for chaining. + */ + public Builder setGoldEffect( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + goldEffect_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * string goldEffect = 24; + * @return This builder for chaining. + */ + public Builder clearGoldEffect() { + goldEffect_ = getDefaultInstance().getGoldEffect(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + /** + * string goldEffect = 24; + * @param value The bytes for goldEffect to set. + * @return This builder for chaining. + */ + public Builder setGoldEffectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + goldEffect_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private long goldenBeans_ ; + /** + *
+       * repeated LuckyMoneyGiftMeta subs = 25;
+       * 
+ * + * int64 goldenBeans = 26; + * @return The goldenBeans. + */ + @java.lang.Override + public long getGoldenBeans() { + return goldenBeans_; + } + /** + *
+       * repeated LuckyMoneyGiftMeta subs = 25;
+       * 
+ * + * int64 goldenBeans = 26; + * @param value The goldenBeans to set. + * @return This builder for chaining. + */ + public Builder setGoldenBeans(long value) { + + goldenBeans_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + *
+       * repeated LuckyMoneyGiftMeta subs = 25;
+       * 
+ * + * int64 goldenBeans = 26; + * @return This builder for chaining. + */ + public Builder clearGoldenBeans() { + bitField0_ = (bitField0_ & ~0x00800000); + goldenBeans_ = 0L; + onChanged(); + return this; + } + + private long honorLevel_ ; + /** + * int64 honorLevel = 27; + * @return The honorLevel. + */ + @java.lang.Override + public long getHonorLevel() { + return honorLevel_; + } + /** + * int64 honorLevel = 27; + * @param value The honorLevel to set. + * @return This builder for chaining. + */ + public Builder setHonorLevel(long value) { + + honorLevel_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * int64 honorLevel = 27; + * @return This builder for chaining. + */ + public Builder clearHonorLevel() { + bitField0_ = (bitField0_ & ~0x01000000); + honorLevel_ = 0L; + onChanged(); + return this; + } + + private int itemType_ ; + /** + * int32 itemType = 28; + * @return The itemType. + */ + @java.lang.Override + public int getItemType() { + return itemType_; + } + /** + * int32 itemType = 28; + * @param value The itemType to set. + * @return This builder for chaining. + */ + public Builder setItemType(int value) { + + itemType_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * int32 itemType = 28; + * @return This builder for chaining. + */ + public Builder clearItemType() { + bitField0_ = (bitField0_ & ~0x02000000); + itemType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object schemeUrl_ = ""; + /** + * string schemeUrl = 29; + * @return The schemeUrl. + */ + public java.lang.String getSchemeUrl() { + java.lang.Object ref = schemeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string schemeUrl = 29; + * @return The bytes for schemeUrl. + */ + public com.google.protobuf.ByteString + getSchemeUrlBytes() { + java.lang.Object ref = schemeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string schemeUrl = 29; + * @param value The schemeUrl to set. + * @return This builder for chaining. + */ + public Builder setSchemeUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schemeUrl_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * string schemeUrl = 29; + * @return This builder for chaining. + */ + public Builder clearSchemeUrl() { + schemeUrl_ = getDefaultInstance().getSchemeUrl(); + bitField0_ = (bitField0_ & ~0x04000000); + onChanged(); + return this; + } + /** + * string schemeUrl = 29; + * @param value The bytes for schemeUrl to set. + * @return This builder for chaining. + */ + public Builder setSchemeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemeUrl_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + + private java.lang.Object eventName_ = ""; + /** + *
+       * GiftPanelOperation giftOperation = 30;
+       * 
+ * + * string eventName = 31; + * @return The eventName. + */ + public java.lang.String getEventName() { + java.lang.Object ref = eventName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * GiftPanelOperation giftOperation = 30;
+       * 
+ * + * string eventName = 31; + * @return The bytes for eventName. + */ + public com.google.protobuf.ByteString + getEventNameBytes() { + java.lang.Object ref = eventName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + eventName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * GiftPanelOperation giftOperation = 30;
+       * 
+ * + * string eventName = 31; + * @param value The eventName to set. + * @return This builder for chaining. + */ + public Builder setEventName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + eventName_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + *
+       * GiftPanelOperation giftOperation = 30;
+       * 
+ * + * string eventName = 31; + * @return This builder for chaining. + */ + public Builder clearEventName() { + eventName_ = getDefaultInstance().getEventName(); + bitField0_ = (bitField0_ & ~0x08000000); + onChanged(); + return this; + } + /** + *
+       * GiftPanelOperation giftOperation = 30;
+       * 
+ * + * string eventName = 31; + * @param value The bytes for eventName to set. + * @return This builder for chaining. + */ + public Builder setEventNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + eventName_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + + private long nobleLevel_ ; + /** + * int64 nobleLevel = 32; + * @return The nobleLevel. + */ + @java.lang.Override + public long getNobleLevel() { + return nobleLevel_; + } + /** + * int64 nobleLevel = 32; + * @param value The nobleLevel to set. + * @return This builder for chaining. + */ + public Builder setNobleLevel(long value) { + + nobleLevel_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * int64 nobleLevel = 32; + * @return This builder for chaining. + */ + public Builder clearNobleLevel() { + bitField0_ = (bitField0_ & ~0x10000000); + nobleLevel_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object guideUrl_ = ""; + /** + * string guideUrl = 33; + * @return The guideUrl. + */ + public java.lang.String getGuideUrl() { + java.lang.Object ref = guideUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guideUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string guideUrl = 33; + * @return The bytes for guideUrl. + */ + public com.google.protobuf.ByteString + getGuideUrlBytes() { + java.lang.Object ref = guideUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guideUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string guideUrl = 33; + * @param value The guideUrl to set. + * @return This builder for chaining. + */ + public Builder setGuideUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + guideUrl_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * string guideUrl = 33; + * @return This builder for chaining. + */ + public Builder clearGuideUrl() { + guideUrl_ = getDefaultInstance().getGuideUrl(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + return this; + } + /** + * string guideUrl = 33; + * @param value The bytes for guideUrl to set. + * @return This builder for chaining. + */ + public Builder setGuideUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + guideUrl_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + private boolean punishMedicine_ ; + /** + * bool punishMedicine = 34; + * @return The punishMedicine. + */ + @java.lang.Override + public boolean getPunishMedicine() { + return punishMedicine_; + } + /** + * bool punishMedicine = 34; + * @param value The punishMedicine to set. + * @return This builder for chaining. + */ + public Builder setPunishMedicine(boolean value) { + + punishMedicine_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * bool punishMedicine = 34; + * @return This builder for chaining. + */ + public Builder clearPunishMedicine() { + bitField0_ = (bitField0_ & ~0x40000000); + punishMedicine_ = false; + onChanged(); + return this; + } + + private boolean forPortal_ ; + /** + * bool forPortal = 35; + * @return The forPortal. + */ + @java.lang.Override + public boolean getForPortal() { + return forPortal_; + } + /** + * bool forPortal = 35; + * @param value The forPortal to set. + * @return This builder for chaining. + */ + public Builder setForPortal(boolean value) { + + forPortal_ = value; + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * bool forPortal = 35; + * @return This builder for chaining. + */ + public Builder clearForPortal() { + bitField0_ = (bitField0_ & ~0x80000000); + forPortal_ = false; + onChanged(); + return this; + } + + private java.lang.Object businessText_ = ""; + /** + * string businessText = 36; + * @return The businessText. + */ + public java.lang.String getBusinessText() { + java.lang.Object ref = businessText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + businessText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string businessText = 36; + * @return The bytes for businessText. + */ + public com.google.protobuf.ByteString + getBusinessTextBytes() { + java.lang.Object ref = businessText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + businessText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string businessText = 36; + * @param value The businessText to set. + * @return This builder for chaining. + */ + public Builder setBusinessText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + businessText_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string businessText = 36; + * @return This builder for chaining. + */ + public Builder clearBusinessText() { + businessText_ = getDefaultInstance().getBusinessText(); + bitField1_ = (bitField1_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string businessText = 36; + * @param value The bytes for businessText to set. + * @return This builder for chaining. + */ + public Builder setBusinessTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + businessText_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean cnyGift_ ; + /** + * bool cnyGift = 37; + * @return The cnyGift. + */ + @java.lang.Override + public boolean getCnyGift() { + return cnyGift_; + } + /** + * bool cnyGift = 37; + * @param value The cnyGift to set. + * @return This builder for chaining. + */ + public Builder setCnyGift(boolean value) { + + cnyGift_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool cnyGift = 37; + * @return This builder for chaining. + */ + public Builder clearCnyGift() { + bitField1_ = (bitField1_ & ~0x00000002); + cnyGift_ = false; + onChanged(); + return this; + } + + private long appId_ ; + /** + * int64 appId = 38; + * @return The appId. + */ + @java.lang.Override + public long getAppId() { + return appId_; + } + /** + * int64 appId = 38; + * @param value The appId to set. + * @return This builder for chaining. + */ + public Builder setAppId(long value) { + + appId_ = value; + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 appId = 38; + * @return This builder for chaining. + */ + public Builder clearAppId() { + bitField1_ = (bitField1_ & ~0x00000004); + appId_ = 0L; + onChanged(); + return this; + } + + private long vipLevel_ ; + /** + * int64 vipLevel = 39; + * @return The vipLevel. + */ + @java.lang.Override + public long getVipLevel() { + return vipLevel_; + } + /** + * int64 vipLevel = 39; + * @param value The vipLevel to set. + * @return This builder for chaining. + */ + public Builder setVipLevel(long value) { + + vipLevel_ = value; + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int64 vipLevel = 39; + * @return This builder for chaining. + */ + public Builder clearVipLevel() { + bitField1_ = (bitField1_ & ~0x00000008); + vipLevel_ = 0L; + onChanged(); + return this; + } + + private boolean isGray_ ; + /** + * bool isGray = 40; + * @return The isGray. + */ + @java.lang.Override + public boolean getIsGray() { + return isGray_; + } + /** + * bool isGray = 40; + * @param value The isGray to set. + * @return This builder for chaining. + */ + public Builder setIsGray(boolean value) { + + isGray_ = value; + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool isGray = 40; + * @return This builder for chaining. + */ + public Builder clearIsGray() { + bitField1_ = (bitField1_ & ~0x00000010); + isGray_ = false; + onChanged(); + return this; + } + + private java.lang.Object graySchemeUrl_ = ""; + /** + * string graySchemeUrl = 41; + * @return The graySchemeUrl. + */ + public java.lang.String getGraySchemeUrl() { + java.lang.Object ref = graySchemeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + graySchemeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string graySchemeUrl = 41; + * @return The bytes for graySchemeUrl. + */ + public com.google.protobuf.ByteString + getGraySchemeUrlBytes() { + java.lang.Object ref = graySchemeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + graySchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string graySchemeUrl = 41; + * @param value The graySchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setGraySchemeUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + graySchemeUrl_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string graySchemeUrl = 41; + * @return This builder for chaining. + */ + public Builder clearGraySchemeUrl() { + graySchemeUrl_ = getDefaultInstance().getGraySchemeUrl(); + bitField1_ = (bitField1_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string graySchemeUrl = 41; + * @param value The bytes for graySchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setGraySchemeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + graySchemeUrl_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + + private long giftScene_ ; + /** + * int64 giftScene = 42; + * @return The giftScene. + */ + @java.lang.Override + public long getGiftScene() { + return giftScene_; + } + /** + * int64 giftScene = 42; + * @param value The giftScene to set. + * @return This builder for chaining. + */ + public Builder setGiftScene(long value) { + + giftScene_ = value; + bitField1_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int64 giftScene = 42; + * @return This builder for chaining. + */ + public Builder clearGiftScene() { + bitField1_ = (bitField1_ & ~0x00000040); + giftScene_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTriggerWordsIsMutable() { + if (!triggerWords_.isModifiable()) { + triggerWords_ = new com.google.protobuf.LazyStringArrayList(triggerWords_); + } + bitField1_ |= 0x00000080; + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @return A list containing the triggerWords. + */ + public com.google.protobuf.ProtocolStringList + getTriggerWordsList() { + triggerWords_.makeImmutable(); + return triggerWords_; + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @return The count of triggerWords. + */ + public int getTriggerWordsCount() { + return triggerWords_.size(); + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @param index The index of the element to return. + * @return The triggerWords at the given index. + */ + public java.lang.String getTriggerWords(int index) { + return triggerWords_.get(index); + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @param index The index of the value to return. + * @return The bytes of the triggerWords at the given index. + */ + public com.google.protobuf.ByteString + getTriggerWordsBytes(int index) { + return triggerWords_.getByteString(index); + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @param index The index to set the value at. + * @param value The triggerWords to set. + * @return This builder for chaining. + */ + public Builder setTriggerWords( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTriggerWordsIsMutable(); + triggerWords_.set(index, value); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @param value The triggerWords to add. + * @return This builder for chaining. + */ + public Builder addTriggerWords( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTriggerWordsIsMutable(); + triggerWords_.add(value); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @param values The triggerWords to add. + * @return This builder for chaining. + */ + public Builder addAllTriggerWords( + java.lang.Iterable values) { + ensureTriggerWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, triggerWords_); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @return This builder for chaining. + */ + public Builder clearTriggerWords() { + triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField1_ = (bitField1_ & ~0x00000080);; + onChanged(); + return this; + } + /** + *
+       * GiftBanner giftBanner = 43;
+       * 
+ * + * repeated string triggerWords = 44; + * @param value The bytes of the triggerWords to add. + * @return This builder for chaining. + */ + public Builder addTriggerWordsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTriggerWordsIsMutable(); + triggerWords_.add(value); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + + private boolean forFirstRecharge_ ; + /** + *
+       * repeated GiftBuffInfo giftBuffInfos = 45;
+       * 
+ * + * bool forFirstRecharge = 46; + * @return The forFirstRecharge. + */ + @java.lang.Override + public boolean getForFirstRecharge() { + return forFirstRecharge_; + } + /** + *
+       * repeated GiftBuffInfo giftBuffInfos = 45;
+       * 
+ * + * bool forFirstRecharge = 46; + * @param value The forFirstRecharge to set. + * @return This builder for chaining. + */ + public Builder setForFirstRecharge(boolean value) { + + forFirstRecharge_ = value; + bitField1_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * repeated GiftBuffInfo giftBuffInfos = 45;
+       * 
+ * + * bool forFirstRecharge = 46; + * @return This builder for chaining. + */ + public Builder clearForFirstRecharge() { + bitField1_ = (bitField1_ & ~0x00000100); + forFirstRecharge_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image dynamicImgForSelected_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> dynamicImgForSelectedBuilder_; + /** + * .Image dynamicImgForSelected = 47; + * @return Whether the dynamicImgForSelected field is set. + */ + public boolean hasDynamicImgForSelected() { + return ((bitField1_ & 0x00000200) != 0); + } + /** + * .Image dynamicImgForSelected = 47; + * @return The dynamicImgForSelected. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDynamicImgForSelected() { + if (dynamicImgForSelectedBuilder_ == null) { + return dynamicImgForSelected_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } else { + return dynamicImgForSelectedBuilder_.getMessage(); + } + } + /** + * .Image dynamicImgForSelected = 47; + */ + public Builder setDynamicImgForSelected(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (dynamicImgForSelectedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dynamicImgForSelected_ = value; + } else { + dynamicImgForSelectedBuilder_.setMessage(value); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .Image dynamicImgForSelected = 47; + */ + public Builder setDynamicImgForSelected( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (dynamicImgForSelectedBuilder_ == null) { + dynamicImgForSelected_ = builderForValue.build(); + } else { + dynamicImgForSelectedBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .Image dynamicImgForSelected = 47; + */ + public Builder mergeDynamicImgForSelected(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (dynamicImgForSelectedBuilder_ == null) { + if (((bitField1_ & 0x00000200) != 0) && + dynamicImgForSelected_ != null && + dynamicImgForSelected_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getDynamicImgForSelectedBuilder().mergeFrom(value); + } else { + dynamicImgForSelected_ = value; + } + } else { + dynamicImgForSelectedBuilder_.mergeFrom(value); + } + if (dynamicImgForSelected_ != null) { + bitField1_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * .Image dynamicImgForSelected = 47; + */ + public Builder clearDynamicImgForSelected() { + bitField1_ = (bitField1_ & ~0x00000200); + dynamicImgForSelected_ = null; + if (dynamicImgForSelectedBuilder_ != null) { + dynamicImgForSelectedBuilder_.dispose(); + dynamicImgForSelectedBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image dynamicImgForSelected = 47; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getDynamicImgForSelectedBuilder() { + bitField1_ |= 0x00000200; + onChanged(); + return getDynamicImgForSelectedFieldBuilder().getBuilder(); + } + /** + * .Image dynamicImgForSelected = 47; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDynamicImgForSelectedOrBuilder() { + if (dynamicImgForSelectedBuilder_ != null) { + return dynamicImgForSelectedBuilder_.getMessageOrBuilder(); + } else { + return dynamicImgForSelected_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } + } + /** + * .Image dynamicImgForSelected = 47; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getDynamicImgForSelectedFieldBuilder() { + if (dynamicImgForSelectedBuilder_ == null) { + dynamicImgForSelectedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getDynamicImgForSelected(), + getParentForChildren(), + isClean()); + dynamicImgForSelected_ = null; + } + return dynamicImgForSelectedBuilder_; + } + + private int afterSendAction_ ; + /** + * int32 afterSendAction = 48; + * @return The afterSendAction. + */ + @java.lang.Override + public int getAfterSendAction() { + return afterSendAction_; + } + /** + * int32 afterSendAction = 48; + * @param value The afterSendAction to set. + * @return This builder for chaining. + */ + public Builder setAfterSendAction(int value) { + + afterSendAction_ = value; + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + /** + * int32 afterSendAction = 48; + * @return This builder for chaining. + */ + public Builder clearAfterSendAction() { + bitField1_ = (bitField1_ & ~0x00000400); + afterSendAction_ = 0; + onChanged(); + return this; + } + + private long giftOfflineTime_ ; + /** + * int64 giftOfflineTime = 49; + * @return The giftOfflineTime. + */ + @java.lang.Override + public long getGiftOfflineTime() { + return giftOfflineTime_; + } + /** + * int64 giftOfflineTime = 49; + * @param value The giftOfflineTime to set. + * @return This builder for chaining. + */ + public Builder setGiftOfflineTime(long value) { + + giftOfflineTime_ = value; + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * int64 giftOfflineTime = 49; + * @return This builder for chaining. + */ + public Builder clearGiftOfflineTime() { + bitField1_ = (bitField1_ & ~0x00000800); + giftOfflineTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object topBarText_ = ""; + /** + * string topBarText = 50; + * @return The topBarText. + */ + public java.lang.String getTopBarText() { + java.lang.Object ref = topBarText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topBarText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string topBarText = 50; + * @return The bytes for topBarText. + */ + public com.google.protobuf.ByteString + getTopBarTextBytes() { + java.lang.Object ref = topBarText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topBarText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string topBarText = 50; + * @param value The topBarText to set. + * @return This builder for chaining. + */ + public Builder setTopBarText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + topBarText_ = value; + bitField1_ |= 0x00001000; + onChanged(); + return this; + } + /** + * string topBarText = 50; + * @return This builder for chaining. + */ + public Builder clearTopBarText() { + topBarText_ = getDefaultInstance().getTopBarText(); + bitField1_ = (bitField1_ & ~0x00001000); + onChanged(); + return this; + } + /** + * string topBarText = 50; + * @param value The bytes for topBarText to set. + * @return This builder for chaining. + */ + public Builder setTopBarTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + topBarText_ = value; + bitField1_ |= 0x00001000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image topRightAvatar_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> topRightAvatarBuilder_; + /** + * .Image topRightAvatar = 51; + * @return Whether the topRightAvatar field is set. + */ + public boolean hasTopRightAvatar() { + return ((bitField1_ & 0x00002000) != 0); + } + /** + * .Image topRightAvatar = 51; + * @return The topRightAvatar. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getTopRightAvatar() { + if (topRightAvatarBuilder_ == null) { + return topRightAvatar_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } else { + return topRightAvatarBuilder_.getMessage(); + } + } + /** + * .Image topRightAvatar = 51; + */ + public Builder setTopRightAvatar(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (topRightAvatarBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topRightAvatar_ = value; + } else { + topRightAvatarBuilder_.setMessage(value); + } + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .Image topRightAvatar = 51; + */ + public Builder setTopRightAvatar( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (topRightAvatarBuilder_ == null) { + topRightAvatar_ = builderForValue.build(); + } else { + topRightAvatarBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .Image topRightAvatar = 51; + */ + public Builder mergeTopRightAvatar(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (topRightAvatarBuilder_ == null) { + if (((bitField1_ & 0x00002000) != 0) && + topRightAvatar_ != null && + topRightAvatar_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getTopRightAvatarBuilder().mergeFrom(value); + } else { + topRightAvatar_ = value; + } + } else { + topRightAvatarBuilder_.mergeFrom(value); + } + if (topRightAvatar_ != null) { + bitField1_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * .Image topRightAvatar = 51; + */ + public Builder clearTopRightAvatar() { + bitField1_ = (bitField1_ & ~0x00002000); + topRightAvatar_ = null; + if (topRightAvatarBuilder_ != null) { + topRightAvatarBuilder_.dispose(); + topRightAvatarBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image topRightAvatar = 51; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getTopRightAvatarBuilder() { + bitField1_ |= 0x00002000; + onChanged(); + return getTopRightAvatarFieldBuilder().getBuilder(); + } + /** + * .Image topRightAvatar = 51; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getTopRightAvatarOrBuilder() { + if (topRightAvatarBuilder_ != null) { + return topRightAvatarBuilder_.getMessageOrBuilder(); + } else { + return topRightAvatar_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } + } + /** + * .Image topRightAvatar = 51; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getTopRightAvatarFieldBuilder() { + if (topRightAvatarBuilder_ == null) { + topRightAvatarBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getTopRightAvatar(), + getParentForChildren(), + isClean()); + topRightAvatar_ = null; + } + return topRightAvatarBuilder_; + } + + private java.lang.Object bannerSchemeUrl_ = ""; + /** + * string bannerSchemeUrl = 52; + * @return The bannerSchemeUrl. + */ + public java.lang.String getBannerSchemeUrl() { + java.lang.Object ref = bannerSchemeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bannerSchemeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string bannerSchemeUrl = 52; + * @return The bytes for bannerSchemeUrl. + */ + public com.google.protobuf.ByteString + getBannerSchemeUrlBytes() { + java.lang.Object ref = bannerSchemeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bannerSchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string bannerSchemeUrl = 52; + * @param value The bannerSchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setBannerSchemeUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + bannerSchemeUrl_ = value; + bitField1_ |= 0x00004000; + onChanged(); + return this; + } + /** + * string bannerSchemeUrl = 52; + * @return This builder for chaining. + */ + public Builder clearBannerSchemeUrl() { + bannerSchemeUrl_ = getDefaultInstance().getBannerSchemeUrl(); + bitField1_ = (bitField1_ & ~0x00004000); + onChanged(); + return this; + } + /** + * string bannerSchemeUrl = 52; + * @param value The bytes for bannerSchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setBannerSchemeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + bannerSchemeUrl_ = value; + bitField1_ |= 0x00004000; + onChanged(); + return this; + } + + private boolean isLocked_ ; + /** + * bool isLocked = 53; + * @return The isLocked. + */ + @java.lang.Override + public boolean getIsLocked() { + return isLocked_; + } + /** + * bool isLocked = 53; + * @param value The isLocked to set. + * @return This builder for chaining. + */ + public Builder setIsLocked(boolean value) { + + isLocked_ = value; + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * bool isLocked = 53; + * @return This builder for chaining. + */ + public Builder clearIsLocked() { + bitField1_ = (bitField1_ & ~0x00008000); + isLocked_ = false; + onChanged(); + return this; + } + + private long reqExtraType_ ; + /** + * int64 reqExtraType = 54; + * @return The reqExtraType. + */ + @java.lang.Override + public long getReqExtraType() { + return reqExtraType_; + } + /** + * int64 reqExtraType = 54; + * @param value The reqExtraType to set. + * @return This builder for chaining. + */ + public Builder setReqExtraType(long value) { + + reqExtraType_ = value; + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * int64 reqExtraType = 54; + * @return This builder for chaining. + */ + public Builder clearReqExtraType() { + bitField1_ = (bitField1_ & ~0x00010000); + reqExtraType_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList assetIds_ = emptyLongList(); + private void ensureAssetIdsIsMutable() { + if (!assetIds_.isModifiable()) { + assetIds_ = makeMutableCopy(assetIds_); + } + bitField1_ |= 0x00020000; + } + /** + * repeated int64 assetIds = 55; + * @return A list containing the assetIds. + */ + public java.util.List + getAssetIdsList() { + assetIds_.makeImmutable(); + return assetIds_; + } + /** + * repeated int64 assetIds = 55; + * @return The count of assetIds. + */ + public int getAssetIdsCount() { + return assetIds_.size(); + } + /** + * repeated int64 assetIds = 55; + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + public long getAssetIds(int index) { + return assetIds_.getLong(index); + } + /** + * repeated int64 assetIds = 55; + * @param index The index to set the value at. + * @param value The assetIds to set. + * @return This builder for chaining. + */ + public Builder setAssetIds( + int index, long value) { + + ensureAssetIdsIsMutable(); + assetIds_.setLong(index, value); + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * repeated int64 assetIds = 55; + * @param value The assetIds to add. + * @return This builder for chaining. + */ + public Builder addAssetIds(long value) { + + ensureAssetIdsIsMutable(); + assetIds_.addLong(value); + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * repeated int64 assetIds = 55; + * @param values The assetIds to add. + * @return This builder for chaining. + */ + public Builder addAllAssetIds( + java.lang.Iterable values) { + ensureAssetIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetIds_); + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * repeated int64 assetIds = 55; + * @return This builder for chaining. + */ + public Builder clearAssetIds() { + assetIds_ = emptyLongList(); + bitField1_ = (bitField1_ & ~0x00020000); + onChanged(); + return this; + } + + private int needSweepLightCount_ ; + /** + *
+       * GiftPreviewInfo giftPreviewInfo = 56;
+       * GiftTip giftTip = 57;
+       * 
+ * + * int32 needSweepLightCount = 58; + * @return The needSweepLightCount. + */ + @java.lang.Override + public int getNeedSweepLightCount() { + return needSweepLightCount_; + } + /** + *
+       * GiftPreviewInfo giftPreviewInfo = 56;
+       * GiftTip giftTip = 57;
+       * 
+ * + * int32 needSweepLightCount = 58; + * @param value The needSweepLightCount to set. + * @return This builder for chaining. + */ + public Builder setNeedSweepLightCount(int value) { + + needSweepLightCount_ = value; + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+       * GiftPreviewInfo giftPreviewInfo = 56;
+       * GiftTip giftTip = 57;
+       * 
+ * + * int32 needSweepLightCount = 58; + * @return This builder for chaining. + */ + public Builder clearNeedSweepLightCount() { + bitField1_ = (bitField1_ & ~0x00040000); + needSweepLightCount_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GiftStruct) + } + + // @@protoc_insertion_point(class_scope:GiftStruct) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GiftStruct parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GiftStruct_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GiftStruct_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GiftStruct_SpecialEffectsMapEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GiftStruct_SpecialEffectsMapEntry_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\020GiftStruct.proto\032\013Image.proto\"\241\t\n\nGift" + + "Struct\022\025\n\005image\030\001 \001(\0132\006.Image\022\020\n\010describ" + + "e\030\002 \001(\t\022\016\n\006notify\030\003 \001(\010\022\020\n\010duration\030\004 \001(" + + "\004\022\n\n\002id\030\005 \001(\004\022\023\n\013for_linkmic\030\007 \001(\010\022\016\n\006do" + + "odle\030\010 \001(\010\022\024\n\014for_fansclub\030\t \001(\010\022\r\n\005comb" + + "o\030\n \001(\010\022\014\n\004type\030\013 \001(\r\022\025\n\rdiamond_count\030\014" + + " \001(\r\022\035\n\025is_displayed_on_panel\030\r \001(\010\022\031\n\021p" + + "rimary_effect_id\030\016 \001(\004\022\037\n\017gift_label_ico" + + "n\030\017 \001(\0132\006.Image\022\014\n\004name\030\020 \001(\t\022\016\n\006region\030" + + "\021 \001(\t\022\016\n\006manual\030\022 \001(\t\022\022\n\nfor_custom\030\023 \001(" + + "\010\022=\n\021specialEffectsMap\030\024 \003(\0132\".GiftStruc" + + "t.SpecialEffectsMapEntry\022\024\n\004icon\030\025 \001(\0132\006" + + ".Image\022\023\n\013action_type\030\026 \001(\r\022\027\n\017watermelo" + + "nSeeds\030\027 \001(\005\022\022\n\ngoldEffect\030\030 \001(\t\022\023\n\013gold" + + "enBeans\030\032 \001(\003\022\022\n\nhonorLevel\030\033 \001(\003\022\020\n\010ite" + + "mType\030\034 \001(\005\022\021\n\tschemeUrl\030\035 \001(\t\022\021\n\teventN" + + "ame\030\037 \001(\t\022\022\n\nnobleLevel\030 \001(\003\022\020\n\010guideUr" + + "l\030! \001(\t\022\026\n\016punishMedicine\030\" \001(\010\022\021\n\tforPo" + + "rtal\030# \001(\010\022\024\n\014businessText\030$ \001(\t\022\017\n\007cnyG" + + "ift\030% \001(\010\022\r\n\005appId\030& \001(\003\022\020\n\010vipLevel\030\' \001" + + "(\003\022\016\n\006isGray\030( \001(\010\022\025\n\rgraySchemeUrl\030) \001(" + + "\t\022\021\n\tgiftScene\030* \001(\003\022\024\n\014triggerWords\030, \003" + + "(\t\022\030\n\020forFirstRecharge\030. \001(\010\022%\n\025dynamicI" + + "mgForSelected\030/ \001(\0132\006.Image\022\027\n\017afterSend" + + "Action\0300 \001(\005\022\027\n\017giftOfflineTime\0301 \001(\003\022\022\n" + + "\ntopBarText\0302 \001(\t\022\036\n\016topRightAvatar\0303 \001(" + + "\0132\006.Image\022\027\n\017bannerSchemeUrl\0304 \001(\t\022\020\n\010is" + + "Locked\0305 \001(\010\022\024\n\014reqExtraType\0306 \001(\003\022\020\n\010as" + + "setIds\0307 \003(\003\022\033\n\023needSweepLightCount\030: \001(" + + "\005\0328\n\026SpecialEffectsMapEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\003:\0028\001B>\nrepeated string urlListList = 1; + * @return A list containing the urlListList. + */ + java.util.List + getUrlListListList(); + /** + * repeated string urlListList = 1; + * @return The count of urlListList. + */ + int getUrlListListCount(); + /** + * repeated string urlListList = 1; + * @param index The index of the element to return. + * @return The urlListList at the given index. + */ + java.lang.String getUrlListList(int index); + /** + * repeated string urlListList = 1; + * @param index The index of the value to return. + * @return The bytes of the urlListList at the given index. + */ + com.google.protobuf.ByteString + getUrlListListBytes(int index); + + /** + * string uri = 2; + * @return The uri. + */ + java.lang.String getUri(); + /** + * string uri = 2; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * int64 height = 3; + * @return The height. + */ + long getHeight(); + + /** + * int64 width = 4; + * @return The width. + */ + long getWidth(); + + /** + * string avgColor = 5; + * @return The avgColor. + */ + java.lang.String getAvgColor(); + /** + * string avgColor = 5; + * @return The bytes for avgColor. + */ + com.google.protobuf.ByteString + getAvgColorBytes(); + + /** + * int32 imageType = 6; + * @return The imageType. + */ + int getImageType(); + + /** + * string openWebUrl = 7; + * @return The openWebUrl. + */ + java.lang.String getOpenWebUrl(); + /** + * string openWebUrl = 7; + * @return The bytes for openWebUrl. + */ + com.google.protobuf.ByteString + getOpenWebUrlBytes(); + + /** + * .Image.Content content = 8; + * @return Whether the content field is set. + */ + boolean hasContent(); + /** + * .Image.Content content = 8; + * @return The content. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content getContent(); + /** + * .Image.Content content = 8; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder getContentOrBuilder(); + + /** + * bool isAnimated = 9; + * @return The isAnimated. + */ + boolean getIsAnimated(); + + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + java.util.List + getFlexSettingListListList(); + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getFlexSettingListList(int index); + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + int getFlexSettingListListCount(); + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + java.util.List + getFlexSettingListListOrBuilderList(); + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getFlexSettingListListOrBuilder( + int index); + + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + java.util.List + getTextSettingListListList(); + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getTextSettingListList(int index); + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + int getTextSettingListListCount(); + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + java.util.List + getTextSettingListListOrBuilderList(); + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getTextSettingListListOrBuilder( + int index); + } + /** + * Protobuf type {@code Image} + */ + public static final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Image) + ImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Image() { + urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + uri_ = ""; + avgColor_ = ""; + openWebUrl_ = ""; + flexSettingListList_ = java.util.Collections.emptyList(); + textSettingListList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder.class); + } + + public interface ContentOrBuilder extends + // @@protoc_insertion_point(interface_extends:Image.Content) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string fontColor = 2; + * @return The fontColor. + */ + java.lang.String getFontColor(); + /** + * string fontColor = 2; + * @return The bytes for fontColor. + */ + com.google.protobuf.ByteString + getFontColorBytes(); + + /** + * int64 level = 3; + * @return The level. + */ + long getLevel(); + + /** + * string alternativeText = 4; + * @return The alternativeText. + */ + java.lang.String getAlternativeText(); + /** + * string alternativeText = 4; + * @return The bytes for alternativeText. + */ + com.google.protobuf.ByteString + getAlternativeTextBytes(); + } + /** + * Protobuf type {@code Image.Content} + */ + public static final class Content extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Image.Content) + ContentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Content.newBuilder() to construct. + private Content(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Content() { + name_ = ""; + fontColor_ = ""; + alternativeText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Content(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + 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 = 1; + * @return The bytes for name. + */ + @java.lang.Override + 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 FONTCOLOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object fontColor_ = ""; + /** + * string fontColor = 2; + * @return The fontColor. + */ + @java.lang.Override + public java.lang.String getFontColor() { + java.lang.Object ref = fontColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontColor_ = s; + return s; + } + } + /** + * string fontColor = 2; + * @return The bytes for fontColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFontColorBytes() { + java.lang.Object ref = fontColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fontColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 3; + private long level_ = 0L; + /** + * int64 level = 3; + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + + public static final int ALTERNATIVETEXT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object alternativeText_ = ""; + /** + * string alternativeText = 4; + * @return The alternativeText. + */ + @java.lang.Override + public java.lang.String getAlternativeText() { + java.lang.Object ref = alternativeText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternativeText_ = s; + return s; + } + } + /** + * string alternativeText = 4; + * @return The bytes for alternativeText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAlternativeTextBytes() { + java.lang.Object ref = alternativeText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alternativeText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fontColor_); + } + if (level_ != 0L) { + output.writeInt64(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, alternativeText_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fontColor_); + } + if (level_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, alternativeText_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getFontColor() + .equals(other.getFontColor())) return false; + if (getLevel() + != other.getLevel()) return false; + if (!getAlternativeText() + .equals(other.getAlternativeText())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FONTCOLOR_FIELD_NUMBER; + hash = (53 * hash) + getFontColor().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLevel()); + hash = (37 * hash) + ALTERNATIVETEXT_FIELD_NUMBER; + hash = (53 * hash) + getAlternativeText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 Image.Content} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Image.Content) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + fontColor_ = ""; + level_ = 0L; + alternativeText_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fontColor_ = fontColor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.alternativeText_ = alternativeText_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFontColor().isEmpty()) { + fontColor_ = other.fontColor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getLevel() != 0L) { + setLevel(other.getLevel()); + } + if (!other.getAlternativeText().isEmpty()) { + alternativeText_ = other.alternativeText_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + fontColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + level_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + alternativeText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + 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 = 1; + * @return The bytes for name. + */ + 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 = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object fontColor_ = ""; + /** + * string fontColor = 2; + * @return The fontColor. + */ + public java.lang.String getFontColor() { + java.lang.Object ref = fontColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string fontColor = 2; + * @return The bytes for fontColor. + */ + public com.google.protobuf.ByteString + getFontColorBytes() { + java.lang.Object ref = fontColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fontColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string fontColor = 2; + * @param value The fontColor to set. + * @return This builder for chaining. + */ + public Builder setFontColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fontColor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string fontColor = 2; + * @return This builder for chaining. + */ + public Builder clearFontColor() { + fontColor_ = getDefaultInstance().getFontColor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string fontColor = 2; + * @param value The bytes for fontColor to set. + * @return This builder for chaining. + */ + public Builder setFontColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fontColor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long level_ ; + /** + * int64 level = 3; + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + /** + * int64 level = 3; + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(long value) { + + level_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 level = 3; + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000004); + level_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object alternativeText_ = ""; + /** + * string alternativeText = 4; + * @return The alternativeText. + */ + public java.lang.String getAlternativeText() { + java.lang.Object ref = alternativeText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternativeText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string alternativeText = 4; + * @return The bytes for alternativeText. + */ + public com.google.protobuf.ByteString + getAlternativeTextBytes() { + java.lang.Object ref = alternativeText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alternativeText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string alternativeText = 4; + * @param value The alternativeText to set. + * @return This builder for chaining. + */ + public Builder setAlternativeText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + alternativeText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string alternativeText = 4; + * @return This builder for chaining. + */ + public Builder clearAlternativeText() { + alternativeText_ = getDefaultInstance().getAlternativeText(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string alternativeText = 4; + * @param value The bytes for alternativeText to set. + * @return This builder for chaining. + */ + public Builder setAlternativeTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + alternativeText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Image.Content) + } + + // @@protoc_insertion_point(class_scope:Image.Content) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Content parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NinePatchSettingOrBuilder extends + // @@protoc_insertion_point(interface_extends:Image.NinePatchSetting) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code Image.NinePatchSetting} + */ + public static final class NinePatchSetting extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Image.NinePatchSetting) + NinePatchSettingOrBuilder { + private static final long serialVersionUID = 0L; + // Use NinePatchSetting.newBuilder() to construct. + private NinePatchSetting(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NinePatchSetting() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NinePatchSetting(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 Image.NinePatchSetting} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Image.NinePatchSetting) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Image.NinePatchSetting) + } + + // @@protoc_insertion_point(class_scope:Image.NinePatchSetting) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NinePatchSetting parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int URLLISTLIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string urlListList = 1; + * @return A list containing the urlListList. + */ + public com.google.protobuf.ProtocolStringList + getUrlListListList() { + return urlListList_; + } + /** + * repeated string urlListList = 1; + * @return The count of urlListList. + */ + public int getUrlListListCount() { + return urlListList_.size(); + } + /** + * repeated string urlListList = 1; + * @param index The index of the element to return. + * @return The urlListList at the given index. + */ + public java.lang.String getUrlListList(int index) { + return urlListList_.get(index); + } + /** + * repeated string urlListList = 1; + * @param index The index of the value to return. + * @return The bytes of the urlListList at the given index. + */ + public com.google.protobuf.ByteString + getUrlListListBytes(int index) { + return urlListList_.getByteString(index); + } + + public static final int URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * string uri = 2; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * string uri = 2; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private long height_ = 0L; + /** + * int64 height = 3; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + + public static final int WIDTH_FIELD_NUMBER = 4; + private long width_ = 0L; + /** + * int64 width = 4; + * @return The width. + */ + @java.lang.Override + public long getWidth() { + return width_; + } + + public static final int AVGCOLOR_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object avgColor_ = ""; + /** + * string avgColor = 5; + * @return The avgColor. + */ + @java.lang.Override + public java.lang.String getAvgColor() { + java.lang.Object ref = avgColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avgColor_ = s; + return s; + } + } + /** + * string avgColor = 5; + * @return The bytes for avgColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvgColorBytes() { + java.lang.Object ref = avgColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avgColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGETYPE_FIELD_NUMBER = 6; + private int imageType_ = 0; + /** + * int32 imageType = 6; + * @return The imageType. + */ + @java.lang.Override + public int getImageType() { + return imageType_; + } + + public static final int OPENWEBURL_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object openWebUrl_ = ""; + /** + * string openWebUrl = 7; + * @return The openWebUrl. + */ + @java.lang.Override + public java.lang.String getOpenWebUrl() { + java.lang.Object ref = openWebUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + openWebUrl_ = s; + return s; + } + } + /** + * string openWebUrl = 7; + * @return The bytes for openWebUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOpenWebUrlBytes() { + java.lang.Object ref = openWebUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + openWebUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content content_; + /** + * .Image.Content content = 8; + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image.Content content = 8; + * @return The content. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content getContent() { + return content_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } + /** + * .Image.Content content = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder getContentOrBuilder() { + return content_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } + + public static final int ISANIMATED_FIELD_NUMBER = 9; + private boolean isAnimated_ = false; + /** + * bool isAnimated = 9; + * @return The isAnimated. + */ + @java.lang.Override + public boolean getIsAnimated() { + return isAnimated_; + } + + public static final int FLEXSETTINGLISTLIST_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List flexSettingListList_; + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + @java.lang.Override + public java.util.List getFlexSettingListListList() { + return flexSettingListList_; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + @java.lang.Override + public java.util.List + getFlexSettingListListOrBuilderList() { + return flexSettingListList_; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + @java.lang.Override + public int getFlexSettingListListCount() { + return flexSettingListList_.size(); + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getFlexSettingListList(int index) { + return flexSettingListList_.get(index); + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getFlexSettingListListOrBuilder( + int index) { + return flexSettingListList_.get(index); + } + + public static final int TEXTSETTINGLISTLIST_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List textSettingListList_; + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + @java.lang.Override + public java.util.List getTextSettingListListList() { + return textSettingListList_; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + @java.lang.Override + public java.util.List + getTextSettingListListOrBuilderList() { + return textSettingListList_; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + @java.lang.Override + public int getTextSettingListListCount() { + return textSettingListList_.size(); + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getTextSettingListList(int index) { + return textSettingListList_.get(index); + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getTextSettingListListOrBuilder( + int index) { + return textSettingListList_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < urlListList_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, urlListList_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (height_ != 0L) { + output.writeInt64(3, height_); + } + if (width_ != 0L) { + output.writeInt64(4, width_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avgColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, avgColor_); + } + if (imageType_ != 0) { + output.writeInt32(6, imageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(openWebUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, openWebUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getContent()); + } + if (isAnimated_ != false) { + output.writeBool(9, isAnimated_); + } + for (int i = 0; i < flexSettingListList_.size(); i++) { + output.writeMessage(10, flexSettingListList_.get(i)); + } + for (int i = 0; i < textSettingListList_.size(); i++) { + output.writeMessage(11, textSettingListList_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < urlListList_.size(); i++) { + dataSize += computeStringSizeNoTag(urlListList_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrlListListList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (height_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, height_); + } + if (width_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, width_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avgColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, avgColor_); + } + if (imageType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, imageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(openWebUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, openWebUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getContent()); + } + if (isAnimated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, isAnimated_); + } + for (int i = 0; i < flexSettingListList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, flexSettingListList_.get(i)); + } + for (int i = 0; i < textSettingListList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, textSettingListList_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image) obj; + + if (!getUrlListListList() + .equals(other.getUrlListListList())) return false; + if (!getUri() + .equals(other.getUri())) return false; + if (getHeight() + != other.getHeight()) return false; + if (getWidth() + != other.getWidth()) return false; + if (!getAvgColor() + .equals(other.getAvgColor())) return false; + if (getImageType() + != other.getImageType()) return false; + if (!getOpenWebUrl() + .equals(other.getOpenWebUrl())) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent() + .equals(other.getContent())) return false; + } + if (getIsAnimated() + != other.getIsAnimated()) return false; + if (!getFlexSettingListListList() + .equals(other.getFlexSettingListListList())) return false; + if (!getTextSettingListListList() + .equals(other.getTextSettingListListList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUrlListListCount() > 0) { + hash = (37 * hash) + URLLISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getUrlListListList().hashCode(); + } + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeight()); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWidth()); + hash = (37 * hash) + AVGCOLOR_FIELD_NUMBER; + hash = (53 * hash) + getAvgColor().hashCode(); + hash = (37 * hash) + IMAGETYPE_FIELD_NUMBER; + hash = (53 * hash) + getImageType(); + hash = (37 * hash) + OPENWEBURL_FIELD_NUMBER; + hash = (53 * hash) + getOpenWebUrl().hashCode(); + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (37 * hash) + ISANIMATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsAnimated()); + if (getFlexSettingListListCount() > 0) { + hash = (37 * hash) + FLEXSETTINGLISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getFlexSettingListListList().hashCode(); + } + if (getTextSettingListListCount() > 0) { + hash = (37 * hash) + TEXTSETTINGLISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getTextSettingListListList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Image) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getContentFieldBuilder(); + getFlexSettingListListFieldBuilder(); + getTextSettingListListFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + uri_ = ""; + height_ = 0L; + width_ = 0L; + avgColor_ = ""; + imageType_ = 0; + openWebUrl_ = ""; + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + isAnimated_ = false; + if (flexSettingListListBuilder_ == null) { + flexSettingListList_ = java.util.Collections.emptyList(); + } else { + flexSettingListList_ = null; + flexSettingListListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (textSettingListListBuilder_ == null) { + textSettingListList_ = java.util.Collections.emptyList(); + } else { + textSettingListList_ = null; + textSettingListListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image result) { + if (flexSettingListListBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + flexSettingListList_ = java.util.Collections.unmodifiableList(flexSettingListList_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.flexSettingListList_ = flexSettingListList_; + } else { + result.flexSettingListList_ = flexSettingListListBuilder_.build(); + } + if (textSettingListListBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + textSettingListList_ = java.util.Collections.unmodifiableList(textSettingListList_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.textSettingListList_ = textSettingListList_; + } else { + result.textSettingListList_ = textSettingListListBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + urlListList_.makeImmutable(); + result.urlListList_ = urlListList_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.avgColor_ = avgColor_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.imageType_ = imageType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.openWebUrl_ = openWebUrl_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.content_ = contentBuilder_ == null + ? content_ + : contentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.isAnimated_ = isAnimated_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) return this; + if (!other.urlListList_.isEmpty()) { + if (urlListList_.isEmpty()) { + urlListList_ = other.urlListList_; + bitField0_ |= 0x00000001; + } else { + ensureUrlListListIsMutable(); + urlListList_.addAll(other.urlListList_); + } + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getHeight() != 0L) { + setHeight(other.getHeight()); + } + if (other.getWidth() != 0L) { + setWidth(other.getWidth()); + } + if (!other.getAvgColor().isEmpty()) { + avgColor_ = other.avgColor_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getImageType() != 0) { + setImageType(other.getImageType()); + } + if (!other.getOpenWebUrl().isEmpty()) { + openWebUrl_ = other.openWebUrl_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasContent()) { + mergeContent(other.getContent()); + } + if (other.getIsAnimated() != false) { + setIsAnimated(other.getIsAnimated()); + } + if (flexSettingListListBuilder_ == null) { + if (!other.flexSettingListList_.isEmpty()) { + if (flexSettingListList_.isEmpty()) { + flexSettingListList_ = other.flexSettingListList_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.addAll(other.flexSettingListList_); + } + onChanged(); + } + } else { + if (!other.flexSettingListList_.isEmpty()) { + if (flexSettingListListBuilder_.isEmpty()) { + flexSettingListListBuilder_.dispose(); + flexSettingListListBuilder_ = null; + flexSettingListList_ = other.flexSettingListList_; + bitField0_ = (bitField0_ & ~0x00000200); + flexSettingListListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFlexSettingListListFieldBuilder() : null; + } else { + flexSettingListListBuilder_.addAllMessages(other.flexSettingListList_); + } + } + } + if (textSettingListListBuilder_ == null) { + if (!other.textSettingListList_.isEmpty()) { + if (textSettingListList_.isEmpty()) { + textSettingListList_ = other.textSettingListList_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureTextSettingListListIsMutable(); + textSettingListList_.addAll(other.textSettingListList_); + } + onChanged(); + } + } else { + if (!other.textSettingListList_.isEmpty()) { + if (textSettingListListBuilder_.isEmpty()) { + textSettingListListBuilder_.dispose(); + textSettingListListBuilder_ = null; + textSettingListList_ = other.textSettingListList_; + bitField0_ = (bitField0_ & ~0x00000400); + textSettingListListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTextSettingListListFieldBuilder() : null; + } else { + textSettingListListBuilder_.addAllMessages(other.textSettingListList_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrlListListIsMutable(); + urlListList_.add(s); + break; + } // case 10 + case 18: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + height_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + width_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + avgColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + imageType_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + openWebUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getContentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + isAnimated_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.parser(), + extensionRegistry); + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(m); + } else { + flexSettingListListBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.parser(), + extensionRegistry); + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.add(m); + } else { + textSettingListListBuilder_.addMessage(m); + } + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUrlListListIsMutable() { + if (!urlListList_.isModifiable()) { + urlListList_ = new com.google.protobuf.LazyStringArrayList(urlListList_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string urlListList = 1; + * @return A list containing the urlListList. + */ + public com.google.protobuf.ProtocolStringList + getUrlListListList() { + urlListList_.makeImmutable(); + return urlListList_; + } + /** + * repeated string urlListList = 1; + * @return The count of urlListList. + */ + public int getUrlListListCount() { + return urlListList_.size(); + } + /** + * repeated string urlListList = 1; + * @param index The index of the element to return. + * @return The urlListList at the given index. + */ + public java.lang.String getUrlListList(int index) { + return urlListList_.get(index); + } + /** + * repeated string urlListList = 1; + * @param index The index of the value to return. + * @return The bytes of the urlListList at the given index. + */ + public com.google.protobuf.ByteString + getUrlListListBytes(int index) { + return urlListList_.getByteString(index); + } + /** + * repeated string urlListList = 1; + * @param index The index to set the value at. + * @param value The urlListList to set. + * @return This builder for chaining. + */ + public Builder setUrlListList( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUrlListListIsMutable(); + urlListList_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string urlListList = 1; + * @param value The urlListList to add. + * @return This builder for chaining. + */ + public Builder addUrlListList( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUrlListListIsMutable(); + urlListList_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string urlListList = 1; + * @param values The urlListList to add. + * @return This builder for chaining. + */ + public Builder addAllUrlListList( + java.lang.Iterable values) { + ensureUrlListListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, urlListList_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string urlListList = 1; + * @return This builder for chaining. + */ + public Builder clearUrlListList() { + urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string urlListList = 1; + * @param value The bytes of the urlListList to add. + * @return This builder for chaining. + */ + public Builder addUrlListListBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUrlListListIsMutable(); + urlListList_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * string uri = 2; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uri = 2; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uri = 2; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string uri = 2; + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string uri = 2; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long height_ ; + /** + * int64 height = 3; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + /** + * int64 height = 3; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + + height_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 height = 3; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000004); + height_ = 0L; + onChanged(); + return this; + } + + private long width_ ; + /** + * int64 width = 4; + * @return The width. + */ + @java.lang.Override + public long getWidth() { + return width_; + } + /** + * int64 width = 4; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(long value) { + + width_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int64 width = 4; + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000008); + width_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object avgColor_ = ""; + /** + * string avgColor = 5; + * @return The avgColor. + */ + public java.lang.String getAvgColor() { + java.lang.Object ref = avgColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avgColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string avgColor = 5; + * @return The bytes for avgColor. + */ + public com.google.protobuf.ByteString + getAvgColorBytes() { + java.lang.Object ref = avgColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avgColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string avgColor = 5; + * @param value The avgColor to set. + * @return This builder for chaining. + */ + public Builder setAvgColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avgColor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string avgColor = 5; + * @return This builder for chaining. + */ + public Builder clearAvgColor() { + avgColor_ = getDefaultInstance().getAvgColor(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string avgColor = 5; + * @param value The bytes for avgColor to set. + * @return This builder for chaining. + */ + public Builder setAvgColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avgColor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int imageType_ ; + /** + * int32 imageType = 6; + * @return The imageType. + */ + @java.lang.Override + public int getImageType() { + return imageType_; + } + /** + * int32 imageType = 6; + * @param value The imageType to set. + * @return This builder for chaining. + */ + public Builder setImageType(int value) { + + imageType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int32 imageType = 6; + * @return This builder for chaining. + */ + public Builder clearImageType() { + bitField0_ = (bitField0_ & ~0x00000020); + imageType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object openWebUrl_ = ""; + /** + * string openWebUrl = 7; + * @return The openWebUrl. + */ + public java.lang.String getOpenWebUrl() { + java.lang.Object ref = openWebUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + openWebUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string openWebUrl = 7; + * @return The bytes for openWebUrl. + */ + public com.google.protobuf.ByteString + getOpenWebUrlBytes() { + java.lang.Object ref = openWebUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + openWebUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string openWebUrl = 7; + * @param value The openWebUrl to set. + * @return This builder for chaining. + */ + public Builder setOpenWebUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + openWebUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * string openWebUrl = 7; + * @return This builder for chaining. + */ + public Builder clearOpenWebUrl() { + openWebUrl_ = getDefaultInstance().getOpenWebUrl(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * string openWebUrl = 7; + * @param value The bytes for openWebUrl to set. + * @return This builder for chaining. + */ + public Builder setOpenWebUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + openWebUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content content_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder> contentBuilder_; + /** + * .Image.Content content = 8; + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .Image.Content content = 8; + * @return The content. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content getContent() { + if (contentBuilder_ == null) { + return content_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } else { + return contentBuilder_.getMessage(); + } + } + /** + * .Image.Content content = 8; + */ + public Builder setContent(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .Image.Content content = 8; + */ + public Builder setContent( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .Image.Content content = 8; + */ + public Builder mergeContent(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + content_ != null && + content_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + if (content_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * .Image.Content content = 8; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000080); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image.Content content = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder getContentBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getContentFieldBuilder().getBuilder(); + } + /** + * .Image.Content content = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } + } + /** + * .Image.Content content = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder> + getContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder>( + getContent(), + getParentForChildren(), + isClean()); + content_ = null; + } + return contentBuilder_; + } + + private boolean isAnimated_ ; + /** + * bool isAnimated = 9; + * @return The isAnimated. + */ + @java.lang.Override + public boolean getIsAnimated() { + return isAnimated_; + } + /** + * bool isAnimated = 9; + * @param value The isAnimated to set. + * @return This builder for chaining. + */ + public Builder setIsAnimated(boolean value) { + + isAnimated_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * bool isAnimated = 9; + * @return This builder for chaining. + */ + public Builder clearIsAnimated() { + bitField0_ = (bitField0_ & ~0x00000100); + isAnimated_ = false; + onChanged(); + return this; + } + + private java.util.List flexSettingListList_ = + java.util.Collections.emptyList(); + private void ensureFlexSettingListListIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + flexSettingListList_ = new java.util.ArrayList(flexSettingListList_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> flexSettingListListBuilder_; + + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public java.util.List getFlexSettingListListList() { + if (flexSettingListListBuilder_ == null) { + return java.util.Collections.unmodifiableList(flexSettingListList_); + } else { + return flexSettingListListBuilder_.getMessageList(); + } + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public int getFlexSettingListListCount() { + if (flexSettingListListBuilder_ == null) { + return flexSettingListList_.size(); + } else { + return flexSettingListListBuilder_.getCount(); + } + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getFlexSettingListList(int index) { + if (flexSettingListListBuilder_ == null) { + return flexSettingListList_.get(index); + } else { + return flexSettingListListBuilder_.getMessage(index); + } + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder setFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (flexSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlexSettingListListIsMutable(); + flexSettingListList_.set(index, value); + onChanged(); + } else { + flexSettingListListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder setFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.set(index, builderForValue.build()); + onChanged(); + } else { + flexSettingListListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder addFlexSettingListList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (flexSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(value); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder addFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (flexSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(index, value); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder addFlexSettingListList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(builderForValue.build()); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder addFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(index, builderForValue.build()); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder addAllFlexSettingListList( + java.lang.Iterable values) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, flexSettingListList_); + onChanged(); + } else { + flexSettingListListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder clearFlexSettingListList() { + if (flexSettingListListBuilder_ == null) { + flexSettingListList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + flexSettingListListBuilder_.clear(); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public Builder removeFlexSettingListList(int index) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.remove(index); + onChanged(); + } else { + flexSettingListListBuilder_.remove(index); + } + return this; + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder getFlexSettingListListBuilder( + int index) { + return getFlexSettingListListFieldBuilder().getBuilder(index); + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getFlexSettingListListOrBuilder( + int index) { + if (flexSettingListListBuilder_ == null) { + return flexSettingListList_.get(index); } else { + return flexSettingListListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public java.util.List + getFlexSettingListListOrBuilderList() { + if (flexSettingListListBuilder_ != null) { + return flexSettingListListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(flexSettingListList_); + } + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addFlexSettingListListBuilder() { + return getFlexSettingListListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addFlexSettingListListBuilder( + int index) { + return getFlexSettingListListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * repeated .Image.NinePatchSetting flexSettingListList = 10; + */ + public java.util.List + getFlexSettingListListBuilderList() { + return getFlexSettingListListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getFlexSettingListListFieldBuilder() { + if (flexSettingListListBuilder_ == null) { + flexSettingListListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder>( + flexSettingListList_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + flexSettingListList_ = null; + } + return flexSettingListListBuilder_; + } + + private java.util.List textSettingListList_ = + java.util.Collections.emptyList(); + private void ensureTextSettingListListIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + textSettingListList_ = new java.util.ArrayList(textSettingListList_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> textSettingListListBuilder_; + + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public java.util.List getTextSettingListListList() { + if (textSettingListListBuilder_ == null) { + return java.util.Collections.unmodifiableList(textSettingListList_); + } else { + return textSettingListListBuilder_.getMessageList(); + } + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public int getTextSettingListListCount() { + if (textSettingListListBuilder_ == null) { + return textSettingListList_.size(); + } else { + return textSettingListListBuilder_.getCount(); + } + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getTextSettingListList(int index) { + if (textSettingListListBuilder_ == null) { + return textSettingListList_.get(index); + } else { + return textSettingListListBuilder_.getMessage(index); + } + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder setTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (textSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextSettingListListIsMutable(); + textSettingListList_.set(index, value); + onChanged(); + } else { + textSettingListListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder setTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.set(index, builderForValue.build()); + onChanged(); + } else { + textSettingListListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder addTextSettingListList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (textSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextSettingListListIsMutable(); + textSettingListList_.add(value); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder addTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (textSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextSettingListListIsMutable(); + textSettingListList_.add(index, value); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder addTextSettingListList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.add(builderForValue.build()); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder addTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.add(index, builderForValue.build()); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder addAllTextSettingListList( + java.lang.Iterable values) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, textSettingListList_); + onChanged(); + } else { + textSettingListListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder clearTextSettingListList() { + if (textSettingListListBuilder_ == null) { + textSettingListList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + textSettingListListBuilder_.clear(); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public Builder removeTextSettingListList(int index) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.remove(index); + onChanged(); + } else { + textSettingListListBuilder_.remove(index); + } + return this; + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder getTextSettingListListBuilder( + int index) { + return getTextSettingListListFieldBuilder().getBuilder(index); + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getTextSettingListListOrBuilder( + int index) { + if (textSettingListListBuilder_ == null) { + return textSettingListList_.get(index); } else { + return textSettingListListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public java.util.List + getTextSettingListListOrBuilderList() { + if (textSettingListListBuilder_ != null) { + return textSettingListListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textSettingListList_); + } + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addTextSettingListListBuilder() { + return getTextSettingListListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addTextSettingListListBuilder( + int index) { + return getTextSettingListListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * repeated .Image.NinePatchSetting textSettingListList = 11; + */ + public java.util.List + getTextSettingListListBuilderList() { + return getTextSettingListListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getTextSettingListListFieldBuilder() { + if (textSettingListListBuilder_ == null) { + textSettingListListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder>( + textSettingListList_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + textSettingListList_ = null; + } + return textSettingListListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Image) + } + + // @@protoc_insertion_point(class_scope:Image) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Image_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Image_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Image_Content_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Image_Content_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Image_NinePatchSetting_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Image_NinePatchSetting_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\013Image.proto\"\212\003\n\005Image\022\023\n\013urlListList\030\001" + + " \003(\t\022\013\n\003uri\030\002 \001(\t\022\016\n\006height\030\003 \001(\003\022\r\n\005wid" + + "th\030\004 \001(\003\022\020\n\010avgColor\030\005 \001(\t\022\021\n\timageType\030" + + "\006 \001(\005\022\022\n\nopenWebUrl\030\007 \001(\t\022\037\n\007content\030\010 \001" + + "(\0132\016.Image.Content\022\022\n\nisAnimated\030\t \001(\010\0224" + + "\n\023flexSettingListList\030\n \003(\0132\027.Image.Nine" + + "PatchSetting\0224\n\023textSettingListList\030\013 \003(" + + "\0132\027.Image.NinePatchSetting\032R\n\007Content\022\014\n" + + "\004name\030\001 \001(\t\022\021\n\tfontColor\030\002 \001(\t\022\r\n\005level\030" + + "\003 \001(\003\022\027\n\017alternativeText\030\004 \001(\t\032\022\n\020NinePa" + + "tchSettingB>\nstring key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * string default_pattern = 2; + * @return The defaultPattern. + */ + java.lang.String getDefaultPattern(); + /** + * string default_pattern = 2; + * @return The bytes for defaultPattern. + */ + com.google.protobuf.ByteString + getDefaultPatternBytes(); + } + /** + * Protobuf type {@code PatternRef} + */ + public static final class PatternRef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PatternRef) + PatternRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatternRef.newBuilder() to construct. + private PatternRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PatternRef() { + key_ = ""; + defaultPattern_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PatternRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_PATTERN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object defaultPattern_ = ""; + /** + * string default_pattern = 2; + * @return The defaultPattern. + */ + @java.lang.Override + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } + } + /** + * string default_pattern = 2; + * @return The bytes for defaultPattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, defaultPattern_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, defaultPattern_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getDefaultPattern() + .equals(other.getDefaultPattern())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + DEFAULT_PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPattern().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 PatternRef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:PatternRef) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + defaultPattern_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultPattern_ = defaultPattern_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultPattern().isEmpty()) { + defaultPattern_ = other.defaultPattern_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + defaultPattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultPattern_ = ""; + /** + * string default_pattern = 2; + * @return The defaultPattern. + */ + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string default_pattern = 2; + * @return The bytes for defaultPattern. + */ + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string default_pattern = 2; + * @param value The defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string default_pattern = 2; + * @return This builder for chaining. + */ + public Builder clearDefaultPattern() { + defaultPattern_ = getDefaultInstance().getDefaultPattern(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string default_pattern = 2; + * @param value The bytes for defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PatternRef) + } + + // @@protoc_insertion_point(class_scope:PatternRef) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PatternRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PatternRef_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PatternRef_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\020PatternRef.proto\"2\n\nPatternRef\022\013\n\003key\030" + + "\001 \001(\t\022\027\n\017default_pattern\030\002 \001(\tB>\n.Image user_label = 1; + * @return Whether the userLabel field is set. + */ + boolean hasUserLabel(); + /** + * .Image user_label = 1; + * @return The userLabel. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getUserLabel(); + /** + * .Image user_label = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getUserLabelOrBuilder(); + + /** + * uint64 user_consume_in_room = 2; + * @return The userConsumeInRoom. + */ + long getUserConsumeInRoom(); + + /** + * uint64 user_send_gift_cnt_in_room = 3; + * @return The userSendGiftCntInRoom. + */ + long getUserSendGiftCntInRoom(); + } + /** + * Protobuf type {@code PublicAreaCommon} + */ + public static final class PublicAreaCommon extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PublicAreaCommon) + PublicAreaCommonOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublicAreaCommon.newBuilder() to construct. + private PublicAreaCommon(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublicAreaCommon() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublicAreaCommon(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder.class); + } + + private int bitField0_; + public static final int USER_LABEL_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image userLabel_; + /** + * .Image user_label = 1; + * @return Whether the userLabel field is set. + */ + @java.lang.Override + public boolean hasUserLabel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image user_label = 1; + * @return The userLabel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getUserLabel() { + return userLabel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } + /** + * .Image user_label = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getUserLabelOrBuilder() { + return userLabel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } + + public static final int USER_CONSUME_IN_ROOM_FIELD_NUMBER = 2; + private long userConsumeInRoom_ = 0L; + /** + * uint64 user_consume_in_room = 2; + * @return The userConsumeInRoom. + */ + @java.lang.Override + public long getUserConsumeInRoom() { + return userConsumeInRoom_; + } + + public static final int USER_SEND_GIFT_CNT_IN_ROOM_FIELD_NUMBER = 3; + private long userSendGiftCntInRoom_ = 0L; + /** + * uint64 user_send_gift_cnt_in_room = 3; + * @return The userSendGiftCntInRoom. + */ + @java.lang.Override + public long getUserSendGiftCntInRoom() { + return userSendGiftCntInRoom_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUserLabel()); + } + if (userConsumeInRoom_ != 0L) { + output.writeUInt64(2, userConsumeInRoom_); + } + if (userSendGiftCntInRoom_ != 0L) { + output.writeUInt64(3, userSendGiftCntInRoom_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUserLabel()); + } + if (userConsumeInRoom_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, userConsumeInRoom_); + } + if (userSendGiftCntInRoom_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, userSendGiftCntInRoom_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon) obj; + + if (hasUserLabel() != other.hasUserLabel()) return false; + if (hasUserLabel()) { + if (!getUserLabel() + .equals(other.getUserLabel())) return false; + } + if (getUserConsumeInRoom() + != other.getUserConsumeInRoom()) return false; + if (getUserSendGiftCntInRoom() + != other.getUserSendGiftCntInRoom()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserLabel()) { + hash = (37 * hash) + USER_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getUserLabel().hashCode(); + } + hash = (37 * hash) + USER_CONSUME_IN_ROOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserConsumeInRoom()); + hash = (37 * hash) + USER_SEND_GIFT_CNT_IN_ROOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserSendGiftCntInRoom()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 PublicAreaCommon} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:PublicAreaCommon) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserLabelFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userLabel_ = null; + if (userLabelBuilder_ != null) { + userLabelBuilder_.dispose(); + userLabelBuilder_ = null; + } + userConsumeInRoom_ = 0L; + userSendGiftCntInRoom_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userLabel_ = userLabelBuilder_ == null + ? userLabel_ + : userLabelBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userConsumeInRoom_ = userConsumeInRoom_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userSendGiftCntInRoom_ = userSendGiftCntInRoom_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance()) return this; + if (other.hasUserLabel()) { + mergeUserLabel(other.getUserLabel()); + } + if (other.getUserConsumeInRoom() != 0L) { + setUserConsumeInRoom(other.getUserConsumeInRoom()); + } + if (other.getUserSendGiftCntInRoom() != 0L) { + setUserSendGiftCntInRoom(other.getUserSendGiftCntInRoom()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserLabelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + userConsumeInRoom_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + userSendGiftCntInRoom_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image userLabel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> userLabelBuilder_; + /** + * .Image user_label = 1; + * @return Whether the userLabel field is set. + */ + public boolean hasUserLabel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image user_label = 1; + * @return The userLabel. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getUserLabel() { + if (userLabelBuilder_ == null) { + return userLabel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } else { + return userLabelBuilder_.getMessage(); + } + } + /** + * .Image user_label = 1; + */ + public Builder setUserLabel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (userLabelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userLabel_ = value; + } else { + userLabelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image user_label = 1; + */ + public Builder setUserLabel( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (userLabelBuilder_ == null) { + userLabel_ = builderForValue.build(); + } else { + userLabelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image user_label = 1; + */ + public Builder mergeUserLabel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (userLabelBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + userLabel_ != null && + userLabel_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getUserLabelBuilder().mergeFrom(value); + } else { + userLabel_ = value; + } + } else { + userLabelBuilder_.mergeFrom(value); + } + if (userLabel_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Image user_label = 1; + */ + public Builder clearUserLabel() { + bitField0_ = (bitField0_ & ~0x00000001); + userLabel_ = null; + if (userLabelBuilder_ != null) { + userLabelBuilder_.dispose(); + userLabelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image user_label = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getUserLabelBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserLabelFieldBuilder().getBuilder(); + } + /** + * .Image user_label = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getUserLabelOrBuilder() { + if (userLabelBuilder_ != null) { + return userLabelBuilder_.getMessageOrBuilder(); + } else { + return userLabel_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } + } + /** + * .Image user_label = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getUserLabelFieldBuilder() { + if (userLabelBuilder_ == null) { + userLabelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getUserLabel(), + getParentForChildren(), + isClean()); + userLabel_ = null; + } + return userLabelBuilder_; + } + + private long userConsumeInRoom_ ; + /** + * uint64 user_consume_in_room = 2; + * @return The userConsumeInRoom. + */ + @java.lang.Override + public long getUserConsumeInRoom() { + return userConsumeInRoom_; + } + /** + * uint64 user_consume_in_room = 2; + * @param value The userConsumeInRoom to set. + * @return This builder for chaining. + */ + public Builder setUserConsumeInRoom(long value) { + + userConsumeInRoom_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 user_consume_in_room = 2; + * @return This builder for chaining. + */ + public Builder clearUserConsumeInRoom() { + bitField0_ = (bitField0_ & ~0x00000002); + userConsumeInRoom_ = 0L; + onChanged(); + return this; + } + + private long userSendGiftCntInRoom_ ; + /** + * uint64 user_send_gift_cnt_in_room = 3; + * @return The userSendGiftCntInRoom. + */ + @java.lang.Override + public long getUserSendGiftCntInRoom() { + return userSendGiftCntInRoom_; + } + /** + * uint64 user_send_gift_cnt_in_room = 3; + * @param value The userSendGiftCntInRoom to set. + * @return This builder for chaining. + */ + public Builder setUserSendGiftCntInRoom(long value) { + + userSendGiftCntInRoom_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 user_send_gift_cnt_in_room = 3; + * @return This builder for chaining. + */ + public Builder clearUserSendGiftCntInRoom() { + bitField0_ = (bitField0_ & ~0x00000004); + userSendGiftCntInRoom_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PublicAreaCommon) + } + + // @@protoc_insertion_point(class_scope:PublicAreaCommon) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicAreaCommon parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PublicAreaCommon_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PublicAreaCommon_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\026PublicAreaCommon.proto\032\013Image.proto\"p\n" + + "\020PublicAreaCommon\022\032\n\nuser_label\030\001 \001(\0132\006." + + "Image\022\034\n\024user_consume_in_room\030\002 \001(\004\022\"\n\032u" + + "ser_send_gift_cnt_in_room\030\003 \001(\004B>\n.Text text = 1; + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * .Text text = 1; + * @return The text. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getText(); + /** + * .Text text = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTextOrBuilder(); + + /** + * uint32 text_font_size = 2; + * @return The textFontSize. + */ + int getTextFontSize(); + + /** + * .Image background = 3; + * @return Whether the background field is set. + */ + boolean hasBackground(); + /** + * .Image background = 3; + * @return The background. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackground(); + /** + * .Image background = 3; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder(); + + /** + * uint32 start = 4; + * @return The start. + */ + int getStart(); + + /** + * uint32 duration = 5; + * @return The duration. + */ + int getDuration(); + + /** + * uint32 x = 6; + * @return The x. + */ + int getX(); + + /** + * uint32 y = 7; + * @return The y. + */ + int getY(); + + /** + * uint32 width = 8; + * @return The width. + */ + int getWidth(); + + /** + * uint32 height = 9; + * @return The height. + */ + int getHeight(); + + /** + * uint32 shadow_dx = 10; + * @return The shadowDx. + */ + int getShadowDx(); + + /** + * uint32 shadow_dy = 11; + * @return The shadowDy. + */ + int getShadowDy(); + + /** + * uint32 shadow_radius = 12; + * @return The shadowRadius. + */ + int getShadowRadius(); + + /** + * string shadow_color = 13; + * @return The shadowColor. + */ + java.lang.String getShadowColor(); + /** + * string shadow_color = 13; + * @return The bytes for shadowColor. + */ + com.google.protobuf.ByteString + getShadowColorBytes(); + + /** + * string stroke_color = 14; + * @return The strokeColor. + */ + java.lang.String getStrokeColor(); + /** + * string stroke_color = 14; + * @return The bytes for strokeColor. + */ + com.google.protobuf.ByteString + getStrokeColorBytes(); + + /** + * uint32 stroke_width = 15; + * @return The strokeWidth. + */ + int getStrokeWidth(); + } + /** + * Protobuf type {@code TextEffectDetail} + */ + public static final class TextEffectDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextEffectDetail) + TextEffectDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextEffectDetail.newBuilder() to construct. + private TextEffectDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextEffectDetail() { + shadowColor_ = ""; + strokeColor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextEffectDetail(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder.class); + } + + private int bitField0_; + public static final int TEXT_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text text_; + /** + * .Text text = 1; + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Text text = 1; + * @return The text. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getText() { + return text_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } + /** + * .Text text = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTextOrBuilder() { + return text_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } + + public static final int TEXT_FONT_SIZE_FIELD_NUMBER = 2; + private int textFontSize_ = 0; + /** + * uint32 text_font_size = 2; + * @return The textFontSize. + */ + @java.lang.Override + public int getTextFontSize() { + return textFontSize_; + } + + public static final int BACKGROUND_FIELD_NUMBER = 3; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image background_; + /** + * .Image background = 3; + * @return Whether the background field is set. + */ + @java.lang.Override + public boolean hasBackground() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .Image background = 3; + * @return The background. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + return background_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + /** + * .Image background = 3; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + return background_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + + public static final int START_FIELD_NUMBER = 4; + private int start_ = 0; + /** + * uint32 start = 4; + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + + public static final int DURATION_FIELD_NUMBER = 5; + private int duration_ = 0; + /** + * uint32 duration = 5; + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + + public static final int X_FIELD_NUMBER = 6; + private int x_ = 0; + /** + * uint32 x = 6; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 7; + private int y_ = 0; + /** + * uint32 y = 7; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int WIDTH_FIELD_NUMBER = 8; + private int width_ = 0; + /** + * uint32 width = 8; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 9; + private int height_ = 0; + /** + * uint32 height = 9; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int SHADOW_DX_FIELD_NUMBER = 10; + private int shadowDx_ = 0; + /** + * uint32 shadow_dx = 10; + * @return The shadowDx. + */ + @java.lang.Override + public int getShadowDx() { + return shadowDx_; + } + + public static final int SHADOW_DY_FIELD_NUMBER = 11; + private int shadowDy_ = 0; + /** + * uint32 shadow_dy = 11; + * @return The shadowDy. + */ + @java.lang.Override + public int getShadowDy() { + return shadowDy_; + } + + public static final int SHADOW_RADIUS_FIELD_NUMBER = 12; + private int shadowRadius_ = 0; + /** + * uint32 shadow_radius = 12; + * @return The shadowRadius. + */ + @java.lang.Override + public int getShadowRadius() { + return shadowRadius_; + } + + public static final int SHADOW_COLOR_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object shadowColor_ = ""; + /** + * string shadow_color = 13; + * @return The shadowColor. + */ + @java.lang.Override + public java.lang.String getShadowColor() { + java.lang.Object ref = shadowColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shadowColor_ = s; + return s; + } + } + /** + * string shadow_color = 13; + * @return The bytes for shadowColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShadowColorBytes() { + java.lang.Object ref = shadowColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shadowColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STROKE_COLOR_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object strokeColor_ = ""; + /** + * string stroke_color = 14; + * @return The strokeColor. + */ + @java.lang.Override + public java.lang.String getStrokeColor() { + java.lang.Object ref = strokeColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + strokeColor_ = s; + return s; + } + } + /** + * string stroke_color = 14; + * @return The bytes for strokeColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStrokeColorBytes() { + java.lang.Object ref = strokeColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + strokeColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STROKE_WIDTH_FIELD_NUMBER = 15; + private int strokeWidth_ = 0; + /** + * uint32 stroke_width = 15; + * @return The strokeWidth. + */ + @java.lang.Override + public int getStrokeWidth() { + return strokeWidth_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getText()); + } + if (textFontSize_ != 0) { + output.writeUInt32(2, textFontSize_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getBackground()); + } + if (start_ != 0) { + output.writeUInt32(4, start_); + } + if (duration_ != 0) { + output.writeUInt32(5, duration_); + } + if (x_ != 0) { + output.writeUInt32(6, x_); + } + if (y_ != 0) { + output.writeUInt32(7, y_); + } + if (width_ != 0) { + output.writeUInt32(8, width_); + } + if (height_ != 0) { + output.writeUInt32(9, height_); + } + if (shadowDx_ != 0) { + output.writeUInt32(10, shadowDx_); + } + if (shadowDy_ != 0) { + output.writeUInt32(11, shadowDy_); + } + if (shadowRadius_ != 0) { + output.writeUInt32(12, shadowRadius_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shadowColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, shadowColor_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(strokeColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, strokeColor_); + } + if (strokeWidth_ != 0) { + output.writeUInt32(15, strokeWidth_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getText()); + } + if (textFontSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, textFontSize_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBackground()); + } + if (start_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, start_); + } + if (duration_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, duration_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, y_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, height_); + } + if (shadowDx_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, shadowDx_); + } + if (shadowDy_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(11, shadowDy_); + } + if (shadowRadius_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, shadowRadius_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shadowColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, shadowColor_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(strokeColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, strokeColor_); + } + if (strokeWidth_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(15, strokeWidth_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail) obj; + + if (hasText() != other.hasText()) return false; + if (hasText()) { + if (!getText() + .equals(other.getText())) return false; + } + if (getTextFontSize() + != other.getTextFontSize()) return false; + if (hasBackground() != other.hasBackground()) return false; + if (hasBackground()) { + if (!getBackground() + .equals(other.getBackground())) return false; + } + if (getStart() + != other.getStart()) return false; + if (getDuration() + != other.getDuration()) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (getShadowDx() + != other.getShadowDx()) return false; + if (getShadowDy() + != other.getShadowDy()) return false; + if (getShadowRadius() + != other.getShadowRadius()) return false; + if (!getShadowColor() + .equals(other.getShadowColor())) return false; + if (!getStrokeColor() + .equals(other.getStrokeColor())) return false; + if (getStrokeWidth() + != other.getStrokeWidth()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + hash = (37 * hash) + TEXT_FONT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getTextFontSize(); + if (hasBackground()) { + hash = (37 * hash) + BACKGROUND_FIELD_NUMBER; + hash = (53 * hash) + getBackground().hashCode(); + } + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart(); + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + SHADOW_DX_FIELD_NUMBER; + hash = (53 * hash) + getShadowDx(); + hash = (37 * hash) + SHADOW_DY_FIELD_NUMBER; + hash = (53 * hash) + getShadowDy(); + hash = (37 * hash) + SHADOW_RADIUS_FIELD_NUMBER; + hash = (53 * hash) + getShadowRadius(); + hash = (37 * hash) + SHADOW_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getShadowColor().hashCode(); + hash = (37 * hash) + STROKE_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getStrokeColor().hashCode(); + hash = (37 * hash) + STROKE_WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getStrokeWidth(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextEffectDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextEffectDetail) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTextFieldBuilder(); + getBackgroundFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = null; + if (textBuilder_ != null) { + textBuilder_.dispose(); + textBuilder_ = null; + } + textFontSize_ = 0; + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + start_ = 0; + duration_ = 0; + x_ = 0; + y_ = 0; + width_ = 0; + height_ = 0; + shadowDx_ = 0; + shadowDy_ = 0; + shadowRadius_ = 0; + shadowColor_ = ""; + strokeColor_ = ""; + strokeWidth_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = textBuilder_ == null + ? text_ + : textBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.textFontSize_ = textFontSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.background_ = backgroundBuilder_ == null + ? background_ + : backgroundBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.start_ = start_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.duration_ = duration_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.shadowDx_ = shadowDx_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.shadowDy_ = shadowDy_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.shadowRadius_ = shadowRadius_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.shadowColor_ = shadowColor_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.strokeColor_ = strokeColor_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.strokeWidth_ = strokeWidth_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance()) return this; + if (other.hasText()) { + mergeText(other.getText()); + } + if (other.getTextFontSize() != 0) { + setTextFontSize(other.getTextFontSize()); + } + if (other.hasBackground()) { + mergeBackground(other.getBackground()); + } + if (other.getStart() != 0) { + setStart(other.getStart()); + } + if (other.getDuration() != 0) { + setDuration(other.getDuration()); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getShadowDx() != 0) { + setShadowDx(other.getShadowDx()); + } + if (other.getShadowDy() != 0) { + setShadowDy(other.getShadowDy()); + } + if (other.getShadowRadius() != 0) { + setShadowRadius(other.getShadowRadius()); + } + if (!other.getShadowColor().isEmpty()) { + shadowColor_ = other.shadowColor_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getStrokeColor().isEmpty()) { + strokeColor_ = other.strokeColor_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getStrokeWidth() != 0) { + setStrokeWidth(other.getStrokeWidth()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getTextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + textFontSize_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getBackgroundFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + start_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + duration_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + width_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + shadowDx_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + shadowDy_ = input.readUInt32(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + shadowRadius_ = input.readUInt32(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 106: { + shadowColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + strokeColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 120: { + strokeWidth_ = input.readUInt32(); + bitField0_ |= 0x00004000; + break; + } // case 120 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text text_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> textBuilder_; + /** + * .Text text = 1; + * @return Whether the text field is set. + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Text text = 1; + * @return The text. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getText() { + if (textBuilder_ == null) { + return text_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } else { + return textBuilder_.getMessage(); + } + } + /** + * .Text text = 1; + */ + public Builder setText(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + } else { + textBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Text text = 1; + */ + public Builder setText( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder builderForValue) { + if (textBuilder_ == null) { + text_ = builderForValue.build(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Text text = 1; + */ + public Builder mergeText(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text value) { + if (textBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + text_ != null && + text_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) { + getTextBuilder().mergeFrom(value); + } else { + text_ = value; + } + } else { + textBuilder_.mergeFrom(value); + } + if (text_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Text text = 1; + */ + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000001); + text_ = null; + if (textBuilder_ != null) { + textBuilder_.dispose(); + textBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Text text = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder getTextBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTextFieldBuilder().getBuilder(); + } + /** + * .Text text = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTextOrBuilder() { + if (textBuilder_ != null) { + return textBuilder_.getMessageOrBuilder(); + } else { + return text_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } + } + /** + * .Text text = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder>( + getText(), + getParentForChildren(), + isClean()); + text_ = null; + } + return textBuilder_; + } + + private int textFontSize_ ; + /** + * uint32 text_font_size = 2; + * @return The textFontSize. + */ + @java.lang.Override + public int getTextFontSize() { + return textFontSize_; + } + /** + * uint32 text_font_size = 2; + * @param value The textFontSize to set. + * @return This builder for chaining. + */ + public Builder setTextFontSize(int value) { + + textFontSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 text_font_size = 2; + * @return This builder for chaining. + */ + public Builder clearTextFontSize() { + bitField0_ = (bitField0_ & ~0x00000002); + textFontSize_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image background_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundBuilder_; + /** + * .Image background = 3; + * @return Whether the background field is set. + */ + public boolean hasBackground() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .Image background = 3; + * @return The background. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + if (backgroundBuilder_ == null) { + return background_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } else { + return backgroundBuilder_.getMessage(); + } + } + /** + * .Image background = 3; + */ + public Builder setBackground(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + background_ = value; + } else { + backgroundBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .Image background = 3; + */ + public Builder setBackground( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundBuilder_ == null) { + background_ = builderForValue.build(); + } else { + backgroundBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .Image background = 3; + */ + public Builder mergeBackground(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + background_ != null && + background_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundBuilder().mergeFrom(value); + } else { + background_ = value; + } + } else { + backgroundBuilder_.mergeFrom(value); + } + if (background_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .Image background = 3; + */ + public Builder clearBackground() { + bitField0_ = (bitField0_ & ~0x00000004); + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image background = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBackgroundFieldBuilder().getBuilder(); + } + /** + * .Image background = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + if (backgroundBuilder_ != null) { + return backgroundBuilder_.getMessageOrBuilder(); + } else { + return background_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + } + /** + * .Image background = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundFieldBuilder() { + if (backgroundBuilder_ == null) { + backgroundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackground(), + getParentForChildren(), + isClean()); + background_ = null; + } + return backgroundBuilder_; + } + + private int start_ ; + /** + * uint32 start = 4; + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + /** + * uint32 start = 4; + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(int value) { + + start_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 start = 4; + * @return This builder for chaining. + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000008); + start_ = 0; + onChanged(); + return this; + } + + private int duration_ ; + /** + * uint32 duration = 5; + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + /** + * uint32 duration = 5; + * @param value The duration to set. + * @return This builder for chaining. + */ + public Builder setDuration(int value) { + + duration_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 duration = 5; + * @return This builder for chaining. + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + duration_ = 0; + onChanged(); + return this; + } + + private int x_ ; + /** + * uint32 x = 6; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + * uint32 x = 6; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint32 x = 6; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000020); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + * uint32 y = 7; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + * uint32 y = 7; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * uint32 y = 7; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000040); + y_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * uint32 width = 8; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + * uint32 width = 8; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * uint32 width = 8; + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000080); + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + * uint32 height = 9; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * uint32 height = 9; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * uint32 height = 9; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000100); + height_ = 0; + onChanged(); + return this; + } + + private int shadowDx_ ; + /** + * uint32 shadow_dx = 10; + * @return The shadowDx. + */ + @java.lang.Override + public int getShadowDx() { + return shadowDx_; + } + /** + * uint32 shadow_dx = 10; + * @param value The shadowDx to set. + * @return This builder for chaining. + */ + public Builder setShadowDx(int value) { + + shadowDx_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * uint32 shadow_dx = 10; + * @return This builder for chaining. + */ + public Builder clearShadowDx() { + bitField0_ = (bitField0_ & ~0x00000200); + shadowDx_ = 0; + onChanged(); + return this; + } + + private int shadowDy_ ; + /** + * uint32 shadow_dy = 11; + * @return The shadowDy. + */ + @java.lang.Override + public int getShadowDy() { + return shadowDy_; + } + /** + * uint32 shadow_dy = 11; + * @param value The shadowDy to set. + * @return This builder for chaining. + */ + public Builder setShadowDy(int value) { + + shadowDy_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * uint32 shadow_dy = 11; + * @return This builder for chaining. + */ + public Builder clearShadowDy() { + bitField0_ = (bitField0_ & ~0x00000400); + shadowDy_ = 0; + onChanged(); + return this; + } + + private int shadowRadius_ ; + /** + * uint32 shadow_radius = 12; + * @return The shadowRadius. + */ + @java.lang.Override + public int getShadowRadius() { + return shadowRadius_; + } + /** + * uint32 shadow_radius = 12; + * @param value The shadowRadius to set. + * @return This builder for chaining. + */ + public Builder setShadowRadius(int value) { + + shadowRadius_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * uint32 shadow_radius = 12; + * @return This builder for chaining. + */ + public Builder clearShadowRadius() { + bitField0_ = (bitField0_ & ~0x00000800); + shadowRadius_ = 0; + onChanged(); + return this; + } + + private java.lang.Object shadowColor_ = ""; + /** + * string shadow_color = 13; + * @return The shadowColor. + */ + public java.lang.String getShadowColor() { + java.lang.Object ref = shadowColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shadowColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string shadow_color = 13; + * @return The bytes for shadowColor. + */ + public com.google.protobuf.ByteString + getShadowColorBytes() { + java.lang.Object ref = shadowColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shadowColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string shadow_color = 13; + * @param value The shadowColor to set. + * @return This builder for chaining. + */ + public Builder setShadowColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shadowColor_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * string shadow_color = 13; + * @return This builder for chaining. + */ + public Builder clearShadowColor() { + shadowColor_ = getDefaultInstance().getShadowColor(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * string shadow_color = 13; + * @param value The bytes for shadowColor to set. + * @return This builder for chaining. + */ + public Builder setShadowColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shadowColor_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object strokeColor_ = ""; + /** + * string stroke_color = 14; + * @return The strokeColor. + */ + public java.lang.String getStrokeColor() { + java.lang.Object ref = strokeColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + strokeColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string stroke_color = 14; + * @return The bytes for strokeColor. + */ + public com.google.protobuf.ByteString + getStrokeColorBytes() { + java.lang.Object ref = strokeColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + strokeColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string stroke_color = 14; + * @param value The strokeColor to set. + * @return This builder for chaining. + */ + public Builder setStrokeColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + strokeColor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * string stroke_color = 14; + * @return This builder for chaining. + */ + public Builder clearStrokeColor() { + strokeColor_ = getDefaultInstance().getStrokeColor(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * string stroke_color = 14; + * @param value The bytes for strokeColor to set. + * @return This builder for chaining. + */ + public Builder setStrokeColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + strokeColor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private int strokeWidth_ ; + /** + * uint32 stroke_width = 15; + * @return The strokeWidth. + */ + @java.lang.Override + public int getStrokeWidth() { + return strokeWidth_; + } + /** + * uint32 stroke_width = 15; + * @param value The strokeWidth to set. + * @return This builder for chaining. + */ + public Builder setStrokeWidth(int value) { + + strokeWidth_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * uint32 stroke_width = 15; + * @return This builder for chaining. + */ + public Builder clearStrokeWidth() { + bitField0_ = (bitField0_ & ~0x00004000); + strokeWidth_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextEffectDetail) + } + + // @@protoc_insertion_point(class_scope:TextEffectDetail) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextEffectDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextEffectDetail_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextEffectDetail_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\026TextEffectDetail.proto\032\013Image.proto\032\nT" + + "ext.proto\"\260\002\n\020TextEffectDetail\022\023\n\004text\030\001" + + " \001(\0132\005.Text\022\026\n\016text_font_size\030\002 \001(\r\022\032\n\nb" + + "ackground\030\003 \001(\0132\006.Image\022\r\n\005start\030\004 \001(\r\022\020" + + "\n\010duration\030\005 \001(\r\022\t\n\001x\030\006 \001(\r\022\t\n\001y\030\007 \001(\r\022\r" + + "\n\005width\030\010 \001(\r\022\016\n\006height\030\t \001(\r\022\021\n\tshadow_" + + "dx\030\n \001(\r\022\021\n\tshadow_dy\030\013 \001(\r\022\025\n\rshadow_ra" + + "dius\030\014 \001(\r\022\024\n\014shadow_color\030\r \001(\t\022\024\n\014stro" + + "ke_color\030\016 \001(\t\022\024\n\014stroke_width\030\017 \001(\rB>\n<" + + "tech.ordinaryroad.live.chat.client.codec" + + ".douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.getDescriptor(), + }); + internal_static_TextEffectDetail_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextEffectDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextEffectDetail_descriptor, + new java.lang.String[] { "Text", "TextFontSize", "Background", "Start", "Duration", "X", "Y", "Width", "Height", "ShadowDx", "ShadowDy", "ShadowRadius", "ShadowColor", "StrokeColor", "StrokeWidth", }); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/dto/TextEffectOuterClass.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/dto/TextEffectOuterClass.java new file mode 100644 index 0000000..6cbe5aa --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyin/protobuf/dto/TextEffectOuterClass.java @@ -0,0 +1,890 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextEffect.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto; + +public final class TextEffectOuterClass { + private TextEffectOuterClass() {} + 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 TextEffectOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextEffect) + com.google.protobuf.MessageOrBuilder { + + /** + * .TextEffectDetail portrait = 1; + * @return Whether the portrait field is set. + */ + boolean hasPortrait(); + /** + * .TextEffectDetail portrait = 1; + * @return The portrait. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getPortrait(); + /** + * .TextEffectDetail portrait = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getPortraitOrBuilder(); + + /** + * .TextEffectDetail landscape = 2; + * @return Whether the landscape field is set. + */ + boolean hasLandscape(); + /** + * .TextEffectDetail landscape = 2; + * @return The landscape. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getLandscape(); + /** + * .TextEffectDetail landscape = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getLandscapeOrBuilder(); + } + /** + * Protobuf type {@code TextEffect} + */ + public static final class TextEffect extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextEffect) + TextEffectOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextEffect.newBuilder() to construct. + private TextEffect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextEffect() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextEffect(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder.class); + } + + private int bitField0_; + public static final int PORTRAIT_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail portrait_; + /** + * .TextEffectDetail portrait = 1; + * @return Whether the portrait field is set. + */ + @java.lang.Override + public boolean hasPortrait() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .TextEffectDetail portrait = 1; + * @return The portrait. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getPortrait() { + return portrait_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } + /** + * .TextEffectDetail portrait = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getPortraitOrBuilder() { + return portrait_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } + + public static final int LANDSCAPE_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail landscape_; + /** + * .TextEffectDetail landscape = 2; + * @return Whether the landscape field is set. + */ + @java.lang.Override + public boolean hasLandscape() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .TextEffectDetail landscape = 2; + * @return The landscape. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getLandscape() { + return landscape_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } + /** + * .TextEffectDetail landscape = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getLandscapeOrBuilder() { + return landscape_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPortrait()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getLandscape()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPortrait()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLandscape()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect) obj; + + if (hasPortrait() != other.hasPortrait()) return false; + if (hasPortrait()) { + if (!getPortrait() + .equals(other.getPortrait())) return false; + } + if (hasLandscape() != other.hasLandscape()) return false; + if (hasLandscape()) { + if (!getLandscape() + .equals(other.getLandscape())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPortrait()) { + hash = (37 * hash) + PORTRAIT_FIELD_NUMBER; + hash = (53 * hash) + getPortrait().hashCode(); + } + if (hasLandscape()) { + hash = (37 * hash) + LANDSCAPE_FIELD_NUMBER; + hash = (53 * hash) + getLandscape().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextEffect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextEffect) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPortraitFieldBuilder(); + getLandscapeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + portrait_ = null; + if (portraitBuilder_ != null) { + portraitBuilder_.dispose(); + portraitBuilder_ = null; + } + landscape_ = null; + if (landscapeBuilder_ != null) { + landscapeBuilder_.dispose(); + landscapeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.portrait_ = portraitBuilder_ == null + ? portrait_ + : portraitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.landscape_ = landscapeBuilder_ == null + ? landscape_ + : landscapeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance()) return this; + if (other.hasPortrait()) { + mergePortrait(other.getPortrait()); + } + if (other.hasLandscape()) { + mergeLandscape(other.getLandscape()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getPortraitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getLandscapeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail portrait_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> portraitBuilder_; + /** + * .TextEffectDetail portrait = 1; + * @return Whether the portrait field is set. + */ + public boolean hasPortrait() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .TextEffectDetail portrait = 1; + * @return The portrait. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getPortrait() { + if (portraitBuilder_ == null) { + return portrait_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } else { + return portraitBuilder_.getMessage(); + } + } + /** + * .TextEffectDetail portrait = 1; + */ + public Builder setPortrait(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (portraitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + portrait_ = value; + } else { + portraitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .TextEffectDetail portrait = 1; + */ + public Builder setPortrait( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder builderForValue) { + if (portraitBuilder_ == null) { + portrait_ = builderForValue.build(); + } else { + portraitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .TextEffectDetail portrait = 1; + */ + public Builder mergePortrait(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (portraitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + portrait_ != null && + portrait_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance()) { + getPortraitBuilder().mergeFrom(value); + } else { + portrait_ = value; + } + } else { + portraitBuilder_.mergeFrom(value); + } + if (portrait_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .TextEffectDetail portrait = 1; + */ + public Builder clearPortrait() { + bitField0_ = (bitField0_ & ~0x00000001); + portrait_ = null; + if (portraitBuilder_ != null) { + portraitBuilder_.dispose(); + portraitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextEffectDetail portrait = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder getPortraitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPortraitFieldBuilder().getBuilder(); + } + /** + * .TextEffectDetail portrait = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getPortraitOrBuilder() { + if (portraitBuilder_ != null) { + return portraitBuilder_.getMessageOrBuilder(); + } else { + return portrait_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } + } + /** + * .TextEffectDetail portrait = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> + getPortraitFieldBuilder() { + if (portraitBuilder_ == null) { + portraitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder>( + getPortrait(), + getParentForChildren(), + isClean()); + portrait_ = null; + } + return portraitBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail landscape_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> landscapeBuilder_; + /** + * .TextEffectDetail landscape = 2; + * @return Whether the landscape field is set. + */ + public boolean hasLandscape() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .TextEffectDetail landscape = 2; + * @return The landscape. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getLandscape() { + if (landscapeBuilder_ == null) { + return landscape_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } else { + return landscapeBuilder_.getMessage(); + } + } + /** + * .TextEffectDetail landscape = 2; + */ + public Builder setLandscape(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (landscapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + landscape_ = value; + } else { + landscapeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .TextEffectDetail landscape = 2; + */ + public Builder setLandscape( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder builderForValue) { + if (landscapeBuilder_ == null) { + landscape_ = builderForValue.build(); + } else { + landscapeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .TextEffectDetail landscape = 2; + */ + public Builder mergeLandscape(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (landscapeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + landscape_ != null && + landscape_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance()) { + getLandscapeBuilder().mergeFrom(value); + } else { + landscape_ = value; + } + } else { + landscapeBuilder_.mergeFrom(value); + } + if (landscape_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .TextEffectDetail landscape = 2; + */ + public Builder clearLandscape() { + bitField0_ = (bitField0_ & ~0x00000002); + landscape_ = null; + if (landscapeBuilder_ != null) { + landscapeBuilder_.dispose(); + landscapeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextEffectDetail landscape = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder getLandscapeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLandscapeFieldBuilder().getBuilder(); + } + /** + * .TextEffectDetail landscape = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getLandscapeOrBuilder() { + if (landscapeBuilder_ != null) { + return landscapeBuilder_.getMessageOrBuilder(); + } else { + return landscape_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } + } + /** + * .TextEffectDetail landscape = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> + getLandscapeFieldBuilder() { + if (landscapeBuilder_ == null) { + landscapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder>( + getLandscape(), + getParentForChildren(), + isClean()); + landscape_ = null; + } + return landscapeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextEffect) + } + + // @@protoc_insertion_point(class_scope:TextEffect) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextEffect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextEffect_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextEffect_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\020TextEffect.proto\032\026TextEffectDetail.pro" + + "to\"W\n\nTextEffect\022#\n\010portrait\030\001 \001(\0132\021.Tex" + + "tEffectDetail\022$\n\tlandscape\030\002 \001(\0132\021.TextE" + + "ffectDetailB>\nstring color = 1; + * @return The color. + */ + java.lang.String getColor(); + /** + * string color = 1; + * @return The bytes for color. + */ + com.google.protobuf.ByteString + getColorBytes(); + + /** + * bool bold = 2; + * @return The bold. + */ + boolean getBold(); + + /** + * bool italic = 3; + * @return The italic. + */ + boolean getItalic(); + + /** + * uint32 weight = 4; + * @return The weight. + */ + int getWeight(); + + /** + * uint32 italic_angle = 5; + * @return The italicAngle. + */ + int getItalicAngle(); + + /** + * uint32 font_size = 6; + * @return The fontSize. + */ + int getFontSize(); + + /** + * bool use_heigh_light_color = 7; + * @return The useHeighLightColor. + */ + boolean getUseHeighLightColor(); + + /** + * bool use_remote_clor = 8; + * @return The useRemoteClor. + */ + boolean getUseRemoteClor(); + } + /** + * Protobuf type {@code TextFormat} + */ + public static final class TextFormat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextFormat) + TextFormatOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextFormat.newBuilder() to construct. + private TextFormat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextFormat() { + color_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextFormat(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object color_ = ""; + /** + * string color = 1; + * @return The color. + */ + @java.lang.Override + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } + } + /** + * string color = 1; + * @return The bytes for color. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOLD_FIELD_NUMBER = 2; + private boolean bold_ = false; + /** + * bool bold = 2; + * @return The bold. + */ + @java.lang.Override + public boolean getBold() { + return bold_; + } + + public static final int ITALIC_FIELD_NUMBER = 3; + private boolean italic_ = false; + /** + * bool italic = 3; + * @return The italic. + */ + @java.lang.Override + public boolean getItalic() { + return italic_; + } + + public static final int WEIGHT_FIELD_NUMBER = 4; + private int weight_ = 0; + /** + * uint32 weight = 4; + * @return The weight. + */ + @java.lang.Override + public int getWeight() { + return weight_; + } + + public static final int ITALIC_ANGLE_FIELD_NUMBER = 5; + private int italicAngle_ = 0; + /** + * uint32 italic_angle = 5; + * @return The italicAngle. + */ + @java.lang.Override + public int getItalicAngle() { + return italicAngle_; + } + + public static final int FONT_SIZE_FIELD_NUMBER = 6; + private int fontSize_ = 0; + /** + * uint32 font_size = 6; + * @return The fontSize. + */ + @java.lang.Override + public int getFontSize() { + return fontSize_; + } + + public static final int USE_HEIGH_LIGHT_COLOR_FIELD_NUMBER = 7; + private boolean useHeighLightColor_ = false; + /** + * bool use_heigh_light_color = 7; + * @return The useHeighLightColor. + */ + @java.lang.Override + public boolean getUseHeighLightColor() { + return useHeighLightColor_; + } + + public static final int USE_REMOTE_CLOR_FIELD_NUMBER = 8; + private boolean useRemoteClor_ = false; + /** + * bool use_remote_clor = 8; + * @return The useRemoteClor. + */ + @java.lang.Override + public boolean getUseRemoteClor() { + return useRemoteClor_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, color_); + } + if (bold_ != false) { + output.writeBool(2, bold_); + } + if (italic_ != false) { + output.writeBool(3, italic_); + } + if (weight_ != 0) { + output.writeUInt32(4, weight_); + } + if (italicAngle_ != 0) { + output.writeUInt32(5, italicAngle_); + } + if (fontSize_ != 0) { + output.writeUInt32(6, fontSize_); + } + if (useHeighLightColor_ != false) { + output.writeBool(7, useHeighLightColor_); + } + if (useRemoteClor_ != false) { + output.writeBool(8, useRemoteClor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, color_); + } + if (bold_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, bold_); + } + if (italic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, italic_); + } + if (weight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, weight_); + } + if (italicAngle_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, italicAngle_); + } + if (fontSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, fontSize_); + } + if (useHeighLightColor_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, useHeighLightColor_); + } + if (useRemoteClor_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, useRemoteClor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat) obj; + + if (!getColor() + .equals(other.getColor())) return false; + if (getBold() + != other.getBold()) return false; + if (getItalic() + != other.getItalic()) return false; + if (getWeight() + != other.getWeight()) return false; + if (getItalicAngle() + != other.getItalicAngle()) return false; + if (getFontSize() + != other.getFontSize()) return false; + if (getUseHeighLightColor() + != other.getUseHeighLightColor()) return false; + if (getUseRemoteClor() + != other.getUseRemoteClor()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + hash = (37 * hash) + BOLD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBold()); + hash = (37 * hash) + ITALIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getItalic()); + hash = (37 * hash) + WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getWeight(); + hash = (37 * hash) + ITALIC_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + getItalicAngle(); + hash = (37 * hash) + FONT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getFontSize(); + hash = (37 * hash) + USE_HEIGH_LIGHT_COLOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseHeighLightColor()); + hash = (37 * hash) + USE_REMOTE_CLOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseRemoteClor()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextFormat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextFormat) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + color_ = ""; + bold_ = false; + italic_ = false; + weight_ = 0; + italicAngle_ = 0; + fontSize_ = 0; + useHeighLightColor_ = false; + useRemoteClor_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bold_ = bold_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.italic_ = italic_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.weight_ = weight_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.italicAngle_ = italicAngle_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fontSize_ = fontSize_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.useHeighLightColor_ = useHeighLightColor_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.useRemoteClor_ = useRemoteClor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance()) return this; + if (!other.getColor().isEmpty()) { + color_ = other.color_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBold() != false) { + setBold(other.getBold()); + } + if (other.getItalic() != false) { + setItalic(other.getItalic()); + } + if (other.getWeight() != 0) { + setWeight(other.getWeight()); + } + if (other.getItalicAngle() != 0) { + setItalicAngle(other.getItalicAngle()); + } + if (other.getFontSize() != 0) { + setFontSize(other.getFontSize()); + } + if (other.getUseHeighLightColor() != false) { + setUseHeighLightColor(other.getUseHeighLightColor()); + } + if (other.getUseRemoteClor() != false) { + setUseRemoteClor(other.getUseRemoteClor()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + color_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + bold_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + italic_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + weight_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + italicAngle_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + fontSize_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + useHeighLightColor_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + useRemoteClor_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object color_ = ""; + /** + * string color = 1; + * @return The color. + */ + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string color = 1; + * @return The bytes for color. + */ + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string color = 1; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string color = 1; + * @return This builder for chaining. + */ + public Builder clearColor() { + color_ = getDefaultInstance().getColor(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string color = 1; + * @param value The bytes for color to set. + * @return This builder for chaining. + */ + public Builder setColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean bold_ ; + /** + * bool bold = 2; + * @return The bold. + */ + @java.lang.Override + public boolean getBold() { + return bold_; + } + /** + * bool bold = 2; + * @param value The bold to set. + * @return This builder for chaining. + */ + public Builder setBold(boolean value) { + + bold_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool bold = 2; + * @return This builder for chaining. + */ + public Builder clearBold() { + bitField0_ = (bitField0_ & ~0x00000002); + bold_ = false; + onChanged(); + return this; + } + + private boolean italic_ ; + /** + * bool italic = 3; + * @return The italic. + */ + @java.lang.Override + public boolean getItalic() { + return italic_; + } + /** + * bool italic = 3; + * @param value The italic to set. + * @return This builder for chaining. + */ + public Builder setItalic(boolean value) { + + italic_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool italic = 3; + * @return This builder for chaining. + */ + public Builder clearItalic() { + bitField0_ = (bitField0_ & ~0x00000004); + italic_ = false; + onChanged(); + return this; + } + + private int weight_ ; + /** + * uint32 weight = 4; + * @return The weight. + */ + @java.lang.Override + public int getWeight() { + return weight_; + } + /** + * uint32 weight = 4; + * @param value The weight to set. + * @return This builder for chaining. + */ + public Builder setWeight(int value) { + + weight_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 weight = 4; + * @return This builder for chaining. + */ + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000008); + weight_ = 0; + onChanged(); + return this; + } + + private int italicAngle_ ; + /** + * uint32 italic_angle = 5; + * @return The italicAngle. + */ + @java.lang.Override + public int getItalicAngle() { + return italicAngle_; + } + /** + * uint32 italic_angle = 5; + * @param value The italicAngle to set. + * @return This builder for chaining. + */ + public Builder setItalicAngle(int value) { + + italicAngle_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint32 italic_angle = 5; + * @return This builder for chaining. + */ + public Builder clearItalicAngle() { + bitField0_ = (bitField0_ & ~0x00000010); + italicAngle_ = 0; + onChanged(); + return this; + } + + private int fontSize_ ; + /** + * uint32 font_size = 6; + * @return The fontSize. + */ + @java.lang.Override + public int getFontSize() { + return fontSize_; + } + /** + * uint32 font_size = 6; + * @param value The fontSize to set. + * @return This builder for chaining. + */ + public Builder setFontSize(int value) { + + fontSize_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint32 font_size = 6; + * @return This builder for chaining. + */ + public Builder clearFontSize() { + bitField0_ = (bitField0_ & ~0x00000020); + fontSize_ = 0; + onChanged(); + return this; + } + + private boolean useHeighLightColor_ ; + /** + * bool use_heigh_light_color = 7; + * @return The useHeighLightColor. + */ + @java.lang.Override + public boolean getUseHeighLightColor() { + return useHeighLightColor_; + } + /** + * bool use_heigh_light_color = 7; + * @param value The useHeighLightColor to set. + * @return This builder for chaining. + */ + public Builder setUseHeighLightColor(boolean value) { + + useHeighLightColor_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * bool use_heigh_light_color = 7; + * @return This builder for chaining. + */ + public Builder clearUseHeighLightColor() { + bitField0_ = (bitField0_ & ~0x00000040); + useHeighLightColor_ = false; + onChanged(); + return this; + } + + private boolean useRemoteClor_ ; + /** + * bool use_remote_clor = 8; + * @return The useRemoteClor. + */ + @java.lang.Override + public boolean getUseRemoteClor() { + return useRemoteClor_; + } + /** + * bool use_remote_clor = 8; + * @param value The useRemoteClor to set. + * @return This builder for chaining. + */ + public Builder setUseRemoteClor(boolean value) { + + useRemoteClor_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bool use_remote_clor = 8; + * @return This builder for chaining. + */ + public Builder clearUseRemoteClor() { + bitField0_ = (bitField0_ & ~0x00000080); + useRemoteClor_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextFormat) + } + + // @@protoc_insertion_point(class_scope:TextFormat) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextFormat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextFormat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextFormat_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\020TextFormat.proto\"\252\001\n\nTextFormat\022\r\n\005col" + + "or\030\001 \001(\t\022\014\n\004bold\030\002 \001(\010\022\016\n\006italic\030\003 \001(\010\022\016" + + "\n\006weight\030\004 \001(\r\022\024\n\014italic_angle\030\005 \001(\r\022\021\n\t" + + "font_size\030\006 \001(\r\022\035\n\025use_heigh_light_color" + + "\030\007 \001(\010\022\027\n\017use_remote_clor\030\010 \001(\010B>\nstring key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * string default_patter = 2; + * @return The defaultPatter. + */ + java.lang.String getDefaultPatter(); + /** + * string default_patter = 2; + * @return The bytes for defaultPatter. + */ + com.google.protobuf.ByteString + getDefaultPatterBytes(); + + /** + * .TextFormat default_format = 3; + * @return Whether the defaultFormat field is set. + */ + boolean hasDefaultFormat(); + /** + * .TextFormat default_format = 3; + * @return The defaultFormat. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultFormat(); + /** + * .TextFormat default_format = 3; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getDefaultFormatOrBuilder(); + + /** + * .TextPiece pieces_list = 4; + * @return Whether the piecesList field is set. + */ + boolean hasPiecesList(); + /** + * .TextPiece pieces_list = 4; + * @return The piecesList. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getPiecesList(); + /** + * .TextPiece pieces_list = 4; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder getPiecesListOrBuilder(); + } + /** + * Protobuf type {@code Text} + */ + public static final class Text extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Text) + TextOrBuilder { + private static final long serialVersionUID = 0L; + // Use Text.newBuilder() to construct. + private Text(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Text() { + key_ = ""; + defaultPatter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Text(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.internal_static_Text_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.internal_static_Text_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder.class); + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_PATTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object defaultPatter_ = ""; + /** + * string default_patter = 2; + * @return The defaultPatter. + */ + @java.lang.Override + public java.lang.String getDefaultPatter() { + java.lang.Object ref = defaultPatter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPatter_ = s; + return s; + } + } + /** + * string default_patter = 2; + * @return The bytes for defaultPatter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultPatterBytes() { + java.lang.Object ref = defaultPatter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPatter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FORMAT_FIELD_NUMBER = 3; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat defaultFormat_; + /** + * .TextFormat default_format = 3; + * @return Whether the defaultFormat field is set. + */ + @java.lang.Override + public boolean hasDefaultFormat() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .TextFormat default_format = 3; + * @return The defaultFormat. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultFormat() { + return defaultFormat_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } + /** + * .TextFormat default_format = 3; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getDefaultFormatOrBuilder() { + return defaultFormat_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } + + public static final int PIECES_LIST_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece piecesList_; + /** + * .TextPiece pieces_list = 4; + * @return Whether the piecesList field is set. + */ + @java.lang.Override + public boolean hasPiecesList() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .TextPiece pieces_list = 4; + * @return The piecesList. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getPiecesList() { + return piecesList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } + /** + * .TextPiece pieces_list = 4; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder getPiecesListOrBuilder() { + return piecesList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPatter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, defaultPatter_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDefaultFormat()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getPiecesList()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPatter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, defaultPatter_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDefaultFormat()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPiecesList()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getDefaultPatter() + .equals(other.getDefaultPatter())) return false; + if (hasDefaultFormat() != other.hasDefaultFormat()) return false; + if (hasDefaultFormat()) { + if (!getDefaultFormat() + .equals(other.getDefaultFormat())) return false; + } + if (hasPiecesList() != other.hasPiecesList()) return false; + if (hasPiecesList()) { + if (!getPiecesList() + .equals(other.getPiecesList())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + DEFAULT_PATTER_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPatter().hashCode(); + if (hasDefaultFormat()) { + hash = (37 * hash) + DEFAULT_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getDefaultFormat().hashCode(); + } + if (hasPiecesList()) { + hash = (37 * hash) + PIECES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getPiecesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 Text} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Text) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.TextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.internal_static_Text_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.internal_static_Text_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDefaultFormatFieldBuilder(); + getPiecesListFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + defaultPatter_ = ""; + defaultFormat_ = null; + if (defaultFormatBuilder_ != null) { + defaultFormatBuilder_.dispose(); + defaultFormatBuilder_ = null; + } + piecesList_ = null; + if (piecesListBuilder_ != null) { + piecesListBuilder_.dispose(); + piecesListBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.internal_static_Text_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultPatter_ = defaultPatter_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.defaultFormat_ = defaultFormatBuilder_ == null + ? defaultFormat_ + : defaultFormatBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.piecesList_ = piecesListBuilder_ == null + ? piecesList_ + : piecesListBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultPatter().isEmpty()) { + defaultPatter_ = other.defaultPatter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDefaultFormat()) { + mergeDefaultFormat(other.getDefaultFormat()); + } + if (other.hasPiecesList()) { + mergePiecesList(other.getPiecesList()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + defaultPatter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getDefaultFormatFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getPiecesListFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultPatter_ = ""; + /** + * string default_patter = 2; + * @return The defaultPatter. + */ + public java.lang.String getDefaultPatter() { + java.lang.Object ref = defaultPatter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPatter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string default_patter = 2; + * @return The bytes for defaultPatter. + */ + public com.google.protobuf.ByteString + getDefaultPatterBytes() { + java.lang.Object ref = defaultPatter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPatter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string default_patter = 2; + * @param value The defaultPatter to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + defaultPatter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string default_patter = 2; + * @return This builder for chaining. + */ + public Builder clearDefaultPatter() { + defaultPatter_ = getDefaultInstance().getDefaultPatter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string default_patter = 2; + * @param value The bytes for defaultPatter to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + defaultPatter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat defaultFormat_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> defaultFormatBuilder_; + /** + * .TextFormat default_format = 3; + * @return Whether the defaultFormat field is set. + */ + public boolean hasDefaultFormat() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .TextFormat default_format = 3; + * @return The defaultFormat. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultFormat() { + if (defaultFormatBuilder_ == null) { + return defaultFormat_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } else { + return defaultFormatBuilder_.getMessage(); + } + } + /** + * .TextFormat default_format = 3; + */ + public Builder setDefaultFormat(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (defaultFormatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultFormat_ = value; + } else { + defaultFormatBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .TextFormat default_format = 3; + */ + public Builder setDefaultFormat( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder builderForValue) { + if (defaultFormatBuilder_ == null) { + defaultFormat_ = builderForValue.build(); + } else { + defaultFormatBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .TextFormat default_format = 3; + */ + public Builder mergeDefaultFormat(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (defaultFormatBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + defaultFormat_ != null && + defaultFormat_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance()) { + getDefaultFormatBuilder().mergeFrom(value); + } else { + defaultFormat_ = value; + } + } else { + defaultFormatBuilder_.mergeFrom(value); + } + if (defaultFormat_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .TextFormat default_format = 3; + */ + public Builder clearDefaultFormat() { + bitField0_ = (bitField0_ & ~0x00000004); + defaultFormat_ = null; + if (defaultFormatBuilder_ != null) { + defaultFormatBuilder_.dispose(); + defaultFormatBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextFormat default_format = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder getDefaultFormatBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDefaultFormatFieldBuilder().getBuilder(); + } + /** + * .TextFormat default_format = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getDefaultFormatOrBuilder() { + if (defaultFormatBuilder_ != null) { + return defaultFormatBuilder_.getMessageOrBuilder(); + } else { + return defaultFormat_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } + } + /** + * .TextFormat default_format = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> + getDefaultFormatFieldBuilder() { + if (defaultFormatBuilder_ == null) { + defaultFormatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder>( + getDefaultFormat(), + getParentForChildren(), + isClean()); + defaultFormat_ = null; + } + return defaultFormatBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece piecesList_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder> piecesListBuilder_; + /** + * .TextPiece pieces_list = 4; + * @return Whether the piecesList field is set. + */ + public boolean hasPiecesList() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .TextPiece pieces_list = 4; + * @return The piecesList. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getPiecesList() { + if (piecesListBuilder_ == null) { + return piecesList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } else { + return piecesListBuilder_.getMessage(); + } + } + /** + * .TextPiece pieces_list = 4; + */ + public Builder setPiecesList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece value) { + if (piecesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + piecesList_ = value; + } else { + piecesListBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .TextPiece pieces_list = 4; + */ + public Builder setPiecesList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder builderForValue) { + if (piecesListBuilder_ == null) { + piecesList_ = builderForValue.build(); + } else { + piecesListBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .TextPiece pieces_list = 4; + */ + public Builder mergePiecesList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece value) { + if (piecesListBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + piecesList_ != null && + piecesList_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance()) { + getPiecesListBuilder().mergeFrom(value); + } else { + piecesList_ = value; + } + } else { + piecesListBuilder_.mergeFrom(value); + } + if (piecesList_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .TextPiece pieces_list = 4; + */ + public Builder clearPiecesList() { + bitField0_ = (bitField0_ & ~0x00000008); + piecesList_ = null; + if (piecesListBuilder_ != null) { + piecesListBuilder_.dispose(); + piecesListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextPiece pieces_list = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder getPiecesListBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPiecesListFieldBuilder().getBuilder(); + } + /** + * .TextPiece pieces_list = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder getPiecesListOrBuilder() { + if (piecesListBuilder_ != null) { + return piecesListBuilder_.getMessageOrBuilder(); + } else { + return piecesList_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } + } + /** + * .TextPiece pieces_list = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder> + getPiecesListFieldBuilder() { + if (piecesListBuilder_ == null) { + piecesListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder>( + getPiecesList(), + getParentForChildren(), + isClean()); + piecesList_ = null; + } + return piecesListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Text) + } + + // @@protoc_insertion_point(class_scope:Text) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Text parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextOuterClass.Text getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Text_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Text_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\nText.proto\032\020TextFormat.proto\032\017TextPiec" + + "e.proto\"q\n\004Text\022\013\n\003key\030\001 \001(\t\022\026\n\016default_" + + "patter\030\002 \001(\t\022#\n\016default_format\030\003 \001(\0132\013.T" + + "extFormat\022\037\n\013pieces_list\030\004 \001(\0132\n.TextPie" + + "ceB>\nuint64 gift_id = 1; + * @return The giftId. + */ + long getGiftId(); + + /** + * .PatternRef name_ref = 2; + * @return Whether the nameRef field is set. + */ + boolean hasNameRef(); + /** + * .PatternRef name_ref = 2; + * @return The nameRef. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getNameRef(); + /** + * .PatternRef name_ref = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder getNameRefOrBuilder(); + } + /** + * Protobuf type {@code TextPieceGift} + */ + public static final class TextPieceGift extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceGift) + TextPieceGiftOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceGift.newBuilder() to construct. + private TextPieceGift(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextPieceGift() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceGift(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder.class); + } + + private int bitField0_; + public static final int GIFT_ID_FIELD_NUMBER = 1; + private long giftId_ = 0L; + /** + * uint64 gift_id = 1; + * @return The giftId. + */ + @java.lang.Override + public long getGiftId() { + return giftId_; + } + + public static final int NAME_REF_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef nameRef_; + /** + * .PatternRef name_ref = 2; + * @return Whether the nameRef field is set. + */ + @java.lang.Override + public boolean hasNameRef() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .PatternRef name_ref = 2; + * @return The nameRef. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getNameRef() { + return nameRef_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } + /** + * .PatternRef name_ref = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder getNameRefOrBuilder() { + return nameRef_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (giftId_ != 0L) { + output.writeUInt64(1, giftId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNameRef()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (giftId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, giftId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNameRef()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift) obj; + + if (getGiftId() + != other.getGiftId()) return false; + if (hasNameRef() != other.hasNameRef()) return false; + if (hasNameRef()) { + if (!getNameRef() + .equals(other.getNameRef())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GIFT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGiftId()); + if (hasNameRef()) { + hash = (37 * hash) + NAME_REF_FIELD_NUMBER; + hash = (53 * hash) + getNameRef().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextPieceGift} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextPieceGift) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNameRefFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + giftId_ = 0L; + nameRef_ = null; + if (nameRefBuilder_ != null) { + nameRefBuilder_.dispose(); + nameRefBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.giftId_ = giftId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nameRef_ = nameRefBuilder_ == null + ? nameRef_ + : nameRefBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance()) return this; + if (other.getGiftId() != 0L) { + setGiftId(other.getGiftId()); + } + if (other.hasNameRef()) { + mergeNameRef(other.getNameRef()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + giftId_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getNameRefFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long giftId_ ; + /** + * uint64 gift_id = 1; + * @return The giftId. + */ + @java.lang.Override + public long getGiftId() { + return giftId_; + } + /** + * uint64 gift_id = 1; + * @param value The giftId to set. + * @return This builder for chaining. + */ + public Builder setGiftId(long value) { + + giftId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 gift_id = 1; + * @return This builder for chaining. + */ + public Builder clearGiftId() { + bitField0_ = (bitField0_ & ~0x00000001); + giftId_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef nameRef_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder> nameRefBuilder_; + /** + * .PatternRef name_ref = 2; + * @return Whether the nameRef field is set. + */ + public boolean hasNameRef() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .PatternRef name_ref = 2; + * @return The nameRef. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getNameRef() { + if (nameRefBuilder_ == null) { + return nameRef_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } else { + return nameRefBuilder_.getMessage(); + } + } + /** + * .PatternRef name_ref = 2; + */ + public Builder setNameRef(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef value) { + if (nameRefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nameRef_ = value; + } else { + nameRefBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .PatternRef name_ref = 2; + */ + public Builder setNameRef( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder builderForValue) { + if (nameRefBuilder_ == null) { + nameRef_ = builderForValue.build(); + } else { + nameRefBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .PatternRef name_ref = 2; + */ + public Builder mergeNameRef(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef value) { + if (nameRefBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + nameRef_ != null && + nameRef_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance()) { + getNameRefBuilder().mergeFrom(value); + } else { + nameRef_ = value; + } + } else { + nameRefBuilder_.mergeFrom(value); + } + if (nameRef_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .PatternRef name_ref = 2; + */ + public Builder clearNameRef() { + bitField0_ = (bitField0_ & ~0x00000002); + nameRef_ = null; + if (nameRefBuilder_ != null) { + nameRefBuilder_.dispose(); + nameRefBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .PatternRef name_ref = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder getNameRefBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNameRefFieldBuilder().getBuilder(); + } + /** + * .PatternRef name_ref = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder getNameRefOrBuilder() { + if (nameRefBuilder_ != null) { + return nameRefBuilder_.getMessageOrBuilder(); + } else { + return nameRef_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } + } + /** + * .PatternRef name_ref = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder> + getNameRefFieldBuilder() { + if (nameRefBuilder_ == null) { + nameRefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder>( + getNameRef(), + getParentForChildren(), + isClean()); + nameRef_ = null; + } + return nameRefBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceGift) + } + + // @@protoc_insertion_point(class_scope:TextPieceGift) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextPieceGift parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceGift_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceGift_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\023TextPieceGift.proto\032\020PatternRef.proto\"" + + "?\n\rTextPieceGift\022\017\n\007gift_id\030\001 \001(\004\022\035\n\010nam" + + "e_ref\030\002 \001(\0132\013.PatternRefB>\nstring color = 1; + * @return The color. + */ + java.lang.String getColor(); + /** + * string color = 1; + * @return The bytes for color. + */ + com.google.protobuf.ByteString + getColorBytes(); + } + /** + * Protobuf type {@code TextPieceHeart} + */ + public static final class TextPieceHeart extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceHeart) + TextPieceHeartOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceHeart.newBuilder() to construct. + private TextPieceHeart(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextPieceHeart() { + color_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceHeart(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object color_ = ""; + /** + * string color = 1; + * @return The color. + */ + @java.lang.Override + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } + } + /** + * string color = 1; + * @return The bytes for color. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, color_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, color_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart) obj; + + if (!getColor() + .equals(other.getColor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextPieceHeart} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextPieceHeart) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + color_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.color_ = color_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance()) return this; + if (!other.getColor().isEmpty()) { + color_ = other.color_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + color_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object color_ = ""; + /** + * string color = 1; + * @return The color. + */ + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string color = 1; + * @return The bytes for color. + */ + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string color = 1; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string color = 1; + * @return This builder for chaining. + */ + public Builder clearColor() { + color_ = getDefaultInstance().getColor(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string color = 1; + * @param value The bytes for color to set. + * @return This builder for chaining. + */ + public Builder setColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceHeart) + } + + // @@protoc_insertion_point(class_scope:TextPieceHeart) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextPieceHeart parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceHeart_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceHeart_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\024TextPieceHeart.proto\"\037\n\016TextPieceHeart" + + "\022\r\n\005color\030\001 \001(\tB>\n.Image image = 1; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + * .Image image = 1; + * @return The image. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImage(); + /** + * .Image image = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder(); + + /** + * float scaling_rate = 2; + * @return The scalingRate. + */ + float getScalingRate(); + } + /** + * Protobuf type {@code TextPieceImage} + */ + public static final class TextPieceImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceImage) + TextPieceImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceImage.newBuilder() to construct. + private TextPieceImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextPieceImage() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceImage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder.class); + } + + private int bitField0_; + public static final int IMAGE_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image image_; + /** + * .Image image = 1; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image image = 1; + * @return The image. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + return image_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + /** + * .Image image = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + return image_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + + public static final int SCALING_RATE_FIELD_NUMBER = 2; + private float scalingRate_ = 0F; + /** + * float scaling_rate = 2; + * @return The scalingRate. + */ + @java.lang.Override + public float getScalingRate() { + return scalingRate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getImage()); + } + if (java.lang.Float.floatToRawIntBits(scalingRate_) != 0) { + output.writeFloat(2, scalingRate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + if (java.lang.Float.floatToRawIntBits(scalingRate_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scalingRate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (java.lang.Float.floatToIntBits(getScalingRate()) + != java.lang.Float.floatToIntBits( + other.getScalingRate())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + hash = (37 * hash) + SCALING_RATE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScalingRate()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextPieceImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextPieceImage) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getImageFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + scalingRate_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.image_ = imageBuilder_ == null + ? image_ + : imageBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.scalingRate_ = scalingRate_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (other.getScalingRate() != 0F) { + setScalingRate(other.getScalingRate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: { + scalingRate_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imageBuilder_; + /** + * .Image image = 1; + * @return Whether the image field is set. + */ + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image image = 1; + * @return The image. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + * .Image image = 1; + */ + public Builder setImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + } else { + imageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image image = 1; + */ + public Builder setImage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image image = 1; + */ + public Builder mergeImage(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + image_ != null && + image_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImageBuilder().mergeFrom(value); + } else { + image_ = value; + } + } else { + imageBuilder_.mergeFrom(value); + } + if (image_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Image image = 1; + */ + public Builder clearImage() { + bitField0_ = (bitField0_ & ~0x00000001); + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image image = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImageBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + * .Image image = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + } + /** + * .Image image = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private float scalingRate_ ; + /** + * float scaling_rate = 2; + * @return The scalingRate. + */ + @java.lang.Override + public float getScalingRate() { + return scalingRate_; + } + /** + * float scaling_rate = 2; + * @param value The scalingRate to set. + * @return This builder for chaining. + */ + public Builder setScalingRate(float value) { + + scalingRate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float scaling_rate = 2; + * @return This builder for chaining. + */ + public Builder clearScalingRate() { + bitField0_ = (bitField0_ & ~0x00000002); + scalingRate_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceImage) + } + + // @@protoc_insertion_point(class_scope:TextPieceImage) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextPieceImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceImage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceImage_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\024TextPieceImage.proto\032\013Image.proto\"=\n\016T" + + "extPieceImage\022\025\n\005image\030\001 \001(\0132\006.Image\022\024\n\014" + + "scaling_rate\030\002 \001(\002B>\nbool type = 1; + * @return The type. + */ + boolean getType(); + + /** + * .TextFormat format = 2; + * @return Whether the format field is set. + */ + boolean hasFormat(); + /** + * .TextFormat format = 2; + * @return The format. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getFormat(); + /** + * .TextFormat format = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getFormatOrBuilder(); + + /** + * string string_value = 3; + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * string string_value = 3; + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + /** + * .TextPieceUser user_value = 4; + * @return Whether the userValue field is set. + */ + boolean hasUserValue(); + /** + * .TextPieceUser user_value = 4; + * @return The userValue. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getUserValue(); + /** + * .TextPieceUser user_value = 4; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder getUserValueOrBuilder(); + + /** + * .TextPieceGift gift_value = 5; + * @return Whether the giftValue field is set. + */ + boolean hasGiftValue(); + /** + * .TextPieceGift gift_value = 5; + * @return The giftValue. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getGiftValue(); + /** + * .TextPieceGift gift_value = 5; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder getGiftValueOrBuilder(); + + /** + * .TextPieceHeart heart_value = 6; + * @return Whether the heartValue field is set. + */ + boolean hasHeartValue(); + /** + * .TextPieceHeart heart_value = 6; + * @return The heartValue. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getHeartValue(); + /** + * .TextPieceHeart heart_value = 6; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder getHeartValueOrBuilder(); + + /** + * .TextPiecePatternRef pattern_ref_value = 7; + * @return Whether the patternRefValue field is set. + */ + boolean hasPatternRefValue(); + /** + * .TextPiecePatternRef pattern_ref_value = 7; + * @return The patternRefValue. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getPatternRefValue(); + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder getPatternRefValueOrBuilder(); + + /** + * .TextPieceImage image_value = 8; + * @return Whether the imageValue field is set. + */ + boolean hasImageValue(); + /** + * .TextPieceImage image_value = 8; + * @return The imageValue. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getImageValue(); + /** + * .TextPieceImage image_value = 8; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder getImageValueOrBuilder(); + } + /** + * Protobuf type {@code TextPiece} + */ + public static final class TextPiece extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPiece) + TextPieceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPiece.newBuilder() to construct. + private TextPiece(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextPiece() { + stringValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPiece(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder.class); + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private boolean type_ = false; + /** + * bool type = 1; + * @return The type. + */ + @java.lang.Override + public boolean getType() { + return type_; + } + + public static final int FORMAT_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat format_; + /** + * .TextFormat format = 2; + * @return Whether the format field is set. + */ + @java.lang.Override + public boolean hasFormat() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .TextFormat format = 2; + * @return The format. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getFormat() { + return format_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } + /** + * .TextFormat format = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getFormatOrBuilder() { + return format_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object stringValue_ = ""; + /** + * string string_value = 3; + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stringValue_ = s; + return s; + } + } + /** + * string string_value = 3; + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_VALUE_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser userValue_; + /** + * .TextPieceUser user_value = 4; + * @return Whether the userValue field is set. + */ + @java.lang.Override + public boolean hasUserValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .TextPieceUser user_value = 4; + * @return The userValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getUserValue() { + return userValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } + /** + * .TextPieceUser user_value = 4; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder getUserValueOrBuilder() { + return userValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } + + public static final int GIFT_VALUE_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift giftValue_; + /** + * .TextPieceGift gift_value = 5; + * @return Whether the giftValue field is set. + */ + @java.lang.Override + public boolean hasGiftValue() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .TextPieceGift gift_value = 5; + * @return The giftValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getGiftValue() { + return giftValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } + /** + * .TextPieceGift gift_value = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder getGiftValueOrBuilder() { + return giftValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } + + public static final int HEART_VALUE_FIELD_NUMBER = 6; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart heartValue_; + /** + * .TextPieceHeart heart_value = 6; + * @return Whether the heartValue field is set. + */ + @java.lang.Override + public boolean hasHeartValue() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .TextPieceHeart heart_value = 6; + * @return The heartValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getHeartValue() { + return heartValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } + /** + * .TextPieceHeart heart_value = 6; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder getHeartValueOrBuilder() { + return heartValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } + + public static final int PATTERN_REF_VALUE_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef patternRefValue_; + /** + * .TextPiecePatternRef pattern_ref_value = 7; + * @return Whether the patternRefValue field is set. + */ + @java.lang.Override + public boolean hasPatternRefValue() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + * @return The patternRefValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getPatternRefValue() { + return patternRefValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder getPatternRefValueOrBuilder() { + return patternRefValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } + + public static final int IMAGE_VALUE_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage imageValue_; + /** + * .TextPieceImage image_value = 8; + * @return Whether the imageValue field is set. + */ + @java.lang.Override + public boolean hasImageValue() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .TextPieceImage image_value = 8; + * @return The imageValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getImageValue() { + return imageValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } + /** + * .TextPieceImage image_value = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder getImageValueOrBuilder() { + return imageValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != false) { + output.writeBool(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getFormat()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, stringValue_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getUserValue()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getGiftValue()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getHeartValue()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(7, getPatternRefValue()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(8, getImageValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFormat()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, stringValue_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getUserValue()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getGiftValue()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getHeartValue()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getPatternRefValue()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getImageValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece) obj; + + if (getType() + != other.getType()) return false; + if (hasFormat() != other.hasFormat()) return false; + if (hasFormat()) { + if (!getFormat() + .equals(other.getFormat())) return false; + } + if (!getStringValue() + .equals(other.getStringValue())) return false; + if (hasUserValue() != other.hasUserValue()) return false; + if (hasUserValue()) { + if (!getUserValue() + .equals(other.getUserValue())) return false; + } + if (hasGiftValue() != other.hasGiftValue()) return false; + if (hasGiftValue()) { + if (!getGiftValue() + .equals(other.getGiftValue())) return false; + } + if (hasHeartValue() != other.hasHeartValue()) return false; + if (hasHeartValue()) { + if (!getHeartValue() + .equals(other.getHeartValue())) return false; + } + if (hasPatternRefValue() != other.hasPatternRefValue()) return false; + if (hasPatternRefValue()) { + if (!getPatternRefValue() + .equals(other.getPatternRefValue())) return false; + } + if (hasImageValue() != other.hasImageValue()) return false; + if (hasImageValue()) { + if (!getImageValue() + .equals(other.getImageValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + com.google.protobuf.Internal.hashBoolean( + getType()); + if (hasFormat()) { + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + } + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + if (hasUserValue()) { + hash = (37 * hash) + USER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getUserValue().hashCode(); + } + if (hasGiftValue()) { + hash = (37 * hash) + GIFT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getGiftValue().hashCode(); + } + if (hasHeartValue()) { + hash = (37 * hash) + HEART_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getHeartValue().hashCode(); + } + if (hasPatternRefValue()) { + hash = (37 * hash) + PATTERN_REF_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getPatternRefValue().hashCode(); + } + if (hasImageValue()) { + hash = (37 * hash) + IMAGE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getImageValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextPiece} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextPiece) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFormatFieldBuilder(); + getUserValueFieldBuilder(); + getGiftValueFieldBuilder(); + getHeartValueFieldBuilder(); + getPatternRefValueFieldBuilder(); + getImageValueFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = false; + format_ = null; + if (formatBuilder_ != null) { + formatBuilder_.dispose(); + formatBuilder_ = null; + } + stringValue_ = ""; + userValue_ = null; + if (userValueBuilder_ != null) { + userValueBuilder_.dispose(); + userValueBuilder_ = null; + } + giftValue_ = null; + if (giftValueBuilder_ != null) { + giftValueBuilder_.dispose(); + giftValueBuilder_ = null; + } + heartValue_ = null; + if (heartValueBuilder_ != null) { + heartValueBuilder_.dispose(); + heartValueBuilder_ = null; + } + patternRefValue_ = null; + if (patternRefValueBuilder_ != null) { + patternRefValueBuilder_.dispose(); + patternRefValueBuilder_ = null; + } + imageValue_ = null; + if (imageValueBuilder_ != null) { + imageValueBuilder_.dispose(); + imageValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.format_ = formatBuilder_ == null + ? format_ + : formatBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stringValue_ = stringValue_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userValue_ = userValueBuilder_ == null + ? userValue_ + : userValueBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.giftValue_ = giftValueBuilder_ == null + ? giftValue_ + : giftValueBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.heartValue_ = heartValueBuilder_ == null + ? heartValue_ + : heartValueBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.patternRefValue_ = patternRefValueBuilder_ == null + ? patternRefValue_ + : patternRefValueBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.imageValue_ = imageValueBuilder_ == null + ? imageValue_ + : imageValueBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance()) return this; + if (other.getType() != false) { + setType(other.getType()); + } + if (other.hasFormat()) { + mergeFormat(other.getFormat()); + } + if (!other.getStringValue().isEmpty()) { + stringValue_ = other.stringValue_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasUserValue()) { + mergeUserValue(other.getUserValue()); + } + if (other.hasGiftValue()) { + mergeGiftValue(other.getGiftValue()); + } + if (other.hasHeartValue()) { + mergeHeartValue(other.getHeartValue()); + } + if (other.hasPatternRefValue()) { + mergePatternRefValue(other.getPatternRefValue()); + } + if (other.hasImageValue()) { + mergeImageValue(other.getImageValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + type_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getFormatFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + stringValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getUserValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getGiftValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getHeartValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getPatternRefValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getImageValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean type_ ; + /** + * bool type = 1; + * @return The type. + */ + @java.lang.Override + public boolean getType() { + return type_; + } + /** + * bool type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(boolean value) { + + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat format_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> formatBuilder_; + /** + * .TextFormat format = 2; + * @return Whether the format field is set. + */ + public boolean hasFormat() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .TextFormat format = 2; + * @return The format. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getFormat() { + if (formatBuilder_ == null) { + return format_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } else { + return formatBuilder_.getMessage(); + } + } + /** + * .TextFormat format = 2; + */ + public Builder setFormat(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (formatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + format_ = value; + } else { + formatBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .TextFormat format = 2; + */ + public Builder setFormat( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder builderForValue) { + if (formatBuilder_ == null) { + format_ = builderForValue.build(); + } else { + formatBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .TextFormat format = 2; + */ + public Builder mergeFormat(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (formatBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + format_ != null && + format_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance()) { + getFormatBuilder().mergeFrom(value); + } else { + format_ = value; + } + } else { + formatBuilder_.mergeFrom(value); + } + if (format_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .TextFormat format = 2; + */ + public Builder clearFormat() { + bitField0_ = (bitField0_ & ~0x00000002); + format_ = null; + if (formatBuilder_ != null) { + formatBuilder_.dispose(); + formatBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextFormat format = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder getFormatBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFormatFieldBuilder().getBuilder(); + } + /** + * .TextFormat format = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getFormatOrBuilder() { + if (formatBuilder_ != null) { + return formatBuilder_.getMessageOrBuilder(); + } else { + return format_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } + } + /** + * .TextFormat format = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> + getFormatFieldBuilder() { + if (formatBuilder_ == null) { + formatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder>( + getFormat(), + getParentForChildren(), + isClean()); + format_ = null; + } + return formatBuilder_; + } + + private java.lang.Object stringValue_ = ""; + /** + * string string_value = 3; + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stringValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string string_value = 3; + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string string_value = 3; + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stringValue_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string string_value = 3; + * @return This builder for chaining. + */ + public Builder clearStringValue() { + stringValue_ = getDefaultInstance().getStringValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string string_value = 3; + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stringValue_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser userValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder> userValueBuilder_; + /** + * .TextPieceUser user_value = 4; + * @return Whether the userValue field is set. + */ + public boolean hasUserValue() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .TextPieceUser user_value = 4; + * @return The userValue. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getUserValue() { + if (userValueBuilder_ == null) { + return userValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } else { + return userValueBuilder_.getMessage(); + } + } + /** + * .TextPieceUser user_value = 4; + */ + public Builder setUserValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser value) { + if (userValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userValue_ = value; + } else { + userValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .TextPieceUser user_value = 4; + */ + public Builder setUserValue( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder builderForValue) { + if (userValueBuilder_ == null) { + userValue_ = builderForValue.build(); + } else { + userValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .TextPieceUser user_value = 4; + */ + public Builder mergeUserValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser value) { + if (userValueBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + userValue_ != null && + userValue_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance()) { + getUserValueBuilder().mergeFrom(value); + } else { + userValue_ = value; + } + } else { + userValueBuilder_.mergeFrom(value); + } + if (userValue_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .TextPieceUser user_value = 4; + */ + public Builder clearUserValue() { + bitField0_ = (bitField0_ & ~0x00000008); + userValue_ = null; + if (userValueBuilder_ != null) { + userValueBuilder_.dispose(); + userValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextPieceUser user_value = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder getUserValueBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUserValueFieldBuilder().getBuilder(); + } + /** + * .TextPieceUser user_value = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder getUserValueOrBuilder() { + if (userValueBuilder_ != null) { + return userValueBuilder_.getMessageOrBuilder(); + } else { + return userValue_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } + } + /** + * .TextPieceUser user_value = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder> + getUserValueFieldBuilder() { + if (userValueBuilder_ == null) { + userValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder>( + getUserValue(), + getParentForChildren(), + isClean()); + userValue_ = null; + } + return userValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift giftValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder> giftValueBuilder_; + /** + * .TextPieceGift gift_value = 5; + * @return Whether the giftValue field is set. + */ + public boolean hasGiftValue() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .TextPieceGift gift_value = 5; + * @return The giftValue. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getGiftValue() { + if (giftValueBuilder_ == null) { + return giftValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } else { + return giftValueBuilder_.getMessage(); + } + } + /** + * .TextPieceGift gift_value = 5; + */ + public Builder setGiftValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift value) { + if (giftValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + giftValue_ = value; + } else { + giftValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .TextPieceGift gift_value = 5; + */ + public Builder setGiftValue( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder builderForValue) { + if (giftValueBuilder_ == null) { + giftValue_ = builderForValue.build(); + } else { + giftValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .TextPieceGift gift_value = 5; + */ + public Builder mergeGiftValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift value) { + if (giftValueBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + giftValue_ != null && + giftValue_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance()) { + getGiftValueBuilder().mergeFrom(value); + } else { + giftValue_ = value; + } + } else { + giftValueBuilder_.mergeFrom(value); + } + if (giftValue_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .TextPieceGift gift_value = 5; + */ + public Builder clearGiftValue() { + bitField0_ = (bitField0_ & ~0x00000010); + giftValue_ = null; + if (giftValueBuilder_ != null) { + giftValueBuilder_.dispose(); + giftValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextPieceGift gift_value = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder getGiftValueBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getGiftValueFieldBuilder().getBuilder(); + } + /** + * .TextPieceGift gift_value = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder getGiftValueOrBuilder() { + if (giftValueBuilder_ != null) { + return giftValueBuilder_.getMessageOrBuilder(); + } else { + return giftValue_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } + } + /** + * .TextPieceGift gift_value = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder> + getGiftValueFieldBuilder() { + if (giftValueBuilder_ == null) { + giftValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder>( + getGiftValue(), + getParentForChildren(), + isClean()); + giftValue_ = null; + } + return giftValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart heartValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder> heartValueBuilder_; + /** + * .TextPieceHeart heart_value = 6; + * @return Whether the heartValue field is set. + */ + public boolean hasHeartValue() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .TextPieceHeart heart_value = 6; + * @return The heartValue. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getHeartValue() { + if (heartValueBuilder_ == null) { + return heartValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } else { + return heartValueBuilder_.getMessage(); + } + } + /** + * .TextPieceHeart heart_value = 6; + */ + public Builder setHeartValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart value) { + if (heartValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heartValue_ = value; + } else { + heartValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .TextPieceHeart heart_value = 6; + */ + public Builder setHeartValue( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder builderForValue) { + if (heartValueBuilder_ == null) { + heartValue_ = builderForValue.build(); + } else { + heartValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .TextPieceHeart heart_value = 6; + */ + public Builder mergeHeartValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart value) { + if (heartValueBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + heartValue_ != null && + heartValue_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance()) { + getHeartValueBuilder().mergeFrom(value); + } else { + heartValue_ = value; + } + } else { + heartValueBuilder_.mergeFrom(value); + } + if (heartValue_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * .TextPieceHeart heart_value = 6; + */ + public Builder clearHeartValue() { + bitField0_ = (bitField0_ & ~0x00000020); + heartValue_ = null; + if (heartValueBuilder_ != null) { + heartValueBuilder_.dispose(); + heartValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextPieceHeart heart_value = 6; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder getHeartValueBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getHeartValueFieldBuilder().getBuilder(); + } + /** + * .TextPieceHeart heart_value = 6; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder getHeartValueOrBuilder() { + if (heartValueBuilder_ != null) { + return heartValueBuilder_.getMessageOrBuilder(); + } else { + return heartValue_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } + } + /** + * .TextPieceHeart heart_value = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder> + getHeartValueFieldBuilder() { + if (heartValueBuilder_ == null) { + heartValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder>( + getHeartValue(), + getParentForChildren(), + isClean()); + heartValue_ = null; + } + return heartValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef patternRefValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder> patternRefValueBuilder_; + /** + * .TextPiecePatternRef pattern_ref_value = 7; + * @return Whether the patternRefValue field is set. + */ + public boolean hasPatternRefValue() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + * @return The patternRefValue. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getPatternRefValue() { + if (patternRefValueBuilder_ == null) { + return patternRefValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } else { + return patternRefValueBuilder_.getMessage(); + } + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + public Builder setPatternRefValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef value) { + if (patternRefValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + patternRefValue_ = value; + } else { + patternRefValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + public Builder setPatternRefValue( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder builderForValue) { + if (patternRefValueBuilder_ == null) { + patternRefValue_ = builderForValue.build(); + } else { + patternRefValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + public Builder mergePatternRefValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef value) { + if (patternRefValueBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + patternRefValue_ != null && + patternRefValue_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance()) { + getPatternRefValueBuilder().mergeFrom(value); + } else { + patternRefValue_ = value; + } + } else { + patternRefValueBuilder_.mergeFrom(value); + } + if (patternRefValue_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + public Builder clearPatternRefValue() { + bitField0_ = (bitField0_ & ~0x00000040); + patternRefValue_ = null; + if (patternRefValueBuilder_ != null) { + patternRefValueBuilder_.dispose(); + patternRefValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder getPatternRefValueBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getPatternRefValueFieldBuilder().getBuilder(); + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder getPatternRefValueOrBuilder() { + if (patternRefValueBuilder_ != null) { + return patternRefValueBuilder_.getMessageOrBuilder(); + } else { + return patternRefValue_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } + } + /** + * .TextPiecePatternRef pattern_ref_value = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder> + getPatternRefValueFieldBuilder() { + if (patternRefValueBuilder_ == null) { + patternRefValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder>( + getPatternRefValue(), + getParentForChildren(), + isClean()); + patternRefValue_ = null; + } + return patternRefValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage imageValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder> imageValueBuilder_; + /** + * .TextPieceImage image_value = 8; + * @return Whether the imageValue field is set. + */ + public boolean hasImageValue() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .TextPieceImage image_value = 8; + * @return The imageValue. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getImageValue() { + if (imageValueBuilder_ == null) { + return imageValue_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } else { + return imageValueBuilder_.getMessage(); + } + } + /** + * .TextPieceImage image_value = 8; + */ + public Builder setImageValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage value) { + if (imageValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageValue_ = value; + } else { + imageValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .TextPieceImage image_value = 8; + */ + public Builder setImageValue( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder builderForValue) { + if (imageValueBuilder_ == null) { + imageValue_ = builderForValue.build(); + } else { + imageValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .TextPieceImage image_value = 8; + */ + public Builder mergeImageValue(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage value) { + if (imageValueBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + imageValue_ != null && + imageValue_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance()) { + getImageValueBuilder().mergeFrom(value); + } else { + imageValue_ = value; + } + } else { + imageValueBuilder_.mergeFrom(value); + } + if (imageValue_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * .TextPieceImage image_value = 8; + */ + public Builder clearImageValue() { + bitField0_ = (bitField0_ & ~0x00000080); + imageValue_ = null; + if (imageValueBuilder_ != null) { + imageValueBuilder_.dispose(); + imageValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .TextPieceImage image_value = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder getImageValueBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getImageValueFieldBuilder().getBuilder(); + } + /** + * .TextPieceImage image_value = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder getImageValueOrBuilder() { + if (imageValueBuilder_ != null) { + return imageValueBuilder_.getMessageOrBuilder(); + } else { + return imageValue_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } + } + /** + * .TextPieceImage image_value = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder> + getImageValueFieldBuilder() { + if (imageValueBuilder_ == null) { + imageValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder>( + getImageValue(), + getParentForChildren(), + isClean()); + imageValue_ = null; + } + return imageValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPiece) + } + + // @@protoc_insertion_point(class_scope:TextPiece) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextPiece parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPiece_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPiece_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\017TextPiece.proto\032\020TextFormat.proto\032\024Tex" + + "tPieceImage.proto\032\031TextPiecePatternRef.p" + + "roto\032\024TextPieceHeart.proto\032\023TextPieceGif" + + "t.proto\032\023TextPieceUser.proto\"\221\002\n\tTextPie" + + "ce\022\014\n\004type\030\001 \001(\010\022\033\n\006format\030\002 \001(\0132\013.TextF" + + "ormat\022\024\n\014string_value\030\003 \001(\t\022\"\n\nuser_valu" + + "e\030\004 \001(\0132\016.TextPieceUser\022\"\n\ngift_value\030\005 " + + "\001(\0132\016.TextPieceGift\022$\n\013heart_value\030\006 \001(\013" + + "2\017.TextPieceHeart\022/\n\021pattern_ref_value\030\007" + + " \001(\0132\024.TextPiecePatternRef\022$\n\013image_valu" + + "e\030\010 \001(\0132\017.TextPieceImageB>\nstring key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * string default_pattern = 2; + * @return The defaultPattern. + */ + java.lang.String getDefaultPattern(); + /** + * string default_pattern = 2; + * @return The bytes for defaultPattern. + */ + com.google.protobuf.ByteString + getDefaultPatternBytes(); + } + /** + * Protobuf type {@code TextPiecePatternRef} + */ + public static final class TextPiecePatternRef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPiecePatternRef) + TextPiecePatternRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPiecePatternRef.newBuilder() to construct. + private TextPiecePatternRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextPiecePatternRef() { + key_ = ""; + defaultPattern_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPiecePatternRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_PATTERN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object defaultPattern_ = ""; + /** + * string default_pattern = 2; + * @return The defaultPattern. + */ + @java.lang.Override + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } + } + /** + * string default_pattern = 2; + * @return The bytes for defaultPattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, defaultPattern_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, defaultPattern_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getDefaultPattern() + .equals(other.getDefaultPattern())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + DEFAULT_PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPattern().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextPiecePatternRef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextPiecePatternRef) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + defaultPattern_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultPattern_ = defaultPattern_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultPattern().isEmpty()) { + defaultPattern_ = other.defaultPattern_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + defaultPattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultPattern_ = ""; + /** + * string default_pattern = 2; + * @return The defaultPattern. + */ + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string default_pattern = 2; + * @return The bytes for defaultPattern. + */ + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string default_pattern = 2; + * @param value The defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string default_pattern = 2; + * @return This builder for chaining. + */ + public Builder clearDefaultPattern() { + defaultPattern_ = getDefaultInstance().getDefaultPattern(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string default_pattern = 2; + * @param value The bytes for defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPiecePatternRef) + } + + // @@protoc_insertion_point(class_scope:TextPiecePatternRef) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextPiecePatternRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPiecePatternRef_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPiecePatternRef_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\031TextPiecePatternRef.proto\";\n\023TextPiece" + + "PatternRef\022\013\n\003key\030\001 \001(\t\022\027\n\017default_patte" + + "rn\030\002 \001(\tB>\n.User user = 1; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .User user = 1; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * .User user = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * bool with_colon = 2; + * @return The withColon. + */ + boolean getWithColon(); + } + /** + * Protobuf type {@code TextPieceUser} + */ + public static final class TextPieceUser extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceUser) + TextPieceUserOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceUser.newBuilder() to construct. + private TextPieceUser(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextPieceUser() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceUser(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder.class); + } + + private int bitField0_; + public static final int USER_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * .User user = 1; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .User user = 1; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * .User user = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int WITH_COLON_FIELD_NUMBER = 2; + private boolean withColon_ = false; + /** + * bool with_colon = 2; + * @return The withColon. + */ + @java.lang.Override + public boolean getWithColon() { + return withColon_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUser()); + } + if (withColon_ != false) { + output.writeBool(2, withColon_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUser()); + } + if (withColon_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, withColon_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser) obj; + + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getWithColon() + != other.getWithColon()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + WITH_COLON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithColon()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 TextPieceUser} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:TextPieceUser) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + withColon_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withColon_ = withColon_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance()) return this; + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getWithColon() != false) { + setWithColon(other.getWithColon()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + withColon_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * .User user = 1; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .User user = 1; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .User user = 1; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .User user = 1; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .User user = 1; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .User user = 1; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000001); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User user = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .User user = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * .User user = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private boolean withColon_ ; + /** + * bool with_colon = 2; + * @return The withColon. + */ + @java.lang.Override + public boolean getWithColon() { + return withColon_; + } + /** + * bool with_colon = 2; + * @param value The withColon to set. + * @return This builder for chaining. + */ + public Builder setWithColon(boolean value) { + + withColon_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool with_colon = 2; + * @return This builder for chaining. + */ + public Builder clearWithColon() { + bitField0_ = (bitField0_ & ~0x00000002); + withColon_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceUser) + } + + // @@protoc_insertion_point(class_scope:TextPieceUser) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextPieceUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceUser_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceUser_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\023TextPieceUser.proto\032\nUser.proto\"8\n\rTex" + + "tPieceUser\022\023\n\004user\030\001 \001(\0132\005.User\022\022\n\nwith_" + + "colon\030\002 \001(\010B>\nuint64 id = 1; + * @return The id. + */ + long getId(); + + /** + * uint64 shortId = 2; + * @return The shortId. + */ + long getShortId(); + + /** + * string nickname = 3; + * @return The nickname. + */ + java.lang.String getNickname(); + /** + * string nickname = 3; + * @return The bytes for nickname. + */ + com.google.protobuf.ByteString + getNicknameBytes(); + + /** + * uint32 gender = 4; + * @return The gender. + */ + int getGender(); + + /** + * string signature = 5; + * @return The signature. + */ + java.lang.String getSignature(); + /** + * string signature = 5; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + + /** + * uint32 level = 6; + * @return The level. + */ + int getLevel(); + + /** + * uint64 birthday = 7; + * @return The birthday. + */ + long getBirthday(); + + /** + * string telephone = 8; + * @return The telephone. + */ + java.lang.String getTelephone(); + /** + * string telephone = 8; + * @return The bytes for telephone. + */ + com.google.protobuf.ByteString + getTelephoneBytes(); + + /** + * .Image avatarThumb = 9; + * @return Whether the avatarThumb field is set. + */ + boolean hasAvatarThumb(); + /** + * .Image avatarThumb = 9; + * @return The avatarThumb. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarThumb(); + /** + * .Image avatarThumb = 9; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarThumbOrBuilder(); + + /** + * .Image avatarMedium = 10; + * @return Whether the avatarMedium field is set. + */ + boolean hasAvatarMedium(); + /** + * .Image avatarMedium = 10; + * @return The avatarMedium. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarMedium(); + /** + * .Image avatarMedium = 10; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarMediumOrBuilder(); + + /** + * .Image avatarLarge = 11; + * @return Whether the avatarLarge field is set. + */ + boolean hasAvatarLarge(); + /** + * .Image avatarLarge = 11; + * @return The avatarLarge. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarLarge(); + /** + * .Image avatarLarge = 11; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarLargeOrBuilder(); + + /** + * bool verified = 12; + * @return The verified. + */ + boolean getVerified(); + + /** + * int32 experience = 13; + * @return The experience. + */ + int getExperience(); + + /** + * string city = 14; + * @return The city. + */ + java.lang.String getCity(); + /** + * string city = 14; + * @return The bytes for city. + */ + com.google.protobuf.ByteString + getCityBytes(); + + /** + * int32 status = 15; + * @return The status. + */ + int getStatus(); + + /** + * int64 createTime = 16; + * @return The createTime. + */ + long getCreateTime(); + + /** + * int64 modifyTime = 17; + * @return The modifyTime. + */ + long getModifyTime(); + + /** + * int32 secret = 18; + * @return The secret. + */ + int getSecret(); + + /** + * string shareQrcodeUri = 19; + * @return The shareQrcodeUri. + */ + java.lang.String getShareQrcodeUri(); + /** + * string shareQrcodeUri = 19; + * @return The bytes for shareQrcodeUri. + */ + com.google.protobuf.ByteString + getShareQrcodeUriBytes(); + + /** + * int32 incomeSharePercent = 20; + * @return The incomeSharePercent. + */ + int getIncomeSharePercent(); + + /** + * .Image badgeImageListList = 21; + * @return Whether the badgeImageListList field is set. + */ + boolean hasBadgeImageListList(); + /** + * .Image badgeImageListList = 21; + * @return The badgeImageListList. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListList(); + /** + * .Image badgeImageListList = 21; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListListOrBuilder(); + + /** + * .User.FollowInfo followInfo = 22; + * @return Whether the followInfo field is set. + */ + boolean hasFollowInfo(); + /** + * .User.FollowInfo followInfo = 22; + * @return The followInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getFollowInfo(); + /** + * .User.FollowInfo followInfo = 22; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder getFollowInfoOrBuilder(); + + /** + * .User.PayGrade payGrade = 23; + * @return Whether the payGrade field is set. + */ + boolean hasPayGrade(); + /** + * .User.PayGrade payGrade = 23; + * @return The payGrade. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade getPayGrade(); + /** + * .User.PayGrade payGrade = 23; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder getPayGradeOrBuilder(); + + /** + * .User.FansClub fansClub = 24; + * @return Whether the fansClub field is set. + */ + boolean hasFansClub(); + /** + * .User.FansClub fansClub = 24; + * @return The fansClub. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub getFansClub(); + /** + * .User.FansClub fansClub = 24; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder getFansClubOrBuilder(); + + /** + * .User.Border border = 25; + * @return Whether the border field is set. + */ + boolean hasBorder(); + /** + * .User.Border border = 25; + * @return The border. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border getBorder(); + /** + * .User.Border border = 25; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder getBorderOrBuilder(); + + /** + * string specialId = 26; + * @return The specialId. + */ + java.lang.String getSpecialId(); + /** + * string specialId = 26; + * @return The bytes for specialId. + */ + com.google.protobuf.ByteString + getSpecialIdBytes(); + + /** + * .Image avatarBorder = 27; + * @return Whether the avatarBorder field is set. + */ + boolean hasAvatarBorder(); + /** + * .Image avatarBorder = 27; + * @return The avatarBorder. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarBorder(); + /** + * .Image avatarBorder = 27; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarBorderOrBuilder(); + + /** + * .Image medal = 28; + * @return Whether the medal field is set. + */ + boolean hasMedal(); + /** + * .Image medal = 28; + * @return The medal. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getMedal(); + /** + * .Image medal = 28; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMedalOrBuilder(); + + /** + * repeated .Image realTimeIconsList = 29; + */ + java.util.List + getRealTimeIconsListList(); + /** + * repeated .Image realTimeIconsList = 29; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getRealTimeIconsList(int index); + /** + * repeated .Image realTimeIconsList = 29; + */ + int getRealTimeIconsListCount(); + /** + * repeated .Image realTimeIconsList = 29; + */ + java.util.List + getRealTimeIconsListOrBuilderList(); + /** + * repeated .Image realTimeIconsList = 29; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getRealTimeIconsListOrBuilder( + int index); + + /** + * repeated .Image newRealTimeIconsList = 30; + */ + java.util.List + getNewRealTimeIconsListList(); + /** + * repeated .Image newRealTimeIconsList = 30; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewRealTimeIconsList(int index); + /** + * repeated .Image newRealTimeIconsList = 30; + */ + int getNewRealTimeIconsListCount(); + /** + * repeated .Image newRealTimeIconsList = 30; + */ + java.util.List + getNewRealTimeIconsListOrBuilderList(); + /** + * repeated .Image newRealTimeIconsList = 30; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewRealTimeIconsListOrBuilder( + int index); + + /** + * int64 topVipNo = 31; + * @return The topVipNo. + */ + long getTopVipNo(); + + /** + * .User.UserAttr userAttr = 32; + * @return Whether the userAttr field is set. + */ + boolean hasUserAttr(); + /** + * .User.UserAttr userAttr = 32; + * @return The userAttr. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr getUserAttr(); + /** + * .User.UserAttr userAttr = 32; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder getUserAttrOrBuilder(); + + /** + * .User.OwnRoom ownRoom = 33; + * @return Whether the ownRoom field is set. + */ + boolean hasOwnRoom(); + /** + * .User.OwnRoom ownRoom = 33; + * @return The ownRoom. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getOwnRoom(); + /** + * .User.OwnRoom ownRoom = 33; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder getOwnRoomOrBuilder(); + + /** + * int64 payScore = 34; + * @return The payScore. + */ + long getPayScore(); + + /** + * int64 ticketCount = 35; + * @return The ticketCount. + */ + long getTicketCount(); + + /** + * .User.AnchorInfo anchorInfo = 36; + * @return Whether the anchorInfo field is set. + */ + boolean hasAnchorInfo(); + /** + * .User.AnchorInfo anchorInfo = 36; + * @return The anchorInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getAnchorInfo(); + /** + * .User.AnchorInfo anchorInfo = 36; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder getAnchorInfoOrBuilder(); + + /** + * int32 linkMicStats = 37; + * @return The linkMicStats. + */ + int getLinkMicStats(); + + /** + * string displayId = 38; + * @return The displayId. + */ + java.lang.String getDisplayId(); + /** + * string displayId = 38; + * @return The bytes for displayId. + */ + com.google.protobuf.ByteString + getDisplayIdBytes(); + + /** + * bool withCommercePermission = 39; + * @return The withCommercePermission. + */ + boolean getWithCommercePermission(); + + /** + * bool withFusionShopEntry = 40; + * @return The withFusionShopEntry. + */ + boolean getWithFusionShopEntry(); + + /** + * int64 totalRechargeDiamondCount = 41; + * @return The totalRechargeDiamondCount. + */ + long getTotalRechargeDiamondCount(); + + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + * @return Whether the webcastAnchorLevel field is set. + */ + boolean hasWebcastAnchorLevel(); + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + * @return The webcastAnchorLevel. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getWebcastAnchorLevel(); + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getWebcastAnchorLevelOrBuilder(); + + /** + * string verifiedContent = 43; + * @return The verifiedContent. + */ + java.lang.String getVerifiedContent(); + /** + * string verifiedContent = 43; + * @return The bytes for verifiedContent. + */ + com.google.protobuf.ByteString + getVerifiedContentBytes(); + + /** + * .User.AuthorStats authorStats = 44; + * @return Whether the authorStats field is set. + */ + boolean hasAuthorStats(); + /** + * .User.AuthorStats authorStats = 44; + * @return The authorStats. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getAuthorStats(); + /** + * .User.AuthorStats authorStats = 44; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder getAuthorStatsOrBuilder(); + + /** + * repeated .User topFansList = 45; + */ + java.util.List + getTopFansListList(); + /** + * repeated .User topFansList = 45; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getTopFansList(int index); + /** + * repeated .User topFansList = 45; + */ + int getTopFansListCount(); + /** + * repeated .User topFansList = 45; + */ + java.util.List + getTopFansListOrBuilderList(); + /** + * repeated .User topFansList = 45; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getTopFansListOrBuilder( + int index); + + /** + * string secUid = 46; + * @return The secUid. + */ + java.lang.String getSecUid(); + /** + * string secUid = 46; + * @return The bytes for secUid. + */ + com.google.protobuf.ByteString + getSecUidBytes(); + + /** + * int32 userRole = 47; + * @return The userRole. + */ + int getUserRole(); + + /** + * .User.XiguaParams xiguaInfo = 48; + * @return Whether the xiguaInfo field is set. + */ + boolean hasXiguaInfo(); + /** + * .User.XiguaParams xiguaInfo = 48; + * @return The xiguaInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getXiguaInfo(); + /** + * .User.XiguaParams xiguaInfo = 48; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder getXiguaInfoOrBuilder(); + + /** + * .User.ActivityInfo activityReward = 49; + * @return Whether the activityReward field is set. + */ + boolean hasActivityReward(); + /** + * .User.ActivityInfo activityReward = 49; + * @return The activityReward. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getActivityReward(); + /** + * .User.ActivityInfo activityReward = 49; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder getActivityRewardOrBuilder(); + + /** + * .User.NobleLevelInfo nobleInfo = 50; + * @return Whether the nobleInfo field is set. + */ + boolean hasNobleInfo(); + /** + * .User.NobleLevelInfo nobleInfo = 50; + * @return The nobleInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getNobleInfo(); + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder getNobleInfoOrBuilder(); + + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + * @return Whether the brotherhoodInfo field is set. + */ + boolean hasBrotherhoodInfo(); + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + * @return The brotherhoodInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getBrotherhoodInfo(); + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder getBrotherhoodInfoOrBuilder(); + + /** + * .Image personalCard = 52; + * @return Whether the personalCard field is set. + */ + boolean hasPersonalCard(); + /** + * .Image personalCard = 52; + * @return The personalCard. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getPersonalCard(); + /** + * .Image personalCard = 52; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getPersonalCardOrBuilder(); + + /** + * .User.AuthenticationInfo authenticationInfo = 53; + * @return Whether the authenticationInfo field is set. + */ + boolean hasAuthenticationInfo(); + /** + * .User.AuthenticationInfo authenticationInfo = 53; + * @return The authenticationInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getAuthenticationInfo(); + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder(); + + /** + * int32 authorizationInfo = 54; + * @return The authorizationInfo. + */ + int getAuthorizationInfo(); + + /** + * int32 adversaryAuthorizationInfo = 55; + * @return The adversaryAuthorizationInfo. + */ + int getAdversaryAuthorizationInfo(); + + /** + * .User.PoiInfo poiInfo = 56; + * @return Whether the poiInfo field is set. + */ + boolean hasPoiInfo(); + /** + * .User.PoiInfo poiInfo = 56; + * @return The poiInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getPoiInfo(); + /** + * .User.PoiInfo poiInfo = 56; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder getPoiInfoOrBuilder(); + + /** + * .Image mediaBadgeImageListList = 57; + * @return Whether the mediaBadgeImageListList field is set. + */ + boolean hasMediaBadgeImageListList(); + /** + * .Image mediaBadgeImageListList = 57; + * @return The mediaBadgeImageListList. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getMediaBadgeImageListList(); + /** + * .Image mediaBadgeImageListList = 57; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMediaBadgeImageListListOrBuilder(); + + /** + * int32 adversaryUserStatus = 58; + * @return The adversaryUserStatus. + */ + int getAdversaryUserStatus(); + + /** + * .User.UserVIPInfo userVipInfo = 59; + * @return Whether the userVipInfo field is set. + */ + boolean hasUserVipInfo(); + /** + * .User.UserVIPInfo userVipInfo = 59; + * @return The userVipInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getUserVipInfo(); + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder getUserVipInfoOrBuilder(); + + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @return A list containing the commerceWebcastConfigIdsList. + */ + java.util.List getCommerceWebcastConfigIdsListList(); + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @return The count of commerceWebcastConfigIdsList. + */ + int getCommerceWebcastConfigIdsListCount(); + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @param index The index of the element to return. + * @return The commerceWebcastConfigIdsList at the given index. + */ + long getCommerceWebcastConfigIdsList(int index); + + /** + * .Image badgeImageListV2List = 61; + * @return Whether the badgeImageListV2List field is set. + */ + boolean hasBadgeImageListV2List(); + /** + * .Image badgeImageListV2List = 61; + * @return The badgeImageListV2List. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListV2List(); + /** + * .Image badgeImageListV2List = 61; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListV2ListOrBuilder(); + + /** + *
+     * IndustryCertification  industryCertification = 62;
+     * 
+ * + * string locationCity = 63; + * @return The locationCity. + */ + java.lang.String getLocationCity(); + /** + *
+     * IndustryCertification  industryCertification = 62;
+     * 
+ * + * string locationCity = 63; + * @return The bytes for locationCity. + */ + com.google.protobuf.ByteString + getLocationCityBytes(); + + /** + * .User.FansGroupInfo fansGroupInfo = 64; + * @return Whether the fansGroupInfo field is set. + */ + boolean hasFansGroupInfo(); + /** + * .User.FansGroupInfo fansGroupInfo = 64; + * @return The fansGroupInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getFansGroupInfo(); + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder getFansGroupInfoOrBuilder(); + + /** + * string remarkName = 65; + * @return The remarkName. + */ + java.lang.String getRemarkName(); + /** + * string remarkName = 65; + * @return The bytes for remarkName. + */ + com.google.protobuf.ByteString + getRemarkNameBytes(); + + /** + * int32 mysteryMan = 66; + * @return The mysteryMan. + */ + int getMysteryMan(); + + /** + * string webRid = 67; + * @return The webRid. + */ + java.lang.String getWebRid(); + /** + * string webRid = 67; + * @return The bytes for webRid. + */ + com.google.protobuf.ByteString + getWebRidBytes(); + + /** + * string desensitizedNickname = 68; + * @return The desensitizedNickname. + */ + java.lang.String getDesensitizedNickname(); + /** + * string desensitizedNickname = 68; + * @return The bytes for desensitizedNickname. + */ + com.google.protobuf.ByteString + getDesensitizedNicknameBytes(); + + /** + * .User.JAccreditInfo jAccreditInfo = 69; + * @return Whether the jAccreditInfo field is set. + */ + boolean hasJAccreditInfo(); + /** + * .User.JAccreditInfo jAccreditInfo = 69; + * @return The jAccreditInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getJAccreditInfo(); + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder getJAccreditInfoOrBuilder(); + + /** + * .User.Subscribe subscribe = 70; + * @return Whether the subscribe field is set. + */ + boolean hasSubscribe(); + /** + * .User.Subscribe subscribe = 70; + * @return The subscribe. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe getSubscribe(); + /** + * .User.Subscribe subscribe = 70; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder getSubscribeOrBuilder(); + + /** + * bool isAnonymous = 71; + * @return The isAnonymous. + */ + boolean getIsAnonymous(); + + /** + * int32 consumeDiamondLevel = 72; + * @return The consumeDiamondLevel. + */ + int getConsumeDiamondLevel(); + + /** + * string webcastUid = 73; + * @return The webcastUid. + */ + java.lang.String getWebcastUid(); + /** + * string webcastUid = 73; + * @return The bytes for webcastUid. + */ + com.google.protobuf.ByteString + getWebcastUidBytes(); + + /** + * .User.ProfileStyleParams profileStyleParams = 74; + * @return Whether the profileStyleParams field is set. + */ + boolean hasProfileStyleParams(); + /** + * .User.ProfileStyleParams profileStyleParams = 74; + * @return The profileStyleParams. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getProfileStyleParams(); + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder getProfileStyleParamsOrBuilder(); + + /** + * .User.UserDressInfo userDressInfo = 75; + * @return Whether the userDressInfo field is set. + */ + boolean hasUserDressInfo(); + /** + * .User.UserDressInfo userDressInfo = 75; + * @return The userDressInfo. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getUserDressInfo(); + /** + * .User.UserDressInfo userDressInfo = 75; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder getUserDressInfoOrBuilder(); + + /** + * bool allowBeLocated = 1001; + * @return The allowBeLocated. + */ + boolean getAllowBeLocated(); + + /** + * bool allowFindByContacts = 1002; + * @return The allowFindByContacts. + */ + boolean getAllowFindByContacts(); + + /** + * bool allowOthersDownloadVideo = 1003; + * @return The allowOthersDownloadVideo. + */ + boolean getAllowOthersDownloadVideo(); + + /** + * bool allowOthersDownloadWhenSharingVideo = 1004; + * @return The allowOthersDownloadWhenSharingVideo. + */ + boolean getAllowOthersDownloadWhenSharingVideo(); + + /** + * bool allowShareShowProfile = 1005; + * @return The allowShareShowProfile. + */ + boolean getAllowShareShowProfile(); + + /** + * bool allowShowInGossip = 1006; + * @return The allowShowInGossip. + */ + boolean getAllowShowInGossip(); + + /** + * bool allowShowMyAction = 1007; + * @return The allowShowMyAction. + */ + boolean getAllowShowMyAction(); + + /** + * bool allowStrangeComment = 1008; + * @return The allowStrangeComment. + */ + boolean getAllowStrangeComment(); + + /** + * bool allowUnfollowerComment = 1009; + * @return The allowUnfollowerComment. + */ + boolean getAllowUnfollowerComment(); + + /** + * bool allowUseLinkmic = 1010; + * @return The allowUseLinkmic. + */ + boolean getAllowUseLinkmic(); + + /** + * .User.AnchorLevel anchorLevel = 1011; + * @return Whether the anchorLevel field is set. + */ + boolean hasAnchorLevel(); + /** + * .User.AnchorLevel anchorLevel = 1011; + * @return The anchorLevel. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getAnchorLevel(); + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getAnchorLevelOrBuilder(); + + /** + * .Image avatarJpg = 1012; + * @return Whether the avatarJpg field is set. + */ + boolean hasAvatarJpg(); + /** + * .Image avatarJpg = 1012; + * @return The avatarJpg. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarJpg(); + /** + * .Image avatarJpg = 1012; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarJpgOrBuilder(); + + /** + * string bgImgUrl = 1013; + * @return The bgImgUrl. + */ + java.lang.String getBgImgUrl(); + /** + * string bgImgUrl = 1013; + * @return The bytes for bgImgUrl. + */ + com.google.protobuf.ByteString + getBgImgUrlBytes(); + + /** + * string birthdayDescription = 1014; + * @return The birthdayDescription. + */ + java.lang.String getBirthdayDescription(); + /** + * string birthdayDescription = 1014; + * @return The bytes for birthdayDescription. + */ + com.google.protobuf.ByteString + getBirthdayDescriptionBytes(); + + /** + * bool birthdayValid = 1015; + * @return The birthdayValid. + */ + boolean getBirthdayValid(); + + /** + * int32 blockStatus = 1016; + * @return The blockStatus. + */ + int getBlockStatus(); + + /** + * int32 commentRestrict = 1017; + * @return The commentRestrict. + */ + int getCommentRestrict(); + + /** + * string constellation = 1018; + * @return The constellation. + */ + java.lang.String getConstellation(); + /** + * string constellation = 1018; + * @return The bytes for constellation. + */ + com.google.protobuf.ByteString + getConstellationBytes(); + + /** + * int32 disableIchat = 1019; + * @return The disableIchat. + */ + int getDisableIchat(); + + /** + * int64 enableIchatImg = 1020; + * @return The enableIchatImg. + */ + long getEnableIchatImg(); + + /** + * int32 exp = 1021; + * @return The exp. + */ + int getExp(); + + /** + * int64 fanTicketCount = 1022; + * @return The fanTicketCount. + */ + long getFanTicketCount(); + + /** + * bool foldStrangerChat = 1023; + * @return The foldStrangerChat. + */ + boolean getFoldStrangerChat(); + + /** + * int64 followStatus = 1024; + * @return The followStatus. + */ + long getFollowStatus(); + + /** + * bool hotsoonVerified = 1025; + * @return The hotsoonVerified. + */ + boolean getHotsoonVerified(); + + /** + * string hotsoonVerifiedReason = 1026; + * @return The hotsoonVerifiedReason. + */ + java.lang.String getHotsoonVerifiedReason(); + /** + * string hotsoonVerifiedReason = 1026; + * @return The bytes for hotsoonVerifiedReason. + */ + com.google.protobuf.ByteString + getHotsoonVerifiedReasonBytes(); + + /** + * int32 ichatRestrictType = 1027; + * @return The ichatRestrictType. + */ + int getIchatRestrictType(); + + /** + * string idStr = 1028; + * @return The idStr. + */ + java.lang.String getIdStr(); + /** + * string idStr = 1028; + * @return The bytes for idStr. + */ + com.google.protobuf.ByteString + getIdStrBytes(); + + /** + * bool isFollower = 1029; + * @return The isFollower. + */ + boolean getIsFollower(); + + /** + * bool isFollowing = 1030; + * @return The isFollowing. + */ + boolean getIsFollowing(); + + /** + * bool needProfileGuide = 1031; + * @return The needProfileGuide. + */ + boolean getNeedProfileGuide(); + + /** + * int64 payScores = 1032; + * @return The payScores. + */ + long getPayScores(); + + /** + * bool pushCommentStatus = 1033; + * @return The pushCommentStatus. + */ + boolean getPushCommentStatus(); + + /** + * bool pushDigg = 1034; + * @return The pushDigg. + */ + boolean getPushDigg(); + + /** + * bool pushFollow = 1035; + * @return The pushFollow. + */ + boolean getPushFollow(); + + /** + * bool pushFriendAction = 1036; + * @return The pushFriendAction. + */ + boolean getPushFriendAction(); + + /** + * bool pushIchat = 1037; + * @return The pushIchat. + */ + boolean getPushIchat(); + + /** + * bool pushStatus = 1038; + * @return The pushStatus. + */ + boolean getPushStatus(); + + /** + * bool pushVideoPost = 1039; + * @return The pushVideoPost. + */ + boolean getPushVideoPost(); + + /** + * bool pushVideoRecommend = 1040; + * @return The pushVideoRecommend. + */ + boolean getPushVideoRecommend(); + + /** + * .User.UserStats stats = 1041; + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + * .User.UserStats stats = 1041; + * @return The stats. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats getStats(); + /** + * .User.UserStats stats = 1041; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder getStatsOrBuilder(); + + /** + * bool verifiedMobile = 1042; + * @return The verifiedMobile. + */ + boolean getVerifiedMobile(); + + /** + * string verifiedReason = 1043; + * @return The verifiedReason. + */ + java.lang.String getVerifiedReason(); + /** + * string verifiedReason = 1043; + * @return The bytes for verifiedReason. + */ + com.google.protobuf.ByteString + getVerifiedReasonBytes(); + + /** + * bool withCarManagementPermission = 1044; + * @return The withCarManagementPermission. + */ + boolean getWithCarManagementPermission(); + + /** + * int32 ageRange = 1045; + * @return The ageRange. + */ + int getAgeRange(); + + /** + * int64 watchDurationMonth = 1046; + * @return The watchDurationMonth. + */ + long getWatchDurationMonth(); + } + /** + * Protobuf type {@code User} + */ + public static final class User extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User) + UserOrBuilder { + private static final long serialVersionUID = 0L; + // Use User.newBuilder() to construct. + private User(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private User() { + nickname_ = ""; + signature_ = ""; + telephone_ = ""; + city_ = ""; + shareQrcodeUri_ = ""; + specialId_ = ""; + realTimeIconsList_ = java.util.Collections.emptyList(); + newRealTimeIconsList_ = java.util.Collections.emptyList(); + displayId_ = ""; + verifiedContent_ = ""; + topFansList_ = java.util.Collections.emptyList(); + secUid_ = ""; + commerceWebcastConfigIdsList_ = emptyLongList(); + locationCity_ = ""; + remarkName_ = ""; + webRid_ = ""; + desensitizedNickname_ = ""; + webcastUid_ = ""; + bgImgUrl_ = ""; + birthdayDescription_ = ""; + constellation_ = ""; + hotsoonVerifiedReason_ = ""; + idStr_ = ""; + verifiedReason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new User(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder.class); + } + + public interface ActivityInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.ActivityInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.ActivityInfo} + */ + public static final class ActivityInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.ActivityInfo) + ActivityInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActivityInfo.newBuilder() to construct. + private ActivityInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ActivityInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ActivityInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.ActivityInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.ActivityInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.ActivityInfo) + } + + // @@protoc_insertion_point(class_scope:User.ActivityInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActivityInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AnchorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AnchorInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AnchorInfo} + */ + public static final class AnchorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AnchorInfo) + AnchorInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnchorInfo.newBuilder() to construct. + private AnchorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnchorInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnchorInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.AnchorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.AnchorInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AnchorInfo) + } + + // @@protoc_insertion_point(class_scope:User.AnchorInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnchorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AnchorLevelOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AnchorLevel) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AnchorLevel} + */ + public static final class AnchorLevel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AnchorLevel) + AnchorLevelOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnchorLevel.newBuilder() to construct. + private AnchorLevel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnchorLevel() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnchorLevel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.AnchorLevel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.AnchorLevel) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AnchorLevel) + } + + // @@protoc_insertion_point(class_scope:User.AnchorLevel) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnchorLevel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthenticationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AuthenticationInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AuthenticationInfo} + */ + public static final class AuthenticationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AuthenticationInfo) + AuthenticationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthenticationInfo.newBuilder() to construct. + private AuthenticationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuthenticationInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthenticationInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.AuthenticationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.AuthenticationInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AuthenticationInfo) + } + + // @@protoc_insertion_point(class_scope:User.AuthenticationInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthorStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AuthorStats) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AuthorStats} + */ + public static final class AuthorStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AuthorStats) + AuthorStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorStats.newBuilder() to construct. + private AuthorStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuthorStats() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthorStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.AuthorStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.AuthorStats) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AuthorStats) + } + + // @@protoc_insertion_point(class_scope:User.AuthorStats) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BorderOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.Border) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.Border} + */ + public static final class Border extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.Border) + BorderOrBuilder { + private static final long serialVersionUID = 0L; + // Use Border.newBuilder() to construct. + private Border(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Border() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Border(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.Border} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.Border) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.Border) + } + + // @@protoc_insertion_point(class_scope:User.Border) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Border parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BrotherhoodInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.BrotherhoodInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.BrotherhoodInfo} + */ + public static final class BrotherhoodInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.BrotherhoodInfo) + BrotherhoodInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use BrotherhoodInfo.newBuilder() to construct. + private BrotherhoodInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BrotherhoodInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BrotherhoodInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.BrotherhoodInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.BrotherhoodInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.BrotherhoodInfo) + } + + // @@protoc_insertion_point(class_scope:User.BrotherhoodInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BrotherhoodInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FansClubOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansClub) + com.google.protobuf.MessageOrBuilder { + + /** + * .User.FansClub.FansClubData data = 1; + * @return Whether the data field is set. + */ + boolean hasData(); + /** + * .User.FansClub.FansClubData data = 1; + * @return The data. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getData(); + /** + * .User.FansClub.FansClubData data = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder getDataOrBuilder(); + + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + int getPreferDataCount(); + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + boolean containsPreferData( + int key); + /** + * Use {@link #getPreferDataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getPreferData(); + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + java.util.Map + getPreferDataMap(); + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData defaultValue); + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrThrow( + int key); + } + /** + * Protobuf type {@code User.FansClub} + */ + public static final class FansClub extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansClub) + FansClubOrBuilder { + private static final long serialVersionUID = 0L; + // Use FansClub.newBuilder() to construct. + private FansClub(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FansClub() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FansClub(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetPreferData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder.class); + } + + public interface FansClubDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansClub.FansClubData) + com.google.protobuf.MessageOrBuilder { + + /** + * string clubName = 1; + * @return The clubName. + */ + java.lang.String getClubName(); + /** + * string clubName = 1; + * @return The bytes for clubName. + */ + com.google.protobuf.ByteString + getClubNameBytes(); + + /** + * int32 level = 2; + * @return The level. + */ + int getLevel(); + + /** + * int32 userFansClubStatus = 3; + * @return The userFansClubStatus. + */ + int getUserFansClubStatus(); + + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + * @return Whether the badge field is set. + */ + boolean hasBadge(); + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + * @return The badge. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getBadge(); + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder getBadgeOrBuilder(); + + /** + * repeated int64 availableGiftIds = 5; + * @return A list containing the availableGiftIds. + */ + java.util.List getAvailableGiftIdsList(); + /** + * repeated int64 availableGiftIds = 5; + * @return The count of availableGiftIds. + */ + int getAvailableGiftIdsCount(); + /** + * repeated int64 availableGiftIds = 5; + * @param index The index of the element to return. + * @return The availableGiftIds at the given index. + */ + long getAvailableGiftIds(int index); + + /** + * int64 anchorId = 6; + * @return The anchorId. + */ + long getAnchorId(); + } + /** + * Protobuf type {@code User.FansClub.FansClubData} + */ + public static final class FansClubData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansClub.FansClubData) + FansClubDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use FansClubData.newBuilder() to construct. + private FansClubData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FansClubData() { + clubName_ = ""; + availableGiftIds_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FansClubData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder.class); + } + + public interface UserBadgeOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansClub.FansClubData.UserBadge) + com.google.protobuf.MessageOrBuilder { + + /** + * map<int32, .Image> icons = 1; + */ + int getIconsCount(); + /** + * map<int32, .Image> icons = 1; + */ + boolean containsIcons( + int key); + /** + * Use {@link #getIconsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getIcons(); + /** + * map<int32, .Image> icons = 1; + */ + java.util.Map + getIconsMap(); + /** + * map<int32, .Image> icons = 1; + */ + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image defaultValue); + /** + * map<int32, .Image> icons = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrThrow( + int key); + + /** + * string title = 2; + * @return The title. + */ + java.lang.String getTitle(); + /** + * string title = 2; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + } + /** + * Protobuf type {@code User.FansClub.FansClubData.UserBadge} + */ + public static final class UserBadge extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansClub.FansClubData.UserBadge) + UserBadgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserBadge.newBuilder() to construct. + private UserBadge(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserBadge() { + title_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserBadge(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetIcons(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder.class); + } + + public static final int ICONS_FIELD_NUMBER = 1; + private static final class IconsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.Integer, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image> icons_; + private com.google.protobuf.MapField + internalGetIcons() { + if (icons_ == null) { + return com.google.protobuf.MapField.emptyMapField( + IconsDefaultEntryHolder.defaultEntry); + } + return icons_; + } + public int getIconsCount() { + return internalGetIcons().getMap().size(); + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public boolean containsIcons( + int key) { + + return internalGetIcons().getMap().containsKey(key); + } + /** + * Use {@link #getIconsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getIcons() { + return getIconsMap(); + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public java.util.Map getIconsMap() { + return internalGetIcons().getMap(); + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image defaultValue) { + + java.util.Map map = + internalGetIcons().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrThrow( + int key) { + + java.util.Map map = + internalGetIcons().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TITLE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * string title = 2; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * string title = 2; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetIcons(), + IconsDefaultEntryHolder.defaultEntry, + 1); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetIcons().getMap().entrySet()) { + com.google.protobuf.MapEntry + icons__ = IconsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, icons__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge) obj; + + if (!internalGetIcons().equals( + other.internalGetIcons())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetIcons().getMap().isEmpty()) { + hash = (37 * hash) + ICONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetIcons().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.FansClub.FansClubData.UserBadge} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.FansClub.FansClubData.UserBadge) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetIcons(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableIcons(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableIcons().clear(); + title_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.icons_ = internalGetIcons().build(IconsDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance()) return this; + internalGetMutableIcons().mergeFrom( + other.internalGetIcons()); + bitField0_ |= 0x00000001; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + icons__ = input.readMessage( + IconsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableIcons().ensureBuilderMap().put( + icons__.getKey(), icons__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class IconsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image build(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder val) { + if (val instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image) { return (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image) val; } + return ((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return IconsDefaultEntryHolder.defaultEntry; + } + }; + private static final IconsConverter iconsConverter = new IconsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.Integer, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder> icons_; + private com.google.protobuf.MapFieldBuilder + internalGetIcons() { + if (icons_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(iconsConverter); + } + return icons_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableIcons() { + if (icons_ == null) { + icons_ = new com.google.protobuf.MapFieldBuilder<>(iconsConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return icons_; + } + public int getIconsCount() { + return internalGetIcons().ensureBuilderMap().size(); + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public boolean containsIcons( + int key) { + + return internalGetIcons().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getIconsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getIcons() { + return getIconsMap(); + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public java.util.Map getIconsMap() { + return internalGetIcons().getImmutableMap(); + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image defaultValue) { + + java.util.Map map = internalGetMutableIcons().ensureBuilderMap(); + return map.containsKey(key) ? iconsConverter.build(map.get(key)) : defaultValue; + } + /** + * map<int32, .Image> icons = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrThrow( + int key) { + + java.util.Map map = internalGetMutableIcons().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return iconsConverter.build(map.get(key)); + } + public Builder clearIcons() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableIcons().clear(); + return this; + } + /** + * map<int32, .Image> icons = 1; + */ + public Builder removeIcons( + int key) { + + internalGetMutableIcons().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableIcons() { + bitField0_ |= 0x00000001; + return internalGetMutableIcons().ensureMessageMap(); + } + /** + * map<int32, .Image> icons = 1; + */ + public Builder putIcons( + int key, + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableIcons().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * map<int32, .Image> icons = 1; + */ + public Builder putAllIcons( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableIcons().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + * map<int32, .Image> icons = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder putIconsBuilderIfAbsent( + int key) { + java.util.Map builderMap = internalGetMutableIcons().ensureBuilderMap(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image) { + entry = ((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image) entry).toBuilder(); + builderMap.put(key, entry); + } + return (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder) entry; + } + + private java.lang.Object title_ = ""; + /** + * string title = 2; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string title = 2; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string title = 2; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string title = 2; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string title = 2; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansClub.FansClubData.UserBadge) + } + + // @@protoc_insertion_point(class_scope:User.FansClub.FansClubData.UserBadge) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserBadge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int CLUBNAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object clubName_ = ""; + /** + * string clubName = 1; + * @return The clubName. + */ + @java.lang.Override + public java.lang.String getClubName() { + java.lang.Object ref = clubName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clubName_ = s; + return s; + } + } + /** + * string clubName = 1; + * @return The bytes for clubName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClubNameBytes() { + java.lang.Object ref = clubName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clubName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 2; + private int level_ = 0; + /** + * int32 level = 2; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + + public static final int USERFANSCLUBSTATUS_FIELD_NUMBER = 3; + private int userFansClubStatus_ = 0; + /** + * int32 userFansClubStatus = 3; + * @return The userFansClubStatus. + */ + @java.lang.Override + public int getUserFansClubStatus() { + return userFansClubStatus_; + } + + public static final int BADGE_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge badge_; + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + * @return Whether the badge field is set. + */ + @java.lang.Override + public boolean hasBadge() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + * @return The badge. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getBadge() { + return badge_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder getBadgeOrBuilder() { + return badge_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } + + public static final int AVAILABLEGIFTIDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList availableGiftIds_ = + emptyLongList(); + /** + * repeated int64 availableGiftIds = 5; + * @return A list containing the availableGiftIds. + */ + @java.lang.Override + public java.util.List + getAvailableGiftIdsList() { + return availableGiftIds_; + } + /** + * repeated int64 availableGiftIds = 5; + * @return The count of availableGiftIds. + */ + public int getAvailableGiftIdsCount() { + return availableGiftIds_.size(); + } + /** + * repeated int64 availableGiftIds = 5; + * @param index The index of the element to return. + * @return The availableGiftIds at the given index. + */ + public long getAvailableGiftIds(int index) { + return availableGiftIds_.getLong(index); + } + private int availableGiftIdsMemoizedSerializedSize = -1; + + public static final int ANCHORID_FIELD_NUMBER = 6; + private long anchorId_ = 0L; + /** + * int64 anchorId = 6; + * @return The anchorId. + */ + @java.lang.Override + public long getAnchorId() { + return anchorId_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clubName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clubName_); + } + if (level_ != 0) { + output.writeInt32(2, level_); + } + if (userFansClubStatus_ != 0) { + output.writeInt32(3, userFansClubStatus_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getBadge()); + } + if (getAvailableGiftIdsList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(availableGiftIdsMemoizedSerializedSize); + } + for (int i = 0; i < availableGiftIds_.size(); i++) { + output.writeInt64NoTag(availableGiftIds_.getLong(i)); + } + if (anchorId_ != 0L) { + output.writeInt64(6, anchorId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clubName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clubName_); + } + if (level_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, level_); + } + if (userFansClubStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, userFansClubStatus_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBadge()); + } + { + int dataSize = 0; + for (int i = 0; i < availableGiftIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(availableGiftIds_.getLong(i)); + } + size += dataSize; + if (!getAvailableGiftIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + availableGiftIdsMemoizedSerializedSize = dataSize; + } + if (anchorId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, anchorId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) obj; + + if (!getClubName() + .equals(other.getClubName())) return false; + if (getLevel() + != other.getLevel()) return false; + if (getUserFansClubStatus() + != other.getUserFansClubStatus()) return false; + if (hasBadge() != other.hasBadge()) return false; + if (hasBadge()) { + if (!getBadge() + .equals(other.getBadge())) return false; + } + if (!getAvailableGiftIdsList() + .equals(other.getAvailableGiftIdsList())) return false; + if (getAnchorId() + != other.getAnchorId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLUBNAME_FIELD_NUMBER; + hash = (53 * hash) + getClubName().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getLevel(); + hash = (37 * hash) + USERFANSCLUBSTATUS_FIELD_NUMBER; + hash = (53 * hash) + getUserFansClubStatus(); + if (hasBadge()) { + hash = (37 * hash) + BADGE_FIELD_NUMBER; + hash = (53 * hash) + getBadge().hashCode(); + } + if (getAvailableGiftIdsCount() > 0) { + hash = (37 * hash) + AVAILABLEGIFTIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvailableGiftIdsList().hashCode(); + } + hash = (37 * hash) + ANCHORID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.FansClub.FansClubData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.FansClub.FansClubData) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBadgeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clubName_ = ""; + level_ = 0; + userFansClubStatus_ = 0; + badge_ = null; + if (badgeBuilder_ != null) { + badgeBuilder_.dispose(); + badgeBuilder_ = null; + } + availableGiftIds_ = emptyLongList(); + anchorId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clubName_ = clubName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userFansClubStatus_ = userFansClubStatus_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.badge_ = badgeBuilder_ == null + ? badge_ + : badgeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + availableGiftIds_.makeImmutable(); + result.availableGiftIds_ = availableGiftIds_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.anchorId_ = anchorId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance()) return this; + if (!other.getClubName().isEmpty()) { + clubName_ = other.clubName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getLevel() != 0) { + setLevel(other.getLevel()); + } + if (other.getUserFansClubStatus() != 0) { + setUserFansClubStatus(other.getUserFansClubStatus()); + } + if (other.hasBadge()) { + mergeBadge(other.getBadge()); + } + if (!other.availableGiftIds_.isEmpty()) { + if (availableGiftIds_.isEmpty()) { + availableGiftIds_ = other.availableGiftIds_; + availableGiftIds_.makeImmutable(); + bitField0_ |= 0x00000010; + } else { + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.addAll(other.availableGiftIds_); + } + onChanged(); + } + if (other.getAnchorId() != 0L) { + setAnchorId(other.getAnchorId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + clubName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + level_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + userFansClubStatus_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getBadgeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + long v = input.readInt64(); + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.addLong(v); + break; + } // case 40 + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAvailableGiftIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + availableGiftIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 42 + case 48: { + anchorId_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object clubName_ = ""; + /** + * string clubName = 1; + * @return The clubName. + */ + public java.lang.String getClubName() { + java.lang.Object ref = clubName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clubName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string clubName = 1; + * @return The bytes for clubName. + */ + public com.google.protobuf.ByteString + getClubNameBytes() { + java.lang.Object ref = clubName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clubName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string clubName = 1; + * @param value The clubName to set. + * @return This builder for chaining. + */ + public Builder setClubName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + clubName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string clubName = 1; + * @return This builder for chaining. + */ + public Builder clearClubName() { + clubName_ = getDefaultInstance().getClubName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string clubName = 1; + * @param value The bytes for clubName to set. + * @return This builder for chaining. + */ + public Builder setClubNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + clubName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int level_ ; + /** + * int32 level = 2; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + /** + * int32 level = 2; + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(int value) { + + level_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 level = 2; + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000002); + level_ = 0; + onChanged(); + return this; + } + + private int userFansClubStatus_ ; + /** + * int32 userFansClubStatus = 3; + * @return The userFansClubStatus. + */ + @java.lang.Override + public int getUserFansClubStatus() { + return userFansClubStatus_; + } + /** + * int32 userFansClubStatus = 3; + * @param value The userFansClubStatus to set. + * @return This builder for chaining. + */ + public Builder setUserFansClubStatus(int value) { + + userFansClubStatus_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 userFansClubStatus = 3; + * @return This builder for chaining. + */ + public Builder clearUserFansClubStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + userFansClubStatus_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge badge_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder> badgeBuilder_; + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + * @return Whether the badge field is set. + */ + public boolean hasBadge() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + * @return The badge. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getBadge() { + if (badgeBuilder_ == null) { + return badge_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } else { + return badgeBuilder_.getMessage(); + } + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + public Builder setBadge(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge value) { + if (badgeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + badge_ = value; + } else { + badgeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + public Builder setBadge( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder builderForValue) { + if (badgeBuilder_ == null) { + badge_ = builderForValue.build(); + } else { + badgeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + public Builder mergeBadge(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge value) { + if (badgeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + badge_ != null && + badge_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance()) { + getBadgeBuilder().mergeFrom(value); + } else { + badge_ = value; + } + } else { + badgeBuilder_.mergeFrom(value); + } + if (badge_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + public Builder clearBadge() { + bitField0_ = (bitField0_ & ~0x00000008); + badge_ = null; + if (badgeBuilder_ != null) { + badgeBuilder_.dispose(); + badgeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder getBadgeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBadgeFieldBuilder().getBuilder(); + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder getBadgeOrBuilder() { + if (badgeBuilder_ != null) { + return badgeBuilder_.getMessageOrBuilder(); + } else { + return badge_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } + } + /** + * .User.FansClub.FansClubData.UserBadge badge = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder> + getBadgeFieldBuilder() { + if (badgeBuilder_ == null) { + badgeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder>( + getBadge(), + getParentForChildren(), + isClean()); + badge_ = null; + } + return badgeBuilder_; + } + + private com.google.protobuf.Internal.LongList availableGiftIds_ = emptyLongList(); + private void ensureAvailableGiftIdsIsMutable() { + if (!availableGiftIds_.isModifiable()) { + availableGiftIds_ = makeMutableCopy(availableGiftIds_); + } + bitField0_ |= 0x00000010; + } + /** + * repeated int64 availableGiftIds = 5; + * @return A list containing the availableGiftIds. + */ + public java.util.List + getAvailableGiftIdsList() { + availableGiftIds_.makeImmutable(); + return availableGiftIds_; + } + /** + * repeated int64 availableGiftIds = 5; + * @return The count of availableGiftIds. + */ + public int getAvailableGiftIdsCount() { + return availableGiftIds_.size(); + } + /** + * repeated int64 availableGiftIds = 5; + * @param index The index of the element to return. + * @return The availableGiftIds at the given index. + */ + public long getAvailableGiftIds(int index) { + return availableGiftIds_.getLong(index); + } + /** + * repeated int64 availableGiftIds = 5; + * @param index The index to set the value at. + * @param value The availableGiftIds to set. + * @return This builder for chaining. + */ + public Builder setAvailableGiftIds( + int index, long value) { + + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.setLong(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated int64 availableGiftIds = 5; + * @param value The availableGiftIds to add. + * @return This builder for chaining. + */ + public Builder addAvailableGiftIds(long value) { + + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.addLong(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated int64 availableGiftIds = 5; + * @param values The availableGiftIds to add. + * @return This builder for chaining. + */ + public Builder addAllAvailableGiftIds( + java.lang.Iterable values) { + ensureAvailableGiftIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, availableGiftIds_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated int64 availableGiftIds = 5; + * @return This builder for chaining. + */ + public Builder clearAvailableGiftIds() { + availableGiftIds_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + private long anchorId_ ; + /** + * int64 anchorId = 6; + * @return The anchorId. + */ + @java.lang.Override + public long getAnchorId() { + return anchorId_; + } + /** + * int64 anchorId = 6; + * @param value The anchorId to set. + * @return This builder for chaining. + */ + public Builder setAnchorId(long value) { + + anchorId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int64 anchorId = 6; + * @return This builder for chaining. + */ + public Builder clearAnchorId() { + bitField0_ = (bitField0_ & ~0x00000020); + anchorId_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansClub.FansClubData) + } + + // @@protoc_insertion_point(class_scope:User.FansClub.FansClubData) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FansClubData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int DATA_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData data_; + /** + * .User.FansClub.FansClubData data = 1; + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .User.FansClub.FansClubData data = 1; + * @return The data. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getData() { + return data_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } + /** + * .User.FansClub.FansClubData data = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder getDataOrBuilder() { + return data_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } + + public static final int PREFERDATA_FIELD_NUMBER = 2; + private static final class PreferDataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_PreferDataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.Integer, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> preferData_; + private com.google.protobuf.MapField + internalGetPreferData() { + if (preferData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PreferDataDefaultEntryHolder.defaultEntry); + } + return preferData_; + } + public int getPreferDataCount() { + return internalGetPreferData().getMap().size(); + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public boolean containsPreferData( + int key) { + + return internalGetPreferData().getMap().containsKey(key); + } + /** + * Use {@link #getPreferDataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPreferData() { + return getPreferDataMap(); + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public java.util.Map getPreferDataMap() { + return internalGetPreferData().getMap(); + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData defaultValue) { + + java.util.Map map = + internalGetPreferData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrThrow( + int key) { + + java.util.Map map = + internalGetPreferData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getData()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetPreferData(), + PreferDataDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getData()); + } + for (java.util.Map.Entry entry + : internalGetPreferData().getMap().entrySet()) { + com.google.protobuf.MapEntry + preferData__ = PreferDataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, preferData__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub) obj; + + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData() + .equals(other.getData())) return false; + } + if (!internalGetPreferData().equals( + other.internalGetPreferData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + if (!internalGetPreferData().getMap().isEmpty()) { + hash = (37 * hash) + PREFERDATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetPreferData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.FansClub} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.FansClub) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetPreferData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutablePreferData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDataFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + internalGetMutablePreferData().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.data_ = dataBuilder_ == null + ? data_ + : dataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preferData_ = internalGetPreferData().build(PreferDataDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance()) return this; + if (other.hasData()) { + mergeData(other.getData()); + } + internalGetMutablePreferData().mergeFrom( + other.internalGetPreferData()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getDataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + preferData__ = input.readMessage( + PreferDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutablePreferData().ensureBuilderMap().put( + preferData__.getKey(), preferData__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData data_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder> dataBuilder_; + /** + * .User.FansClub.FansClubData data = 1; + * @return Whether the data field is set. + */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .User.FansClub.FansClubData data = 1; + * @return The data. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getData() { + if (dataBuilder_ == null) { + return data_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + * .User.FansClub.FansClubData data = 1; + */ + public Builder setData(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + } else { + dataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .User.FansClub.FansClubData data = 1; + */ + public Builder setData( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .User.FansClub.FansClubData data = 1; + */ + public Builder mergeData(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData value) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + data_ != null && + data_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance()) { + getDataBuilder().mergeFrom(value); + } else { + data_ = value; + } + } else { + dataBuilder_.mergeFrom(value); + } + if (data_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .User.FansClub.FansClubData data = 1; + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000001); + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.FansClub.FansClubData data = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder getDataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + * .User.FansClub.FansClubData data = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } + } + /** + * .User.FansClub.FansClubData data = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder>( + getData(), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + + private static final class PreferDataConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData build(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder val) { + if (val instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) { return (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) val; } + return ((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return PreferDataDefaultEntryHolder.defaultEntry; + } + }; + private static final PreferDataConverter preferDataConverter = new PreferDataConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.Integer, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder> preferData_; + private com.google.protobuf.MapFieldBuilder + internalGetPreferData() { + if (preferData_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(preferDataConverter); + } + return preferData_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutablePreferData() { + if (preferData_ == null) { + preferData_ = new com.google.protobuf.MapFieldBuilder<>(preferDataConverter); + } + bitField0_ |= 0x00000002; + onChanged(); + return preferData_; + } + public int getPreferDataCount() { + return internalGetPreferData().ensureBuilderMap().size(); + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public boolean containsPreferData( + int key) { + + return internalGetPreferData().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getPreferDataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPreferData() { + return getPreferDataMap(); + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public java.util.Map getPreferDataMap() { + return internalGetPreferData().getImmutableMap(); + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData defaultValue) { + + java.util.Map map = internalGetMutablePreferData().ensureBuilderMap(); + return map.containsKey(key) ? preferDataConverter.build(map.get(key)) : defaultValue; + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrThrow( + int key) { + + java.util.Map map = internalGetMutablePreferData().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return preferDataConverter.build(map.get(key)); + } + public Builder clearPreferData() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutablePreferData().clear(); + return this; + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + public Builder removePreferData( + int key) { + + internalGetMutablePreferData().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutablePreferData() { + bitField0_ |= 0x00000002; + return internalGetMutablePreferData().ensureMessageMap(); + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + public Builder putPreferData( + int key, + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData value) { + + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutablePreferData().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + public Builder putAllPreferData( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutablePreferData().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<int32, .User.FansClub.FansClubData> preferData = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder putPreferDataBuilderIfAbsent( + int key) { + java.util.Map builderMap = internalGetMutablePreferData().ensureBuilderMap(); + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) { + entry = ((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) entry).toBuilder(); + builderMap.put(key, entry); + } + return (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder) entry; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansClub) + } + + // @@protoc_insertion_point(class_scope:User.FansClub) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FansClub parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FansGroupInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansGroupInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.FansGroupInfo} + */ + public static final class FansGroupInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansGroupInfo) + FansGroupInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FansGroupInfo.newBuilder() to construct. + private FansGroupInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FansGroupInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FansGroupInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.FansGroupInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.FansGroupInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansGroupInfo) + } + + // @@protoc_insertion_point(class_scope:User.FansGroupInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FansGroupInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FollowInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FollowInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 followingCount = 1; + * @return The followingCount. + */ + long getFollowingCount(); + + /** + * int64 followerCount = 2; + * @return The followerCount. + */ + long getFollowerCount(); + + /** + * int64 followStatus = 3; + * @return The followStatus. + */ + long getFollowStatus(); + + /** + * int64 pushStatus = 4; + * @return The pushStatus. + */ + long getPushStatus(); + + /** + * string remarkName = 5; + * @return The remarkName. + */ + java.lang.String getRemarkName(); + /** + * string remarkName = 5; + * @return The bytes for remarkName. + */ + com.google.protobuf.ByteString + getRemarkNameBytes(); + } + /** + * Protobuf type {@code User.FollowInfo} + */ + public static final class FollowInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FollowInfo) + FollowInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FollowInfo.newBuilder() to construct. + private FollowInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FollowInfo() { + remarkName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FollowInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder.class); + } + + public static final int FOLLOWINGCOUNT_FIELD_NUMBER = 1; + private long followingCount_ = 0L; + /** + * int64 followingCount = 1; + * @return The followingCount. + */ + @java.lang.Override + public long getFollowingCount() { + return followingCount_; + } + + public static final int FOLLOWERCOUNT_FIELD_NUMBER = 2; + private long followerCount_ = 0L; + /** + * int64 followerCount = 2; + * @return The followerCount. + */ + @java.lang.Override + public long getFollowerCount() { + return followerCount_; + } + + public static final int FOLLOWSTATUS_FIELD_NUMBER = 3; + private long followStatus_ = 0L; + /** + * int64 followStatus = 3; + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + + public static final int PUSHSTATUS_FIELD_NUMBER = 4; + private long pushStatus_ = 0L; + /** + * int64 pushStatus = 4; + * @return The pushStatus. + */ + @java.lang.Override + public long getPushStatus() { + return pushStatus_; + } + + public static final int REMARKNAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object remarkName_ = ""; + /** + * string remarkName = 5; + * @return The remarkName. + */ + @java.lang.Override + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } + } + /** + * string remarkName = 5; + * @return The bytes for remarkName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (followingCount_ != 0L) { + output.writeInt64(1, followingCount_); + } + if (followerCount_ != 0L) { + output.writeInt64(2, followerCount_); + } + if (followStatus_ != 0L) { + output.writeInt64(3, followStatus_); + } + if (pushStatus_ != 0L) { + output.writeInt64(4, pushStatus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remarkName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (followingCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, followingCount_); + } + if (followerCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, followerCount_); + } + if (followStatus_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, followStatus_); + } + if (pushStatus_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, pushStatus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remarkName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo) obj; + + if (getFollowingCount() + != other.getFollowingCount()) return false; + if (getFollowerCount() + != other.getFollowerCount()) return false; + if (getFollowStatus() + != other.getFollowStatus()) return false; + if (getPushStatus() + != other.getPushStatus()) return false; + if (!getRemarkName() + .equals(other.getRemarkName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FOLLOWINGCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowingCount()); + hash = (37 * hash) + FOLLOWERCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowerCount()); + hash = (37 * hash) + FOLLOWSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowStatus()); + hash = (37 * hash) + PUSHSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPushStatus()); + hash = (37 * hash) + REMARKNAME_FIELD_NUMBER; + hash = (53 * hash) + getRemarkName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.FollowInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.FollowInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + followingCount_ = 0L; + followerCount_ = 0L; + followStatus_ = 0L; + pushStatus_ = 0L; + remarkName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.followingCount_ = followingCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.followerCount_ = followerCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.followStatus_ = followStatus_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pushStatus_ = pushStatus_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remarkName_ = remarkName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance()) return this; + if (other.getFollowingCount() != 0L) { + setFollowingCount(other.getFollowingCount()); + } + if (other.getFollowerCount() != 0L) { + setFollowerCount(other.getFollowerCount()); + } + if (other.getFollowStatus() != 0L) { + setFollowStatus(other.getFollowStatus()); + } + if (other.getPushStatus() != 0L) { + setPushStatus(other.getPushStatus()); + } + if (!other.getRemarkName().isEmpty()) { + remarkName_ = other.remarkName_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + followingCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + followerCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + followStatus_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + pushStatus_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + remarkName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long followingCount_ ; + /** + * int64 followingCount = 1; + * @return The followingCount. + */ + @java.lang.Override + public long getFollowingCount() { + return followingCount_; + } + /** + * int64 followingCount = 1; + * @param value The followingCount to set. + * @return This builder for chaining. + */ + public Builder setFollowingCount(long value) { + + followingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 followingCount = 1; + * @return This builder for chaining. + */ + public Builder clearFollowingCount() { + bitField0_ = (bitField0_ & ~0x00000001); + followingCount_ = 0L; + onChanged(); + return this; + } + + private long followerCount_ ; + /** + * int64 followerCount = 2; + * @return The followerCount. + */ + @java.lang.Override + public long getFollowerCount() { + return followerCount_; + } + /** + * int64 followerCount = 2; + * @param value The followerCount to set. + * @return This builder for chaining. + */ + public Builder setFollowerCount(long value) { + + followerCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int64 followerCount = 2; + * @return This builder for chaining. + */ + public Builder clearFollowerCount() { + bitField0_ = (bitField0_ & ~0x00000002); + followerCount_ = 0L; + onChanged(); + return this; + } + + private long followStatus_ ; + /** + * int64 followStatus = 3; + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + /** + * int64 followStatus = 3; + * @param value The followStatus to set. + * @return This builder for chaining. + */ + public Builder setFollowStatus(long value) { + + followStatus_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 followStatus = 3; + * @return This builder for chaining. + */ + public Builder clearFollowStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + followStatus_ = 0L; + onChanged(); + return this; + } + + private long pushStatus_ ; + /** + * int64 pushStatus = 4; + * @return The pushStatus. + */ + @java.lang.Override + public long getPushStatus() { + return pushStatus_; + } + /** + * int64 pushStatus = 4; + * @param value The pushStatus to set. + * @return This builder for chaining. + */ + public Builder setPushStatus(long value) { + + pushStatus_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int64 pushStatus = 4; + * @return This builder for chaining. + */ + public Builder clearPushStatus() { + bitField0_ = (bitField0_ & ~0x00000008); + pushStatus_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object remarkName_ = ""; + /** + * string remarkName = 5; + * @return The remarkName. + */ + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string remarkName = 5; + * @return The bytes for remarkName. + */ + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string remarkName = 5; + * @param value The remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remarkName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string remarkName = 5; + * @return This builder for chaining. + */ + public Builder clearRemarkName() { + remarkName_ = getDefaultInstance().getRemarkName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string remarkName = 5; + * @param value The bytes for remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remarkName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FollowInfo) + } + + // @@protoc_insertion_point(class_scope:User.FollowInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FollowInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface JAccreditInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.JAccreditInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.JAccreditInfo} + */ + public static final class JAccreditInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.JAccreditInfo) + JAccreditInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use JAccreditInfo.newBuilder() to construct. + private JAccreditInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JAccreditInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JAccreditInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.JAccreditInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.JAccreditInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.JAccreditInfo) + } + + // @@protoc_insertion_point(class_scope:User.JAccreditInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JAccreditInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NobleLevelInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.NobleLevelInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.NobleLevelInfo} + */ + public static final class NobleLevelInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.NobleLevelInfo) + NobleLevelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use NobleLevelInfo.newBuilder() to construct. + private NobleLevelInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NobleLevelInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NobleLevelInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.NobleLevelInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.NobleLevelInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.NobleLevelInfo) + } + + // @@protoc_insertion_point(class_scope:User.NobleLevelInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NobleLevelInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface OwnRoomOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.OwnRoom) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.OwnRoom} + */ + public static final class OwnRoom extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.OwnRoom) + OwnRoomOrBuilder { + private static final long serialVersionUID = 0L; + // Use OwnRoom.newBuilder() to construct. + private OwnRoom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OwnRoom() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OwnRoom(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.OwnRoom} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.OwnRoom) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.OwnRoom) + } + + // @@protoc_insertion_point(class_scope:User.OwnRoom) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OwnRoom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PayGradeOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.PayGrade) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 totalDiamondCount = 1; + * @return The totalDiamondCount. + */ + long getTotalDiamondCount(); + + /** + * .Image diamondIcon = 2; + * @return Whether the diamondIcon field is set. + */ + boolean hasDiamondIcon(); + /** + * .Image diamondIcon = 2; + * @return The diamondIcon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDiamondIcon(); + /** + * .Image diamondIcon = 2; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDiamondIconOrBuilder(); + + /** + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .Image icon = 4; + * @return Whether the icon field is set. + */ + boolean hasIcon(); + /** + * .Image icon = 4; + * @return The icon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon(); + /** + * .Image icon = 4; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder(); + + /** + * string nextName = 5; + * @return The nextName. + */ + java.lang.String getNextName(); + /** + * string nextName = 5; + * @return The bytes for nextName. + */ + com.google.protobuf.ByteString + getNextNameBytes(); + + /** + * int64 level = 6; + * @return The level. + */ + long getLevel(); + + /** + * .Image nextIcon = 7; + * @return Whether the nextIcon field is set. + */ + boolean hasNextIcon(); + /** + * .Image nextIcon = 7; + * @return The nextIcon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNextIcon(); + /** + * .Image nextIcon = 7; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNextIconOrBuilder(); + + /** + * int64 nextDiamond = 8; + * @return The nextDiamond. + */ + long getNextDiamond(); + + /** + * int64 nowDiamond = 9; + * @return The nowDiamond. + */ + long getNowDiamond(); + + /** + * int64 thisGradeMinDiamond = 10; + * @return The thisGradeMinDiamond. + */ + long getThisGradeMinDiamond(); + + /** + * int64 thisGradeMaxDiamond = 11; + * @return The thisGradeMaxDiamond. + */ + long getThisGradeMaxDiamond(); + + /** + * int64 payDiamondBak = 12; + * @return The payDiamondBak. + */ + long getPayDiamondBak(); + + /** + * string gradeDescribe = 13; + * @return The gradeDescribe. + */ + java.lang.String getGradeDescribe(); + /** + * string gradeDescribe = 13; + * @return The bytes for gradeDescribe. + */ + com.google.protobuf.ByteString + getGradeDescribeBytes(); + + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + java.util.List + getGradeIconListList(); + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getGradeIconList(int index); + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + int getGradeIconListCount(); + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + java.util.List + getGradeIconListOrBuilderList(); + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder getGradeIconListOrBuilder( + int index); + + /** + * int64 screenChatType = 15; + * @return The screenChatType. + */ + long getScreenChatType(); + + /** + * .Image imIcon = 16; + * @return Whether the imIcon field is set. + */ + boolean hasImIcon(); + /** + * .Image imIcon = 16; + * @return The imIcon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImIcon(); + /** + * .Image imIcon = 16; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconOrBuilder(); + + /** + * .Image imIconWithLevel = 17; + * @return Whether the imIconWithLevel field is set. + */ + boolean hasImIconWithLevel(); + /** + * .Image imIconWithLevel = 17; + * @return The imIconWithLevel. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImIconWithLevel(); + /** + * .Image imIconWithLevel = 17; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconWithLevelOrBuilder(); + + /** + * .Image liveIcon = 18; + * @return Whether the liveIcon field is set. + */ + boolean hasLiveIcon(); + /** + * .Image liveIcon = 18; + * @return The liveIcon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getLiveIcon(); + /** + * .Image liveIcon = 18; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getLiveIconOrBuilder(); + + /** + * .Image newImIconWithLevel = 19; + * @return Whether the newImIconWithLevel field is set. + */ + boolean hasNewImIconWithLevel(); + /** + * .Image newImIconWithLevel = 19; + * @return The newImIconWithLevel. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewImIconWithLevel(); + /** + * .Image newImIconWithLevel = 19; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewImIconWithLevelOrBuilder(); + + /** + * .Image newLiveIcon = 20; + * @return Whether the newLiveIcon field is set. + */ + boolean hasNewLiveIcon(); + /** + * .Image newLiveIcon = 20; + * @return The newLiveIcon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewLiveIcon(); + /** + * .Image newLiveIcon = 20; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewLiveIconOrBuilder(); + + /** + * int64 upgradeNeedConsume = 21; + * @return The upgradeNeedConsume. + */ + long getUpgradeNeedConsume(); + + /** + * string nextPrivileges = 22; + * @return The nextPrivileges. + */ + java.lang.String getNextPrivileges(); + /** + * string nextPrivileges = 22; + * @return The bytes for nextPrivileges. + */ + com.google.protobuf.ByteString + getNextPrivilegesBytes(); + + /** + * .Image background = 23; + * @return Whether the background field is set. + */ + boolean hasBackground(); + /** + * .Image background = 23; + * @return The background. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackground(); + /** + * .Image background = 23; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder(); + + /** + * .Image backgroundBack = 24; + * @return Whether the backgroundBack field is set. + */ + boolean hasBackgroundBack(); + /** + * .Image backgroundBack = 24; + * @return The backgroundBack. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundBack(); + /** + * .Image backgroundBack = 24; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundBackOrBuilder(); + + /** + * int64 score = 25; + * @return The score. + */ + long getScore(); + + /** + *
+       * GradeBuffInfo buffInfo = 26;
+       * 
+ * + * string gradeBanner = 1001; + * @return The gradeBanner. + */ + java.lang.String getGradeBanner(); + /** + *
+       * GradeBuffInfo buffInfo = 26;
+       * 
+ * + * string gradeBanner = 1001; + * @return The bytes for gradeBanner. + */ + com.google.protobuf.ByteString + getGradeBannerBytes(); + + /** + * .Image profileDialogBg = 1002; + * @return Whether the profileDialogBg field is set. + */ + boolean hasProfileDialogBg(); + /** + * .Image profileDialogBg = 1002; + * @return The profileDialogBg. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBg(); + /** + * .Image profileDialogBg = 1002; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgOrBuilder(); + + /** + * .Image profileDialogBgBack = 1003; + * @return Whether the profileDialogBgBack field is set. + */ + boolean hasProfileDialogBgBack(); + /** + * .Image profileDialogBgBack = 1003; + * @return The profileDialogBgBack. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBgBack(); + /** + * .Image profileDialogBgBack = 1003; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgBackOrBuilder(); + } + /** + * Protobuf type {@code User.PayGrade} + */ + public static final class PayGrade extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.PayGrade) + PayGradeOrBuilder { + private static final long serialVersionUID = 0L; + // Use PayGrade.newBuilder() to construct. + private PayGrade(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PayGrade() { + name_ = ""; + nextName_ = ""; + gradeDescribe_ = ""; + gradeIconList_ = java.util.Collections.emptyList(); + nextPrivileges_ = ""; + gradeBanner_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PayGrade(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder.class); + } + + public interface GradeIconOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.PayGrade.GradeIcon) + com.google.protobuf.MessageOrBuilder { + + /** + * .Image icon = 1; + * @return Whether the icon field is set. + */ + boolean hasIcon(); + /** + * .Image icon = 1; + * @return The icon. + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon(); + /** + * .Image icon = 1; + */ + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder(); + + /** + * int64 iconDiamond = 2; + * @return The iconDiamond. + */ + long getIconDiamond(); + + /** + * int64 level = 3; + * @return The level. + */ + long getLevel(); + + /** + * string levelStr = 4; + * @return The levelStr. + */ + java.lang.String getLevelStr(); + /** + * string levelStr = 4; + * @return The bytes for levelStr. + */ + com.google.protobuf.ByteString + getLevelStrBytes(); + } + /** + * Protobuf type {@code User.PayGrade.GradeIcon} + */ + public static final class GradeIcon extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.PayGrade.GradeIcon) + GradeIconOrBuilder { + private static final long serialVersionUID = 0L; + // Use GradeIcon.newBuilder() to construct. + private GradeIcon(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GradeIcon() { + levelStr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GradeIcon(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder.class); + } + + private int bitField0_; + public static final int ICON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image icon_; + /** + * .Image icon = 1; + * @return Whether the icon field is set. + */ + @java.lang.Override + public boolean hasIcon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image icon = 1; + * @return The icon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + /** + * .Image icon = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + + public static final int ICONDIAMOND_FIELD_NUMBER = 2; + private long iconDiamond_ = 0L; + /** + * int64 iconDiamond = 2; + * @return The iconDiamond. + */ + @java.lang.Override + public long getIconDiamond() { + return iconDiamond_; + } + + public static final int LEVEL_FIELD_NUMBER = 3; + private long level_ = 0L; + /** + * int64 level = 3; + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + + public static final int LEVELSTR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object levelStr_ = ""; + /** + * string levelStr = 4; + * @return The levelStr. + */ + @java.lang.Override + public java.lang.String getLevelStr() { + java.lang.Object ref = levelStr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + levelStr_ = s; + return s; + } + } + /** + * string levelStr = 4; + * @return The bytes for levelStr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLevelStrBytes() { + java.lang.Object ref = levelStr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + levelStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIcon()); + } + if (iconDiamond_ != 0L) { + output.writeInt64(2, iconDiamond_); + } + if (level_ != 0L) { + output.writeInt64(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(levelStr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, levelStr_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getIcon()); + } + if (iconDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, iconDiamond_); + } + if (level_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(levelStr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, levelStr_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon) obj; + + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon() + .equals(other.getIcon())) return false; + } + if (getIconDiamond() + != other.getIconDiamond()) return false; + if (getLevel() + != other.getLevel()) return false; + if (!getLevelStr() + .equals(other.getLevelStr())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + hash = (37 * hash) + ICONDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getIconDiamond()); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLevel()); + hash = (37 * hash) + LEVELSTR_FIELD_NUMBER; + hash = (53 * hash) + getLevelStr().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.PayGrade.GradeIcon} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.PayGrade.GradeIcon) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getIconFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + iconDiamond_ = 0L; + level_ = 0L; + levelStr_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.icon_ = iconBuilder_ == null + ? icon_ + : iconBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.iconDiamond_ = iconDiamond_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.levelStr_ = levelStr_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance()) return this; + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (other.getIconDiamond() != 0L) { + setIconDiamond(other.getIconDiamond()); + } + if (other.getLevel() != 0L) { + setLevel(other.getLevel()); + } + if (!other.getLevelStr().isEmpty()) { + levelStr_ = other.levelStr_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + iconDiamond_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + level_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + levelStr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image icon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> iconBuilder_; + /** + * .Image icon = 1; + * @return Whether the icon field is set. + */ + public boolean hasIcon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image icon = 1; + * @return The icon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + if (iconBuilder_ == null) { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } else { + return iconBuilder_.getMessage(); + } + } + /** + * .Image icon = 1; + */ + public Builder setIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + icon_ = value; + } else { + iconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image icon = 1; + */ + public Builder setIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Image icon = 1; + */ + public Builder mergeIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + icon_ != null && + icon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getIconBuilder().mergeFrom(value); + } else { + icon_ = value; + } + } else { + iconBuilder_.mergeFrom(value); + } + if (icon_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .Image icon = 1; + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00000001); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image icon = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getIconBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIconFieldBuilder().getBuilder(); + } + /** + * .Image icon = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + if (iconBuilder_ != null) { + return iconBuilder_.getMessageOrBuilder(); + } else { + return icon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + } + /** + * .Image icon = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getIconFieldBuilder() { + if (iconBuilder_ == null) { + iconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getIcon(), + getParentForChildren(), + isClean()); + icon_ = null; + } + return iconBuilder_; + } + + private long iconDiamond_ ; + /** + * int64 iconDiamond = 2; + * @return The iconDiamond. + */ + @java.lang.Override + public long getIconDiamond() { + return iconDiamond_; + } + /** + * int64 iconDiamond = 2; + * @param value The iconDiamond to set. + * @return This builder for chaining. + */ + public Builder setIconDiamond(long value) { + + iconDiamond_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int64 iconDiamond = 2; + * @return This builder for chaining. + */ + public Builder clearIconDiamond() { + bitField0_ = (bitField0_ & ~0x00000002); + iconDiamond_ = 0L; + onChanged(); + return this; + } + + private long level_ ; + /** + * int64 level = 3; + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + /** + * int64 level = 3; + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(long value) { + + level_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 level = 3; + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000004); + level_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object levelStr_ = ""; + /** + * string levelStr = 4; + * @return The levelStr. + */ + public java.lang.String getLevelStr() { + java.lang.Object ref = levelStr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + levelStr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string levelStr = 4; + * @return The bytes for levelStr. + */ + public com.google.protobuf.ByteString + getLevelStrBytes() { + java.lang.Object ref = levelStr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + levelStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string levelStr = 4; + * @param value The levelStr to set. + * @return This builder for chaining. + */ + public Builder setLevelStr( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + levelStr_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string levelStr = 4; + * @return This builder for chaining. + */ + public Builder clearLevelStr() { + levelStr_ = getDefaultInstance().getLevelStr(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string levelStr = 4; + * @param value The bytes for levelStr to set. + * @return This builder for chaining. + */ + public Builder setLevelStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + levelStr_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.PayGrade.GradeIcon) + } + + // @@protoc_insertion_point(class_scope:User.PayGrade.GradeIcon) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GradeIcon parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int TOTALDIAMONDCOUNT_FIELD_NUMBER = 1; + private long totalDiamondCount_ = 0L; + /** + * int64 totalDiamondCount = 1; + * @return The totalDiamondCount. + */ + @java.lang.Override + public long getTotalDiamondCount() { + return totalDiamondCount_; + } + + public static final int DIAMONDICON_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image diamondIcon_; + /** + * .Image diamondIcon = 2; + * @return Whether the diamondIcon field is set. + */ + @java.lang.Override + public boolean hasDiamondIcon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image diamondIcon = 2; + * @return The diamondIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDiamondIcon() { + return diamondIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } + /** + * .Image diamondIcon = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDiamondIconOrBuilder() { + return diamondIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 3; + * @return The name. + */ + @java.lang.Override + 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 = 3; + * @return The bytes for name. + */ + @java.lang.Override + 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image icon_; + /** + * .Image icon = 4; + * @return Whether the icon field is set. + */ + @java.lang.Override + public boolean hasIcon() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .Image icon = 4; + * @return The icon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + /** + * .Image icon = 4; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + + public static final int NEXTNAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object nextName_ = ""; + /** + * string nextName = 5; + * @return The nextName. + */ + @java.lang.Override + public java.lang.String getNextName() { + java.lang.Object ref = nextName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextName_ = s; + return s; + } + } + /** + * string nextName = 5; + * @return The bytes for nextName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextNameBytes() { + java.lang.Object ref = nextName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 6; + private long level_ = 0L; + /** + * int64 level = 6; + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + + public static final int NEXTICON_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image nextIcon_; + /** + * .Image nextIcon = 7; + * @return Whether the nextIcon field is set. + */ + @java.lang.Override + public boolean hasNextIcon() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .Image nextIcon = 7; + * @return The nextIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNextIcon() { + return nextIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } + /** + * .Image nextIcon = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNextIconOrBuilder() { + return nextIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } + + public static final int NEXTDIAMOND_FIELD_NUMBER = 8; + private long nextDiamond_ = 0L; + /** + * int64 nextDiamond = 8; + * @return The nextDiamond. + */ + @java.lang.Override + public long getNextDiamond() { + return nextDiamond_; + } + + public static final int NOWDIAMOND_FIELD_NUMBER = 9; + private long nowDiamond_ = 0L; + /** + * int64 nowDiamond = 9; + * @return The nowDiamond. + */ + @java.lang.Override + public long getNowDiamond() { + return nowDiamond_; + } + + public static final int THISGRADEMINDIAMOND_FIELD_NUMBER = 10; + private long thisGradeMinDiamond_ = 0L; + /** + * int64 thisGradeMinDiamond = 10; + * @return The thisGradeMinDiamond. + */ + @java.lang.Override + public long getThisGradeMinDiamond() { + return thisGradeMinDiamond_; + } + + public static final int THISGRADEMAXDIAMOND_FIELD_NUMBER = 11; + private long thisGradeMaxDiamond_ = 0L; + /** + * int64 thisGradeMaxDiamond = 11; + * @return The thisGradeMaxDiamond. + */ + @java.lang.Override + public long getThisGradeMaxDiamond() { + return thisGradeMaxDiamond_; + } + + public static final int PAYDIAMONDBAK_FIELD_NUMBER = 12; + private long payDiamondBak_ = 0L; + /** + * int64 payDiamondBak = 12; + * @return The payDiamondBak. + */ + @java.lang.Override + public long getPayDiamondBak() { + return payDiamondBak_; + } + + public static final int GRADEDESCRIBE_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object gradeDescribe_ = ""; + /** + * string gradeDescribe = 13; + * @return The gradeDescribe. + */ + @java.lang.Override + public java.lang.String getGradeDescribe() { + java.lang.Object ref = gradeDescribe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeDescribe_ = s; + return s; + } + } + /** + * string gradeDescribe = 13; + * @return The bytes for gradeDescribe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGradeDescribeBytes() { + java.lang.Object ref = gradeDescribe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeDescribe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRADEICONLIST_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private java.util.List gradeIconList_; + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + @java.lang.Override + public java.util.List getGradeIconListList() { + return gradeIconList_; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + @java.lang.Override + public java.util.List + getGradeIconListOrBuilderList() { + return gradeIconList_; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + @java.lang.Override + public int getGradeIconListCount() { + return gradeIconList_.size(); + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getGradeIconList(int index) { + return gradeIconList_.get(index); + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder getGradeIconListOrBuilder( + int index) { + return gradeIconList_.get(index); + } + + public static final int SCREENCHATTYPE_FIELD_NUMBER = 15; + private long screenChatType_ = 0L; + /** + * int64 screenChatType = 15; + * @return The screenChatType. + */ + @java.lang.Override + public long getScreenChatType() { + return screenChatType_; + } + + public static final int IMICON_FIELD_NUMBER = 16; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image imIcon_; + /** + * .Image imIcon = 16; + * @return Whether the imIcon field is set. + */ + @java.lang.Override + public boolean hasImIcon() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .Image imIcon = 16; + * @return The imIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImIcon() { + return imIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } + /** + * .Image imIcon = 16; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconOrBuilder() { + return imIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } + + public static final int IMICONWITHLEVEL_FIELD_NUMBER = 17; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image imIconWithLevel_; + /** + * .Image imIconWithLevel = 17; + * @return Whether the imIconWithLevel field is set. + */ + @java.lang.Override + public boolean hasImIconWithLevel() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .Image imIconWithLevel = 17; + * @return The imIconWithLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImIconWithLevel() { + return imIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } + /** + * .Image imIconWithLevel = 17; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconWithLevelOrBuilder() { + return imIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } + + public static final int LIVEICON_FIELD_NUMBER = 18; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image liveIcon_; + /** + * .Image liveIcon = 18; + * @return Whether the liveIcon field is set. + */ + @java.lang.Override + public boolean hasLiveIcon() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .Image liveIcon = 18; + * @return The liveIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getLiveIcon() { + return liveIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } + /** + * .Image liveIcon = 18; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getLiveIconOrBuilder() { + return liveIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } + + public static final int NEWIMICONWITHLEVEL_FIELD_NUMBER = 19; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image newImIconWithLevel_; + /** + * .Image newImIconWithLevel = 19; + * @return Whether the newImIconWithLevel field is set. + */ + @java.lang.Override + public boolean hasNewImIconWithLevel() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .Image newImIconWithLevel = 19; + * @return The newImIconWithLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewImIconWithLevel() { + return newImIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } + /** + * .Image newImIconWithLevel = 19; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewImIconWithLevelOrBuilder() { + return newImIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } + + public static final int NEWLIVEICON_FIELD_NUMBER = 20; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image newLiveIcon_; + /** + * .Image newLiveIcon = 20; + * @return Whether the newLiveIcon field is set. + */ + @java.lang.Override + public boolean hasNewLiveIcon() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .Image newLiveIcon = 20; + * @return The newLiveIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewLiveIcon() { + return newLiveIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } + /** + * .Image newLiveIcon = 20; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewLiveIconOrBuilder() { + return newLiveIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } + + public static final int UPGRADENEEDCONSUME_FIELD_NUMBER = 21; + private long upgradeNeedConsume_ = 0L; + /** + * int64 upgradeNeedConsume = 21; + * @return The upgradeNeedConsume. + */ + @java.lang.Override + public long getUpgradeNeedConsume() { + return upgradeNeedConsume_; + } + + public static final int NEXTPRIVILEGES_FIELD_NUMBER = 22; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPrivileges_ = ""; + /** + * string nextPrivileges = 22; + * @return The nextPrivileges. + */ + @java.lang.Override + public java.lang.String getNextPrivileges() { + java.lang.Object ref = nextPrivileges_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPrivileges_ = s; + return s; + } + } + /** + * string nextPrivileges = 22; + * @return The bytes for nextPrivileges. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPrivilegesBytes() { + java.lang.Object ref = nextPrivileges_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPrivileges_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKGROUND_FIELD_NUMBER = 23; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image background_; + /** + * .Image background = 23; + * @return Whether the background field is set. + */ + @java.lang.Override + public boolean hasBackground() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * .Image background = 23; + * @return The background. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + return background_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + /** + * .Image background = 23; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + return background_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + + public static final int BACKGROUNDBACK_FIELD_NUMBER = 24; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundBack_; + /** + * .Image backgroundBack = 24; + * @return Whether the backgroundBack field is set. + */ + @java.lang.Override + public boolean hasBackgroundBack() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * .Image backgroundBack = 24; + * @return The backgroundBack. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundBack() { + return backgroundBack_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } + /** + * .Image backgroundBack = 24; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundBackOrBuilder() { + return backgroundBack_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } + + public static final int SCORE_FIELD_NUMBER = 25; + private long score_ = 0L; + /** + * int64 score = 25; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + + public static final int GRADEBANNER_FIELD_NUMBER = 1001; + @SuppressWarnings("serial") + private volatile java.lang.Object gradeBanner_ = ""; + /** + *
+       * GradeBuffInfo buffInfo = 26;
+       * 
+ * + * string gradeBanner = 1001; + * @return The gradeBanner. + */ + @java.lang.Override + public java.lang.String getGradeBanner() { + java.lang.Object ref = gradeBanner_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeBanner_ = s; + return s; + } + } + /** + *
+       * GradeBuffInfo buffInfo = 26;
+       * 
+ * + * string gradeBanner = 1001; + * @return The bytes for gradeBanner. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGradeBannerBytes() { + java.lang.Object ref = gradeBanner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeBanner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROFILEDIALOGBG_FIELD_NUMBER = 1002; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBg_; + /** + * .Image profileDialogBg = 1002; + * @return Whether the profileDialogBg field is set. + */ + @java.lang.Override + public boolean hasProfileDialogBg() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * .Image profileDialogBg = 1002; + * @return The profileDialogBg. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBg() { + return profileDialogBg_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } + /** + * .Image profileDialogBg = 1002; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgOrBuilder() { + return profileDialogBg_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } + + public static final int PROFILEDIALOGBGBACK_FIELD_NUMBER = 1003; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBgBack_; + /** + * .Image profileDialogBgBack = 1003; + * @return Whether the profileDialogBgBack field is set. + */ + @java.lang.Override + public boolean hasProfileDialogBgBack() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * .Image profileDialogBgBack = 1003; + * @return The profileDialogBgBack. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBgBack() { + return profileDialogBgBack_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } + /** + * .Image profileDialogBgBack = 1003; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgBackOrBuilder() { + return profileDialogBgBack_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (totalDiamondCount_ != 0L) { + output.writeInt64(1, totalDiamondCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDiamondIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, nextName_); + } + if (level_ != 0L) { + output.writeInt64(6, level_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getNextIcon()); + } + if (nextDiamond_ != 0L) { + output.writeInt64(8, nextDiamond_); + } + if (nowDiamond_ != 0L) { + output.writeInt64(9, nowDiamond_); + } + if (thisGradeMinDiamond_ != 0L) { + output.writeInt64(10, thisGradeMinDiamond_); + } + if (thisGradeMaxDiamond_ != 0L) { + output.writeInt64(11, thisGradeMaxDiamond_); + } + if (payDiamondBak_ != 0L) { + output.writeInt64(12, payDiamondBak_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeDescribe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, gradeDescribe_); + } + for (int i = 0; i < gradeIconList_.size(); i++) { + output.writeMessage(14, gradeIconList_.get(i)); + } + if (screenChatType_ != 0L) { + output.writeInt64(15, screenChatType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(16, getImIcon()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(17, getImIconWithLevel()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(18, getLiveIcon()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(19, getNewImIconWithLevel()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(20, getNewLiveIcon()); + } + if (upgradeNeedConsume_ != 0L) { + output.writeInt64(21, upgradeNeedConsume_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPrivileges_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, nextPrivileges_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(23, getBackground()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(24, getBackgroundBack()); + } + if (score_ != 0L) { + output.writeInt64(25, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeBanner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1001, gradeBanner_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(1002, getProfileDialogBg()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(1003, getProfileDialogBgBack()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (totalDiamondCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, totalDiamondCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDiamondIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, nextName_); + } + if (level_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, level_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getNextIcon()); + } + if (nextDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, nextDiamond_); + } + if (nowDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, nowDiamond_); + } + if (thisGradeMinDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, thisGradeMinDiamond_); + } + if (thisGradeMaxDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, thisGradeMaxDiamond_); + } + if (payDiamondBak_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, payDiamondBak_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeDescribe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, gradeDescribe_); + } + for (int i = 0; i < gradeIconList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, gradeIconList_.get(i)); + } + if (screenChatType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(15, screenChatType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getImIcon()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getImIconWithLevel()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getLiveIcon()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getNewImIconWithLevel()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getNewLiveIcon()); + } + if (upgradeNeedConsume_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(21, upgradeNeedConsume_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPrivileges_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, nextPrivileges_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getBackground()); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getBackgroundBack()); + } + if (score_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(25, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeBanner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1001, gradeBanner_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1002, getProfileDialogBg()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1003, getProfileDialogBgBack()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade) obj; + + if (getTotalDiamondCount() + != other.getTotalDiamondCount()) return false; + if (hasDiamondIcon() != other.hasDiamondIcon()) return false; + if (hasDiamondIcon()) { + if (!getDiamondIcon() + .equals(other.getDiamondIcon())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon() + .equals(other.getIcon())) return false; + } + if (!getNextName() + .equals(other.getNextName())) return false; + if (getLevel() + != other.getLevel()) return false; + if (hasNextIcon() != other.hasNextIcon()) return false; + if (hasNextIcon()) { + if (!getNextIcon() + .equals(other.getNextIcon())) return false; + } + if (getNextDiamond() + != other.getNextDiamond()) return false; + if (getNowDiamond() + != other.getNowDiamond()) return false; + if (getThisGradeMinDiamond() + != other.getThisGradeMinDiamond()) return false; + if (getThisGradeMaxDiamond() + != other.getThisGradeMaxDiamond()) return false; + if (getPayDiamondBak() + != other.getPayDiamondBak()) return false; + if (!getGradeDescribe() + .equals(other.getGradeDescribe())) return false; + if (!getGradeIconListList() + .equals(other.getGradeIconListList())) return false; + if (getScreenChatType() + != other.getScreenChatType()) return false; + if (hasImIcon() != other.hasImIcon()) return false; + if (hasImIcon()) { + if (!getImIcon() + .equals(other.getImIcon())) return false; + } + if (hasImIconWithLevel() != other.hasImIconWithLevel()) return false; + if (hasImIconWithLevel()) { + if (!getImIconWithLevel() + .equals(other.getImIconWithLevel())) return false; + } + if (hasLiveIcon() != other.hasLiveIcon()) return false; + if (hasLiveIcon()) { + if (!getLiveIcon() + .equals(other.getLiveIcon())) return false; + } + if (hasNewImIconWithLevel() != other.hasNewImIconWithLevel()) return false; + if (hasNewImIconWithLevel()) { + if (!getNewImIconWithLevel() + .equals(other.getNewImIconWithLevel())) return false; + } + if (hasNewLiveIcon() != other.hasNewLiveIcon()) return false; + if (hasNewLiveIcon()) { + if (!getNewLiveIcon() + .equals(other.getNewLiveIcon())) return false; + } + if (getUpgradeNeedConsume() + != other.getUpgradeNeedConsume()) return false; + if (!getNextPrivileges() + .equals(other.getNextPrivileges())) return false; + if (hasBackground() != other.hasBackground()) return false; + if (hasBackground()) { + if (!getBackground() + .equals(other.getBackground())) return false; + } + if (hasBackgroundBack() != other.hasBackgroundBack()) return false; + if (hasBackgroundBack()) { + if (!getBackgroundBack() + .equals(other.getBackgroundBack())) return false; + } + if (getScore() + != other.getScore()) return false; + if (!getGradeBanner() + .equals(other.getGradeBanner())) return false; + if (hasProfileDialogBg() != other.hasProfileDialogBg()) return false; + if (hasProfileDialogBg()) { + if (!getProfileDialogBg() + .equals(other.getProfileDialogBg())) return false; + } + if (hasProfileDialogBgBack() != other.hasProfileDialogBgBack()) return false; + if (hasProfileDialogBgBack()) { + if (!getProfileDialogBgBack() + .equals(other.getProfileDialogBgBack())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOTALDIAMONDCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalDiamondCount()); + if (hasDiamondIcon()) { + hash = (37 * hash) + DIAMONDICON_FIELD_NUMBER; + hash = (53 * hash) + getDiamondIcon().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + hash = (37 * hash) + NEXTNAME_FIELD_NUMBER; + hash = (53 * hash) + getNextName().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLevel()); + if (hasNextIcon()) { + hash = (37 * hash) + NEXTICON_FIELD_NUMBER; + hash = (53 * hash) + getNextIcon().hashCode(); + } + hash = (37 * hash) + NEXTDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNextDiamond()); + hash = (37 * hash) + NOWDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNowDiamond()); + hash = (37 * hash) + THISGRADEMINDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getThisGradeMinDiamond()); + hash = (37 * hash) + THISGRADEMAXDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getThisGradeMaxDiamond()); + hash = (37 * hash) + PAYDIAMONDBAK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPayDiamondBak()); + hash = (37 * hash) + GRADEDESCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getGradeDescribe().hashCode(); + if (getGradeIconListCount() > 0) { + hash = (37 * hash) + GRADEICONLIST_FIELD_NUMBER; + hash = (53 * hash) + getGradeIconListList().hashCode(); + } + hash = (37 * hash) + SCREENCHATTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScreenChatType()); + if (hasImIcon()) { + hash = (37 * hash) + IMICON_FIELD_NUMBER; + hash = (53 * hash) + getImIcon().hashCode(); + } + if (hasImIconWithLevel()) { + hash = (37 * hash) + IMICONWITHLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getImIconWithLevel().hashCode(); + } + if (hasLiveIcon()) { + hash = (37 * hash) + LIVEICON_FIELD_NUMBER; + hash = (53 * hash) + getLiveIcon().hashCode(); + } + if (hasNewImIconWithLevel()) { + hash = (37 * hash) + NEWIMICONWITHLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getNewImIconWithLevel().hashCode(); + } + if (hasNewLiveIcon()) { + hash = (37 * hash) + NEWLIVEICON_FIELD_NUMBER; + hash = (53 * hash) + getNewLiveIcon().hashCode(); + } + hash = (37 * hash) + UPGRADENEEDCONSUME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUpgradeNeedConsume()); + hash = (37 * hash) + NEXTPRIVILEGES_FIELD_NUMBER; + hash = (53 * hash) + getNextPrivileges().hashCode(); + if (hasBackground()) { + hash = (37 * hash) + BACKGROUND_FIELD_NUMBER; + hash = (53 * hash) + getBackground().hashCode(); + } + if (hasBackgroundBack()) { + hash = (37 * hash) + BACKGROUNDBACK_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundBack().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScore()); + hash = (37 * hash) + GRADEBANNER_FIELD_NUMBER; + hash = (53 * hash) + getGradeBanner().hashCode(); + if (hasProfileDialogBg()) { + hash = (37 * hash) + PROFILEDIALOGBG_FIELD_NUMBER; + hash = (53 * hash) + getProfileDialogBg().hashCode(); + } + if (hasProfileDialogBgBack()) { + hash = (37 * hash) + PROFILEDIALOGBGBACK_FIELD_NUMBER; + hash = (53 * hash) + getProfileDialogBgBack().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.PayGrade} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.PayGrade) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDiamondIconFieldBuilder(); + getIconFieldBuilder(); + getNextIconFieldBuilder(); + getGradeIconListFieldBuilder(); + getImIconFieldBuilder(); + getImIconWithLevelFieldBuilder(); + getLiveIconFieldBuilder(); + getNewImIconWithLevelFieldBuilder(); + getNewLiveIconFieldBuilder(); + getBackgroundFieldBuilder(); + getBackgroundBackFieldBuilder(); + getProfileDialogBgFieldBuilder(); + getProfileDialogBgBackFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalDiamondCount_ = 0L; + diamondIcon_ = null; + if (diamondIconBuilder_ != null) { + diamondIconBuilder_.dispose(); + diamondIconBuilder_ = null; + } + name_ = ""; + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + nextName_ = ""; + level_ = 0L; + nextIcon_ = null; + if (nextIconBuilder_ != null) { + nextIconBuilder_.dispose(); + nextIconBuilder_ = null; + } + nextDiamond_ = 0L; + nowDiamond_ = 0L; + thisGradeMinDiamond_ = 0L; + thisGradeMaxDiamond_ = 0L; + payDiamondBak_ = 0L; + gradeDescribe_ = ""; + if (gradeIconListBuilder_ == null) { + gradeIconList_ = java.util.Collections.emptyList(); + } else { + gradeIconList_ = null; + gradeIconListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + screenChatType_ = 0L; + imIcon_ = null; + if (imIconBuilder_ != null) { + imIconBuilder_.dispose(); + imIconBuilder_ = null; + } + imIconWithLevel_ = null; + if (imIconWithLevelBuilder_ != null) { + imIconWithLevelBuilder_.dispose(); + imIconWithLevelBuilder_ = null; + } + liveIcon_ = null; + if (liveIconBuilder_ != null) { + liveIconBuilder_.dispose(); + liveIconBuilder_ = null; + } + newImIconWithLevel_ = null; + if (newImIconWithLevelBuilder_ != null) { + newImIconWithLevelBuilder_.dispose(); + newImIconWithLevelBuilder_ = null; + } + newLiveIcon_ = null; + if (newLiveIconBuilder_ != null) { + newLiveIconBuilder_.dispose(); + newLiveIconBuilder_ = null; + } + upgradeNeedConsume_ = 0L; + nextPrivileges_ = ""; + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + backgroundBack_ = null; + if (backgroundBackBuilder_ != null) { + backgroundBackBuilder_.dispose(); + backgroundBackBuilder_ = null; + } + score_ = 0L; + gradeBanner_ = ""; + profileDialogBg_ = null; + if (profileDialogBgBuilder_ != null) { + profileDialogBgBuilder_.dispose(); + profileDialogBgBuilder_ = null; + } + profileDialogBgBack_ = null; + if (profileDialogBgBackBuilder_ != null) { + profileDialogBgBackBuilder_.dispose(); + profileDialogBgBackBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade result) { + if (gradeIconListBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + gradeIconList_ = java.util.Collections.unmodifiableList(gradeIconList_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.gradeIconList_ = gradeIconList_; + } else { + result.gradeIconList_ = gradeIconListBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalDiamondCount_ = totalDiamondCount_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.diamondIcon_ = diamondIconBuilder_ == null + ? diamondIcon_ + : diamondIconBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.icon_ = iconBuilder_ == null + ? icon_ + : iconBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nextName_ = nextName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.nextIcon_ = nextIconBuilder_ == null + ? nextIcon_ + : nextIconBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.nextDiamond_ = nextDiamond_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.nowDiamond_ = nowDiamond_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.thisGradeMinDiamond_ = thisGradeMinDiamond_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.thisGradeMaxDiamond_ = thisGradeMaxDiamond_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.payDiamondBak_ = payDiamondBak_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.gradeDescribe_ = gradeDescribe_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.screenChatType_ = screenChatType_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.imIcon_ = imIconBuilder_ == null + ? imIcon_ + : imIconBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.imIconWithLevel_ = imIconWithLevelBuilder_ == null + ? imIconWithLevel_ + : imIconWithLevelBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.liveIcon_ = liveIconBuilder_ == null + ? liveIcon_ + : liveIconBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.newImIconWithLevel_ = newImIconWithLevelBuilder_ == null + ? newImIconWithLevel_ + : newImIconWithLevelBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.newLiveIcon_ = newLiveIconBuilder_ == null + ? newLiveIcon_ + : newLiveIconBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.upgradeNeedConsume_ = upgradeNeedConsume_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.nextPrivileges_ = nextPrivileges_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.background_ = backgroundBuilder_ == null + ? background_ + : backgroundBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.backgroundBack_ = backgroundBackBuilder_ == null + ? backgroundBack_ + : backgroundBackBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.gradeBanner_ = gradeBanner_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.profileDialogBg_ = profileDialogBgBuilder_ == null + ? profileDialogBg_ + : profileDialogBgBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.profileDialogBgBack_ = profileDialogBgBackBuilder_ == null + ? profileDialogBgBack_ + : profileDialogBgBackBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance()) return this; + if (other.getTotalDiamondCount() != 0L) { + setTotalDiamondCount(other.getTotalDiamondCount()); + } + if (other.hasDiamondIcon()) { + mergeDiamondIcon(other.getDiamondIcon()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (!other.getNextName().isEmpty()) { + nextName_ = other.nextName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getLevel() != 0L) { + setLevel(other.getLevel()); + } + if (other.hasNextIcon()) { + mergeNextIcon(other.getNextIcon()); + } + if (other.getNextDiamond() != 0L) { + setNextDiamond(other.getNextDiamond()); + } + if (other.getNowDiamond() != 0L) { + setNowDiamond(other.getNowDiamond()); + } + if (other.getThisGradeMinDiamond() != 0L) { + setThisGradeMinDiamond(other.getThisGradeMinDiamond()); + } + if (other.getThisGradeMaxDiamond() != 0L) { + setThisGradeMaxDiamond(other.getThisGradeMaxDiamond()); + } + if (other.getPayDiamondBak() != 0L) { + setPayDiamondBak(other.getPayDiamondBak()); + } + if (!other.getGradeDescribe().isEmpty()) { + gradeDescribe_ = other.gradeDescribe_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (gradeIconListBuilder_ == null) { + if (!other.gradeIconList_.isEmpty()) { + if (gradeIconList_.isEmpty()) { + gradeIconList_ = other.gradeIconList_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureGradeIconListIsMutable(); + gradeIconList_.addAll(other.gradeIconList_); + } + onChanged(); + } + } else { + if (!other.gradeIconList_.isEmpty()) { + if (gradeIconListBuilder_.isEmpty()) { + gradeIconListBuilder_.dispose(); + gradeIconListBuilder_ = null; + gradeIconList_ = other.gradeIconList_; + bitField0_ = (bitField0_ & ~0x00002000); + gradeIconListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGradeIconListFieldBuilder() : null; + } else { + gradeIconListBuilder_.addAllMessages(other.gradeIconList_); + } + } + } + if (other.getScreenChatType() != 0L) { + setScreenChatType(other.getScreenChatType()); + } + if (other.hasImIcon()) { + mergeImIcon(other.getImIcon()); + } + if (other.hasImIconWithLevel()) { + mergeImIconWithLevel(other.getImIconWithLevel()); + } + if (other.hasLiveIcon()) { + mergeLiveIcon(other.getLiveIcon()); + } + if (other.hasNewImIconWithLevel()) { + mergeNewImIconWithLevel(other.getNewImIconWithLevel()); + } + if (other.hasNewLiveIcon()) { + mergeNewLiveIcon(other.getNewLiveIcon()); + } + if (other.getUpgradeNeedConsume() != 0L) { + setUpgradeNeedConsume(other.getUpgradeNeedConsume()); + } + if (!other.getNextPrivileges().isEmpty()) { + nextPrivileges_ = other.nextPrivileges_; + bitField0_ |= 0x00200000; + onChanged(); + } + if (other.hasBackground()) { + mergeBackground(other.getBackground()); + } + if (other.hasBackgroundBack()) { + mergeBackgroundBack(other.getBackgroundBack()); + } + if (other.getScore() != 0L) { + setScore(other.getScore()); + } + if (!other.getGradeBanner().isEmpty()) { + gradeBanner_ = other.gradeBanner_; + bitField0_ |= 0x02000000; + onChanged(); + } + if (other.hasProfileDialogBg()) { + mergeProfileDialogBg(other.getProfileDialogBg()); + } + if (other.hasProfileDialogBgBack()) { + mergeProfileDialogBgBack(other.getProfileDialogBgBack()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + totalDiamondCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getDiamondIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + nextName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + level_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + input.readMessage( + getNextIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + nextDiamond_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + nowDiamond_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + thisGradeMinDiamond_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + thisGradeMaxDiamond_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + payDiamondBak_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 106: { + gradeDescribe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.parser(), + extensionRegistry); + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.add(m); + } else { + gradeIconListBuilder_.addMessage(m); + } + break; + } // case 114 + case 120: { + screenChatType_ = input.readInt64(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 130: { + input.readMessage( + getImIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: { + input.readMessage( + getImIconWithLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: { + input.readMessage( + getLiveIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + case 154: { + input.readMessage( + getNewImIconWithLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 162: { + input.readMessage( + getNewLiveIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 162 + case 168: { + upgradeNeedConsume_ = input.readInt64(); + bitField0_ |= 0x00100000; + break; + } // case 168 + case 178: { + nextPrivileges_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 178 + case 186: { + input.readMessage( + getBackgroundFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: { + input.readMessage( + getBackgroundBackFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 200: { + score_ = input.readInt64(); + bitField0_ |= 0x01000000; + break; + } // case 200 + case 8010: { + gradeBanner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 8010 + case 8018: { + input.readMessage( + getProfileDialogBgFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 8018 + case 8026: { + input.readMessage( + getProfileDialogBgBackFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case 8026 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long totalDiamondCount_ ; + /** + * int64 totalDiamondCount = 1; + * @return The totalDiamondCount. + */ + @java.lang.Override + public long getTotalDiamondCount() { + return totalDiamondCount_; + } + /** + * int64 totalDiamondCount = 1; + * @param value The totalDiamondCount to set. + * @return This builder for chaining. + */ + public Builder setTotalDiamondCount(long value) { + + totalDiamondCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 totalDiamondCount = 1; + * @return This builder for chaining. + */ + public Builder clearTotalDiamondCount() { + bitField0_ = (bitField0_ & ~0x00000001); + totalDiamondCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image diamondIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> diamondIconBuilder_; + /** + * .Image diamondIcon = 2; + * @return Whether the diamondIcon field is set. + */ + public boolean hasDiamondIcon() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .Image diamondIcon = 2; + * @return The diamondIcon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getDiamondIcon() { + if (diamondIconBuilder_ == null) { + return diamondIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } else { + return diamondIconBuilder_.getMessage(); + } + } + /** + * .Image diamondIcon = 2; + */ + public Builder setDiamondIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (diamondIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diamondIcon_ = value; + } else { + diamondIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .Image diamondIcon = 2; + */ + public Builder setDiamondIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (diamondIconBuilder_ == null) { + diamondIcon_ = builderForValue.build(); + } else { + diamondIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .Image diamondIcon = 2; + */ + public Builder mergeDiamondIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (diamondIconBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + diamondIcon_ != null && + diamondIcon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getDiamondIconBuilder().mergeFrom(value); + } else { + diamondIcon_ = value; + } + } else { + diamondIconBuilder_.mergeFrom(value); + } + if (diamondIcon_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .Image diamondIcon = 2; + */ + public Builder clearDiamondIcon() { + bitField0_ = (bitField0_ & ~0x00000002); + diamondIcon_ = null; + if (diamondIconBuilder_ != null) { + diamondIconBuilder_.dispose(); + diamondIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image diamondIcon = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getDiamondIconBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDiamondIconFieldBuilder().getBuilder(); + } + /** + * .Image diamondIcon = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDiamondIconOrBuilder() { + if (diamondIconBuilder_ != null) { + return diamondIconBuilder_.getMessageOrBuilder(); + } else { + return diamondIcon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } + } + /** + * .Image diamondIcon = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getDiamondIconFieldBuilder() { + if (diamondIconBuilder_ == null) { + diamondIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getDiamondIcon(), + getParentForChildren(), + isClean()); + diamondIcon_ = null; + } + return diamondIconBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * string name = 3; + * @return The name. + */ + 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 = 3; + * @return The bytes for name. + */ + 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 = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image icon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> iconBuilder_; + /** + * .Image icon = 4; + * @return Whether the icon field is set. + */ + public boolean hasIcon() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .Image icon = 4; + * @return The icon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + if (iconBuilder_ == null) { + return icon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } else { + return iconBuilder_.getMessage(); + } + } + /** + * .Image icon = 4; + */ + public Builder setIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + icon_ = value; + } else { + iconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .Image icon = 4; + */ + public Builder setIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .Image icon = 4; + */ + public Builder mergeIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + icon_ != null && + icon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getIconBuilder().mergeFrom(value); + } else { + icon_ = value; + } + } else { + iconBuilder_.mergeFrom(value); + } + if (icon_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .Image icon = 4; + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00000008); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image icon = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getIconBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getIconFieldBuilder().getBuilder(); + } + /** + * .Image icon = 4; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + if (iconBuilder_ != null) { + return iconBuilder_.getMessageOrBuilder(); + } else { + return icon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + } + /** + * .Image icon = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getIconFieldBuilder() { + if (iconBuilder_ == null) { + iconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getIcon(), + getParentForChildren(), + isClean()); + icon_ = null; + } + return iconBuilder_; + } + + private java.lang.Object nextName_ = ""; + /** + * string nextName = 5; + * @return The nextName. + */ + public java.lang.String getNextName() { + java.lang.Object ref = nextName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string nextName = 5; + * @return The bytes for nextName. + */ + public com.google.protobuf.ByteString + getNextNameBytes() { + java.lang.Object ref = nextName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string nextName = 5; + * @param value The nextName to set. + * @return This builder for chaining. + */ + public Builder setNextName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string nextName = 5; + * @return This builder for chaining. + */ + public Builder clearNextName() { + nextName_ = getDefaultInstance().getNextName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string nextName = 5; + * @param value The bytes for nextName to set. + * @return This builder for chaining. + */ + public Builder setNextNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private long level_ ; + /** + * int64 level = 6; + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + /** + * int64 level = 6; + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(long value) { + + level_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int64 level = 6; + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000020); + level_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image nextIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> nextIconBuilder_; + /** + * .Image nextIcon = 7; + * @return Whether the nextIcon field is set. + */ + public boolean hasNextIcon() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .Image nextIcon = 7; + * @return The nextIcon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNextIcon() { + if (nextIconBuilder_ == null) { + return nextIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } else { + return nextIconBuilder_.getMessage(); + } + } + /** + * .Image nextIcon = 7; + */ + public Builder setNextIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (nextIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextIcon_ = value; + } else { + nextIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .Image nextIcon = 7; + */ + public Builder setNextIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (nextIconBuilder_ == null) { + nextIcon_ = builderForValue.build(); + } else { + nextIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .Image nextIcon = 7; + */ + public Builder mergeNextIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (nextIconBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + nextIcon_ != null && + nextIcon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getNextIconBuilder().mergeFrom(value); + } else { + nextIcon_ = value; + } + } else { + nextIconBuilder_.mergeFrom(value); + } + if (nextIcon_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * .Image nextIcon = 7; + */ + public Builder clearNextIcon() { + bitField0_ = (bitField0_ & ~0x00000040); + nextIcon_ = null; + if (nextIconBuilder_ != null) { + nextIconBuilder_.dispose(); + nextIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image nextIcon = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNextIconBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getNextIconFieldBuilder().getBuilder(); + } + /** + * .Image nextIcon = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNextIconOrBuilder() { + if (nextIconBuilder_ != null) { + return nextIconBuilder_.getMessageOrBuilder(); + } else { + return nextIcon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } + } + /** + * .Image nextIcon = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNextIconFieldBuilder() { + if (nextIconBuilder_ == null) { + nextIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getNextIcon(), + getParentForChildren(), + isClean()); + nextIcon_ = null; + } + return nextIconBuilder_; + } + + private long nextDiamond_ ; + /** + * int64 nextDiamond = 8; + * @return The nextDiamond. + */ + @java.lang.Override + public long getNextDiamond() { + return nextDiamond_; + } + /** + * int64 nextDiamond = 8; + * @param value The nextDiamond to set. + * @return This builder for chaining. + */ + public Builder setNextDiamond(long value) { + + nextDiamond_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * int64 nextDiamond = 8; + * @return This builder for chaining. + */ + public Builder clearNextDiamond() { + bitField0_ = (bitField0_ & ~0x00000080); + nextDiamond_ = 0L; + onChanged(); + return this; + } + + private long nowDiamond_ ; + /** + * int64 nowDiamond = 9; + * @return The nowDiamond. + */ + @java.lang.Override + public long getNowDiamond() { + return nowDiamond_; + } + /** + * int64 nowDiamond = 9; + * @param value The nowDiamond to set. + * @return This builder for chaining. + */ + public Builder setNowDiamond(long value) { + + nowDiamond_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int64 nowDiamond = 9; + * @return This builder for chaining. + */ + public Builder clearNowDiamond() { + bitField0_ = (bitField0_ & ~0x00000100); + nowDiamond_ = 0L; + onChanged(); + return this; + } + + private long thisGradeMinDiamond_ ; + /** + * int64 thisGradeMinDiamond = 10; + * @return The thisGradeMinDiamond. + */ + @java.lang.Override + public long getThisGradeMinDiamond() { + return thisGradeMinDiamond_; + } + /** + * int64 thisGradeMinDiamond = 10; + * @param value The thisGradeMinDiamond to set. + * @return This builder for chaining. + */ + public Builder setThisGradeMinDiamond(long value) { + + thisGradeMinDiamond_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * int64 thisGradeMinDiamond = 10; + * @return This builder for chaining. + */ + public Builder clearThisGradeMinDiamond() { + bitField0_ = (bitField0_ & ~0x00000200); + thisGradeMinDiamond_ = 0L; + onChanged(); + return this; + } + + private long thisGradeMaxDiamond_ ; + /** + * int64 thisGradeMaxDiamond = 11; + * @return The thisGradeMaxDiamond. + */ + @java.lang.Override + public long getThisGradeMaxDiamond() { + return thisGradeMaxDiamond_; + } + /** + * int64 thisGradeMaxDiamond = 11; + * @param value The thisGradeMaxDiamond to set. + * @return This builder for chaining. + */ + public Builder setThisGradeMaxDiamond(long value) { + + thisGradeMaxDiamond_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * int64 thisGradeMaxDiamond = 11; + * @return This builder for chaining. + */ + public Builder clearThisGradeMaxDiamond() { + bitField0_ = (bitField0_ & ~0x00000400); + thisGradeMaxDiamond_ = 0L; + onChanged(); + return this; + } + + private long payDiamondBak_ ; + /** + * int64 payDiamondBak = 12; + * @return The payDiamondBak. + */ + @java.lang.Override + public long getPayDiamondBak() { + return payDiamondBak_; + } + /** + * int64 payDiamondBak = 12; + * @param value The payDiamondBak to set. + * @return This builder for chaining. + */ + public Builder setPayDiamondBak(long value) { + + payDiamondBak_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * int64 payDiamondBak = 12; + * @return This builder for chaining. + */ + public Builder clearPayDiamondBak() { + bitField0_ = (bitField0_ & ~0x00000800); + payDiamondBak_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object gradeDescribe_ = ""; + /** + * string gradeDescribe = 13; + * @return The gradeDescribe. + */ + public java.lang.String getGradeDescribe() { + java.lang.Object ref = gradeDescribe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeDescribe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string gradeDescribe = 13; + * @return The bytes for gradeDescribe. + */ + public com.google.protobuf.ByteString + getGradeDescribeBytes() { + java.lang.Object ref = gradeDescribe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeDescribe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string gradeDescribe = 13; + * @param value The gradeDescribe to set. + * @return This builder for chaining. + */ + public Builder setGradeDescribe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gradeDescribe_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * string gradeDescribe = 13; + * @return This builder for chaining. + */ + public Builder clearGradeDescribe() { + gradeDescribe_ = getDefaultInstance().getGradeDescribe(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * string gradeDescribe = 13; + * @param value The bytes for gradeDescribe to set. + * @return This builder for chaining. + */ + public Builder setGradeDescribeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gradeDescribe_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.util.List gradeIconList_ = + java.util.Collections.emptyList(); + private void ensureGradeIconListIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + gradeIconList_ = new java.util.ArrayList(gradeIconList_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder> gradeIconListBuilder_; + + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public java.util.List getGradeIconListList() { + if (gradeIconListBuilder_ == null) { + return java.util.Collections.unmodifiableList(gradeIconList_); + } else { + return gradeIconListBuilder_.getMessageList(); + } + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public int getGradeIconListCount() { + if (gradeIconListBuilder_ == null) { + return gradeIconList_.size(); + } else { + return gradeIconListBuilder_.getCount(); + } + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getGradeIconList(int index) { + if (gradeIconListBuilder_ == null) { + return gradeIconList_.get(index); + } else { + return gradeIconListBuilder_.getMessage(index); + } + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder setGradeIconList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon value) { + if (gradeIconListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradeIconListIsMutable(); + gradeIconList_.set(index, value); + onChanged(); + } else { + gradeIconListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder setGradeIconList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder builderForValue) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.set(index, builderForValue.build()); + onChanged(); + } else { + gradeIconListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder addGradeIconList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon value) { + if (gradeIconListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradeIconListIsMutable(); + gradeIconList_.add(value); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder addGradeIconList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon value) { + if (gradeIconListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradeIconListIsMutable(); + gradeIconList_.add(index, value); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder addGradeIconList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder builderForValue) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.add(builderForValue.build()); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder addGradeIconList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder builderForValue) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.add(index, builderForValue.build()); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder addAllGradeIconList( + java.lang.Iterable values) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, gradeIconList_); + onChanged(); + } else { + gradeIconListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder clearGradeIconList() { + if (gradeIconListBuilder_ == null) { + gradeIconList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + gradeIconListBuilder_.clear(); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public Builder removeGradeIconList(int index) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.remove(index); + onChanged(); + } else { + gradeIconListBuilder_.remove(index); + } + return this; + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder getGradeIconListBuilder( + int index) { + return getGradeIconListFieldBuilder().getBuilder(index); + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder getGradeIconListOrBuilder( + int index) { + if (gradeIconListBuilder_ == null) { + return gradeIconList_.get(index); } else { + return gradeIconListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public java.util.List + getGradeIconListOrBuilderList() { + if (gradeIconListBuilder_ != null) { + return gradeIconListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(gradeIconList_); + } + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder addGradeIconListBuilder() { + return getGradeIconListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance()); + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder addGradeIconListBuilder( + int index) { + return getGradeIconListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance()); + } + /** + * repeated .User.PayGrade.GradeIcon gradeIconList = 14; + */ + public java.util.List + getGradeIconListBuilderList() { + return getGradeIconListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder> + getGradeIconListFieldBuilder() { + if (gradeIconListBuilder_ == null) { + gradeIconListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder>( + gradeIconList_, + ((bitField0_ & 0x00002000) != 0), + getParentForChildren(), + isClean()); + gradeIconList_ = null; + } + return gradeIconListBuilder_; + } + + private long screenChatType_ ; + /** + * int64 screenChatType = 15; + * @return The screenChatType. + */ + @java.lang.Override + public long getScreenChatType() { + return screenChatType_; + } + /** + * int64 screenChatType = 15; + * @param value The screenChatType to set. + * @return This builder for chaining. + */ + public Builder setScreenChatType(long value) { + + screenChatType_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * int64 screenChatType = 15; + * @return This builder for chaining. + */ + public Builder clearScreenChatType() { + bitField0_ = (bitField0_ & ~0x00004000); + screenChatType_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image imIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imIconBuilder_; + /** + * .Image imIcon = 16; + * @return Whether the imIcon field is set. + */ + public boolean hasImIcon() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * .Image imIcon = 16; + * @return The imIcon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImIcon() { + if (imIconBuilder_ == null) { + return imIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } else { + return imIconBuilder_.getMessage(); + } + } + /** + * .Image imIcon = 16; + */ + public Builder setImIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imIcon_ = value; + } else { + imIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * .Image imIcon = 16; + */ + public Builder setImIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imIconBuilder_ == null) { + imIcon_ = builderForValue.build(); + } else { + imIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * .Image imIcon = 16; + */ + public Builder mergeImIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) && + imIcon_ != null && + imIcon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImIconBuilder().mergeFrom(value); + } else { + imIcon_ = value; + } + } else { + imIconBuilder_.mergeFrom(value); + } + if (imIcon_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * .Image imIcon = 16; + */ + public Builder clearImIcon() { + bitField0_ = (bitField0_ & ~0x00008000); + imIcon_ = null; + if (imIconBuilder_ != null) { + imIconBuilder_.dispose(); + imIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image imIcon = 16; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImIconBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getImIconFieldBuilder().getBuilder(); + } + /** + * .Image imIcon = 16; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconOrBuilder() { + if (imIconBuilder_ != null) { + return imIconBuilder_.getMessageOrBuilder(); + } else { + return imIcon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } + } + /** + * .Image imIcon = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImIconFieldBuilder() { + if (imIconBuilder_ == null) { + imIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImIcon(), + getParentForChildren(), + isClean()); + imIcon_ = null; + } + return imIconBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image imIconWithLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imIconWithLevelBuilder_; + /** + * .Image imIconWithLevel = 17; + * @return Whether the imIconWithLevel field is set. + */ + public boolean hasImIconWithLevel() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * .Image imIconWithLevel = 17; + * @return The imIconWithLevel. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getImIconWithLevel() { + if (imIconWithLevelBuilder_ == null) { + return imIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } else { + return imIconWithLevelBuilder_.getMessage(); + } + } + /** + * .Image imIconWithLevel = 17; + */ + public Builder setImIconWithLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconWithLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imIconWithLevel_ = value; + } else { + imIconWithLevelBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * .Image imIconWithLevel = 17; + */ + public Builder setImIconWithLevel( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imIconWithLevelBuilder_ == null) { + imIconWithLevel_ = builderForValue.build(); + } else { + imIconWithLevelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * .Image imIconWithLevel = 17; + */ + public Builder mergeImIconWithLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconWithLevelBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) && + imIconWithLevel_ != null && + imIconWithLevel_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImIconWithLevelBuilder().mergeFrom(value); + } else { + imIconWithLevel_ = value; + } + } else { + imIconWithLevelBuilder_.mergeFrom(value); + } + if (imIconWithLevel_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * .Image imIconWithLevel = 17; + */ + public Builder clearImIconWithLevel() { + bitField0_ = (bitField0_ & ~0x00010000); + imIconWithLevel_ = null; + if (imIconWithLevelBuilder_ != null) { + imIconWithLevelBuilder_.dispose(); + imIconWithLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image imIconWithLevel = 17; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImIconWithLevelBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getImIconWithLevelFieldBuilder().getBuilder(); + } + /** + * .Image imIconWithLevel = 17; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconWithLevelOrBuilder() { + if (imIconWithLevelBuilder_ != null) { + return imIconWithLevelBuilder_.getMessageOrBuilder(); + } else { + return imIconWithLevel_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } + } + /** + * .Image imIconWithLevel = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImIconWithLevelFieldBuilder() { + if (imIconWithLevelBuilder_ == null) { + imIconWithLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImIconWithLevel(), + getParentForChildren(), + isClean()); + imIconWithLevel_ = null; + } + return imIconWithLevelBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image liveIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> liveIconBuilder_; + /** + * .Image liveIcon = 18; + * @return Whether the liveIcon field is set. + */ + public boolean hasLiveIcon() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * .Image liveIcon = 18; + * @return The liveIcon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getLiveIcon() { + if (liveIconBuilder_ == null) { + return liveIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } else { + return liveIconBuilder_.getMessage(); + } + } + /** + * .Image liveIcon = 18; + */ + public Builder setLiveIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (liveIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + liveIcon_ = value; + } else { + liveIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .Image liveIcon = 18; + */ + public Builder setLiveIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (liveIconBuilder_ == null) { + liveIcon_ = builderForValue.build(); + } else { + liveIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .Image liveIcon = 18; + */ + public Builder mergeLiveIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (liveIconBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + liveIcon_ != null && + liveIcon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getLiveIconBuilder().mergeFrom(value); + } else { + liveIcon_ = value; + } + } else { + liveIconBuilder_.mergeFrom(value); + } + if (liveIcon_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * .Image liveIcon = 18; + */ + public Builder clearLiveIcon() { + bitField0_ = (bitField0_ & ~0x00020000); + liveIcon_ = null; + if (liveIconBuilder_ != null) { + liveIconBuilder_.dispose(); + liveIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image liveIcon = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getLiveIconBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getLiveIconFieldBuilder().getBuilder(); + } + /** + * .Image liveIcon = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getLiveIconOrBuilder() { + if (liveIconBuilder_ != null) { + return liveIconBuilder_.getMessageOrBuilder(); + } else { + return liveIcon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } + } + /** + * .Image liveIcon = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getLiveIconFieldBuilder() { + if (liveIconBuilder_ == null) { + liveIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getLiveIcon(), + getParentForChildren(), + isClean()); + liveIcon_ = null; + } + return liveIconBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image newImIconWithLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> newImIconWithLevelBuilder_; + /** + * .Image newImIconWithLevel = 19; + * @return Whether the newImIconWithLevel field is set. + */ + public boolean hasNewImIconWithLevel() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * .Image newImIconWithLevel = 19; + * @return The newImIconWithLevel. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewImIconWithLevel() { + if (newImIconWithLevelBuilder_ == null) { + return newImIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } else { + return newImIconWithLevelBuilder_.getMessage(); + } + } + /** + * .Image newImIconWithLevel = 19; + */ + public Builder setNewImIconWithLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newImIconWithLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newImIconWithLevel_ = value; + } else { + newImIconWithLevelBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .Image newImIconWithLevel = 19; + */ + public Builder setNewImIconWithLevel( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newImIconWithLevelBuilder_ == null) { + newImIconWithLevel_ = builderForValue.build(); + } else { + newImIconWithLevelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .Image newImIconWithLevel = 19; + */ + public Builder mergeNewImIconWithLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newImIconWithLevelBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + newImIconWithLevel_ != null && + newImIconWithLevel_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getNewImIconWithLevelBuilder().mergeFrom(value); + } else { + newImIconWithLevel_ = value; + } + } else { + newImIconWithLevelBuilder_.mergeFrom(value); + } + if (newImIconWithLevel_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * .Image newImIconWithLevel = 19; + */ + public Builder clearNewImIconWithLevel() { + bitField0_ = (bitField0_ & ~0x00040000); + newImIconWithLevel_ = null; + if (newImIconWithLevelBuilder_ != null) { + newImIconWithLevelBuilder_.dispose(); + newImIconWithLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image newImIconWithLevel = 19; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNewImIconWithLevelBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getNewImIconWithLevelFieldBuilder().getBuilder(); + } + /** + * .Image newImIconWithLevel = 19; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewImIconWithLevelOrBuilder() { + if (newImIconWithLevelBuilder_ != null) { + return newImIconWithLevelBuilder_.getMessageOrBuilder(); + } else { + return newImIconWithLevel_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } + } + /** + * .Image newImIconWithLevel = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewImIconWithLevelFieldBuilder() { + if (newImIconWithLevelBuilder_ == null) { + newImIconWithLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getNewImIconWithLevel(), + getParentForChildren(), + isClean()); + newImIconWithLevel_ = null; + } + return newImIconWithLevelBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image newLiveIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> newLiveIconBuilder_; + /** + * .Image newLiveIcon = 20; + * @return Whether the newLiveIcon field is set. + */ + public boolean hasNewLiveIcon() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * .Image newLiveIcon = 20; + * @return The newLiveIcon. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewLiveIcon() { + if (newLiveIconBuilder_ == null) { + return newLiveIcon_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } else { + return newLiveIconBuilder_.getMessage(); + } + } + /** + * .Image newLiveIcon = 20; + */ + public Builder setNewLiveIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newLiveIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newLiveIcon_ = value; + } else { + newLiveIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .Image newLiveIcon = 20; + */ + public Builder setNewLiveIcon( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newLiveIconBuilder_ == null) { + newLiveIcon_ = builderForValue.build(); + } else { + newLiveIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .Image newLiveIcon = 20; + */ + public Builder mergeNewLiveIcon(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newLiveIconBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) && + newLiveIcon_ != null && + newLiveIcon_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getNewLiveIconBuilder().mergeFrom(value); + } else { + newLiveIcon_ = value; + } + } else { + newLiveIconBuilder_.mergeFrom(value); + } + if (newLiveIcon_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + /** + * .Image newLiveIcon = 20; + */ + public Builder clearNewLiveIcon() { + bitField0_ = (bitField0_ & ~0x00080000); + newLiveIcon_ = null; + if (newLiveIconBuilder_ != null) { + newLiveIconBuilder_.dispose(); + newLiveIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image newLiveIcon = 20; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNewLiveIconBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getNewLiveIconFieldBuilder().getBuilder(); + } + /** + * .Image newLiveIcon = 20; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewLiveIconOrBuilder() { + if (newLiveIconBuilder_ != null) { + return newLiveIconBuilder_.getMessageOrBuilder(); + } else { + return newLiveIcon_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } + } + /** + * .Image newLiveIcon = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewLiveIconFieldBuilder() { + if (newLiveIconBuilder_ == null) { + newLiveIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getNewLiveIcon(), + getParentForChildren(), + isClean()); + newLiveIcon_ = null; + } + return newLiveIconBuilder_; + } + + private long upgradeNeedConsume_ ; + /** + * int64 upgradeNeedConsume = 21; + * @return The upgradeNeedConsume. + */ + @java.lang.Override + public long getUpgradeNeedConsume() { + return upgradeNeedConsume_; + } + /** + * int64 upgradeNeedConsume = 21; + * @param value The upgradeNeedConsume to set. + * @return This builder for chaining. + */ + public Builder setUpgradeNeedConsume(long value) { + + upgradeNeedConsume_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * int64 upgradeNeedConsume = 21; + * @return This builder for chaining. + */ + public Builder clearUpgradeNeedConsume() { + bitField0_ = (bitField0_ & ~0x00100000); + upgradeNeedConsume_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object nextPrivileges_ = ""; + /** + * string nextPrivileges = 22; + * @return The nextPrivileges. + */ + public java.lang.String getNextPrivileges() { + java.lang.Object ref = nextPrivileges_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPrivileges_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string nextPrivileges = 22; + * @return The bytes for nextPrivileges. + */ + public com.google.protobuf.ByteString + getNextPrivilegesBytes() { + java.lang.Object ref = nextPrivileges_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPrivileges_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string nextPrivileges = 22; + * @param value The nextPrivileges to set. + * @return This builder for chaining. + */ + public Builder setNextPrivileges( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPrivileges_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * string nextPrivileges = 22; + * @return This builder for chaining. + */ + public Builder clearNextPrivileges() { + nextPrivileges_ = getDefaultInstance().getNextPrivileges(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * string nextPrivileges = 22; + * @param value The bytes for nextPrivileges to set. + * @return This builder for chaining. + */ + public Builder setNextPrivilegesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPrivileges_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image background_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundBuilder_; + /** + * .Image background = 23; + * @return Whether the background field is set. + */ + public boolean hasBackground() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * .Image background = 23; + * @return The background. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + if (backgroundBuilder_ == null) { + return background_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } else { + return backgroundBuilder_.getMessage(); + } + } + /** + * .Image background = 23; + */ + public Builder setBackground(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + background_ = value; + } else { + backgroundBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .Image background = 23; + */ + public Builder setBackground( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundBuilder_ == null) { + background_ = builderForValue.build(); + } else { + backgroundBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .Image background = 23; + */ + public Builder mergeBackground(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) && + background_ != null && + background_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundBuilder().mergeFrom(value); + } else { + background_ = value; + } + } else { + backgroundBuilder_.mergeFrom(value); + } + if (background_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + /** + * .Image background = 23; + */ + public Builder clearBackground() { + bitField0_ = (bitField0_ & ~0x00400000); + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image background = 23; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getBackgroundFieldBuilder().getBuilder(); + } + /** + * .Image background = 23; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + if (backgroundBuilder_ != null) { + return backgroundBuilder_.getMessageOrBuilder(); + } else { + return background_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + } + /** + * .Image background = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundFieldBuilder() { + if (backgroundBuilder_ == null) { + backgroundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackground(), + getParentForChildren(), + isClean()); + background_ = null; + } + return backgroundBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image backgroundBack_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundBackBuilder_; + /** + * .Image backgroundBack = 24; + * @return Whether the backgroundBack field is set. + */ + public boolean hasBackgroundBack() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * .Image backgroundBack = 24; + * @return The backgroundBack. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundBack() { + if (backgroundBackBuilder_ == null) { + return backgroundBack_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } else { + return backgroundBackBuilder_.getMessage(); + } + } + /** + * .Image backgroundBack = 24; + */ + public Builder setBackgroundBack(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundBack_ = value; + } else { + backgroundBackBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .Image backgroundBack = 24; + */ + public Builder setBackgroundBack( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundBackBuilder_ == null) { + backgroundBack_ = builderForValue.build(); + } else { + backgroundBackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .Image backgroundBack = 24; + */ + public Builder mergeBackgroundBack(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBackBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) && + backgroundBack_ != null && + backgroundBack_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundBackBuilder().mergeFrom(value); + } else { + backgroundBack_ = value; + } + } else { + backgroundBackBuilder_.mergeFrom(value); + } + if (backgroundBack_ != null) { + bitField0_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * .Image backgroundBack = 24; + */ + public Builder clearBackgroundBack() { + bitField0_ = (bitField0_ & ~0x00800000); + backgroundBack_ = null; + if (backgroundBackBuilder_ != null) { + backgroundBackBuilder_.dispose(); + backgroundBackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image backgroundBack = 24; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundBackBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getBackgroundBackFieldBuilder().getBuilder(); + } + /** + * .Image backgroundBack = 24; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundBackOrBuilder() { + if (backgroundBackBuilder_ != null) { + return backgroundBackBuilder_.getMessageOrBuilder(); + } else { + return backgroundBack_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } + } + /** + * .Image backgroundBack = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundBackFieldBuilder() { + if (backgroundBackBuilder_ == null) { + backgroundBackBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundBack(), + getParentForChildren(), + isClean()); + backgroundBack_ = null; + } + return backgroundBackBuilder_; + } + + private long score_ ; + /** + * int64 score = 25; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + /** + * int64 score = 25; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(long value) { + + score_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * int64 score = 25; + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x01000000); + score_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object gradeBanner_ = ""; + /** + *
+         * GradeBuffInfo buffInfo = 26;
+         * 
+ * + * string gradeBanner = 1001; + * @return The gradeBanner. + */ + public java.lang.String getGradeBanner() { + java.lang.Object ref = gradeBanner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeBanner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * GradeBuffInfo buffInfo = 26;
+         * 
+ * + * string gradeBanner = 1001; + * @return The bytes for gradeBanner. + */ + public com.google.protobuf.ByteString + getGradeBannerBytes() { + java.lang.Object ref = gradeBanner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeBanner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * GradeBuffInfo buffInfo = 26;
+         * 
+ * + * string gradeBanner = 1001; + * @param value The gradeBanner to set. + * @return This builder for chaining. + */ + public Builder setGradeBanner( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gradeBanner_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + *
+         * GradeBuffInfo buffInfo = 26;
+         * 
+ * + * string gradeBanner = 1001; + * @return This builder for chaining. + */ + public Builder clearGradeBanner() { + gradeBanner_ = getDefaultInstance().getGradeBanner(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + return this; + } + /** + *
+         * GradeBuffInfo buffInfo = 26;
+         * 
+ * + * string gradeBanner = 1001; + * @param value The bytes for gradeBanner to set. + * @return This builder for chaining. + */ + public Builder setGradeBannerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gradeBanner_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBg_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> profileDialogBgBuilder_; + /** + * .Image profileDialogBg = 1002; + * @return Whether the profileDialogBg field is set. + */ + public boolean hasProfileDialogBg() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * .Image profileDialogBg = 1002; + * @return The profileDialogBg. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBg() { + if (profileDialogBgBuilder_ == null) { + return profileDialogBg_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } else { + return profileDialogBgBuilder_.getMessage(); + } + } + /** + * .Image profileDialogBg = 1002; + */ + public Builder setProfileDialogBg(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileDialogBg_ = value; + } else { + profileDialogBgBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * .Image profileDialogBg = 1002; + */ + public Builder setProfileDialogBg( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (profileDialogBgBuilder_ == null) { + profileDialogBg_ = builderForValue.build(); + } else { + profileDialogBgBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * .Image profileDialogBg = 1002; + */ + public Builder mergeProfileDialogBg(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) && + profileDialogBg_ != null && + profileDialogBg_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getProfileDialogBgBuilder().mergeFrom(value); + } else { + profileDialogBg_ = value; + } + } else { + profileDialogBgBuilder_.mergeFrom(value); + } + if (profileDialogBg_ != null) { + bitField0_ |= 0x04000000; + onChanged(); + } + return this; + } + /** + * .Image profileDialogBg = 1002; + */ + public Builder clearProfileDialogBg() { + bitField0_ = (bitField0_ & ~0x04000000); + profileDialogBg_ = null; + if (profileDialogBgBuilder_ != null) { + profileDialogBgBuilder_.dispose(); + profileDialogBgBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image profileDialogBg = 1002; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getProfileDialogBgBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getProfileDialogBgFieldBuilder().getBuilder(); + } + /** + * .Image profileDialogBg = 1002; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgOrBuilder() { + if (profileDialogBgBuilder_ != null) { + return profileDialogBgBuilder_.getMessageOrBuilder(); + } else { + return profileDialogBg_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } + } + /** + * .Image profileDialogBg = 1002; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getProfileDialogBgFieldBuilder() { + if (profileDialogBgBuilder_ == null) { + profileDialogBgBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getProfileDialogBg(), + getParentForChildren(), + isClean()); + profileDialogBg_ = null; + } + return profileDialogBgBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBgBack_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> profileDialogBgBackBuilder_; + /** + * .Image profileDialogBgBack = 1003; + * @return Whether the profileDialogBgBack field is set. + */ + public boolean hasProfileDialogBgBack() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * .Image profileDialogBgBack = 1003; + * @return The profileDialogBgBack. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBgBack() { + if (profileDialogBgBackBuilder_ == null) { + return profileDialogBgBack_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } else { + return profileDialogBgBackBuilder_.getMessage(); + } + } + /** + * .Image profileDialogBgBack = 1003; + */ + public Builder setProfileDialogBgBack(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileDialogBgBack_ = value; + } else { + profileDialogBgBackBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * .Image profileDialogBgBack = 1003; + */ + public Builder setProfileDialogBgBack( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (profileDialogBgBackBuilder_ == null) { + profileDialogBgBack_ = builderForValue.build(); + } else { + profileDialogBgBackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * .Image profileDialogBgBack = 1003; + */ + public Builder mergeProfileDialogBgBack(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBackBuilder_ == null) { + if (((bitField0_ & 0x08000000) != 0) && + profileDialogBgBack_ != null && + profileDialogBgBack_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getProfileDialogBgBackBuilder().mergeFrom(value); + } else { + profileDialogBgBack_ = value; + } + } else { + profileDialogBgBackBuilder_.mergeFrom(value); + } + if (profileDialogBgBack_ != null) { + bitField0_ |= 0x08000000; + onChanged(); + } + return this; + } + /** + * .Image profileDialogBgBack = 1003; + */ + public Builder clearProfileDialogBgBack() { + bitField0_ = (bitField0_ & ~0x08000000); + profileDialogBgBack_ = null; + if (profileDialogBgBackBuilder_ != null) { + profileDialogBgBackBuilder_.dispose(); + profileDialogBgBackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image profileDialogBgBack = 1003; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getProfileDialogBgBackBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getProfileDialogBgBackFieldBuilder().getBuilder(); + } + /** + * .Image profileDialogBgBack = 1003; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgBackOrBuilder() { + if (profileDialogBgBackBuilder_ != null) { + return profileDialogBgBackBuilder_.getMessageOrBuilder(); + } else { + return profileDialogBgBack_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } + } + /** + * .Image profileDialogBgBack = 1003; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getProfileDialogBgBackFieldBuilder() { + if (profileDialogBgBackBuilder_ == null) { + profileDialogBgBackBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getProfileDialogBgBack(), + getParentForChildren(), + isClean()); + profileDialogBgBack_ = null; + } + return profileDialogBgBackBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.PayGrade) + } + + // @@protoc_insertion_point(class_scope:User.PayGrade) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PayGrade parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PoiInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.PoiInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.PoiInfo} + */ + public static final class PoiInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.PoiInfo) + PoiInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PoiInfo.newBuilder() to construct. + private PoiInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PoiInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PoiInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.PoiInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.PoiInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.PoiInfo) + } + + // @@protoc_insertion_point(class_scope:User.PoiInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PoiInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProfileStyleParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.ProfileStyleParams) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.ProfileStyleParams} + */ + public static final class ProfileStyleParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.ProfileStyleParams) + ProfileStyleParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProfileStyleParams.newBuilder() to construct. + private ProfileStyleParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProfileStyleParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProfileStyleParams(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.ProfileStyleParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.ProfileStyleParams) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.ProfileStyleParams) + } + + // @@protoc_insertion_point(class_scope:User.ProfileStyleParams) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProfileStyleParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SubscribeOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.Subscribe) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.Subscribe} + */ + public static final class Subscribe extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.Subscribe) + SubscribeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Subscribe.newBuilder() to construct. + private Subscribe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Subscribe() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Subscribe(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.Subscribe} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.Subscribe) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.Subscribe) + } + + // @@protoc_insertion_point(class_scope:User.Subscribe) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Subscribe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserAttrOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserAttr) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserAttr} + */ + public static final class UserAttr extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserAttr) + UserAttrOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserAttr.newBuilder() to construct. + private UserAttr(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserAttr() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserAttr(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.UserAttr} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.UserAttr) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserAttr) + } + + // @@protoc_insertion_point(class_scope:User.UserAttr) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserAttr parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserDressInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserDressInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserDressInfo} + */ + public static final class UserDressInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserDressInfo) + UserDressInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserDressInfo.newBuilder() to construct. + private UserDressInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserDressInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserDressInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.UserDressInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.UserDressInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserDressInfo) + } + + // @@protoc_insertion_point(class_scope:User.UserDressInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserDressInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserVIPInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserVIPInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserVIPInfo} + */ + public static final class UserVIPInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserVIPInfo) + UserVIPInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserVIPInfo.newBuilder() to construct. + private UserVIPInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserVIPInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserVIPInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.UserVIPInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.UserVIPInfo) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserVIPInfo) + } + + // @@protoc_insertion_point(class_scope:User.UserVIPInfo) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserVIPInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserStats) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserStats} + */ + public static final class UserStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserStats) + UserStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserStats.newBuilder() to construct. + private UserStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserStats() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.UserStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.UserStats) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserStats) + } + + // @@protoc_insertion_point(class_scope:User.UserStats) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface XiguaParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.XiguaParams) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.XiguaParams} + */ + public static final class XiguaParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.XiguaParams) + XiguaParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use XiguaParams.newBuilder() to construct. + private XiguaParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private XiguaParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new XiguaParams(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User.XiguaParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User.XiguaParams) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.XiguaParams) + } + + // @@protoc_insertion_point(class_scope:User.XiguaParams) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public XiguaParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + private int bitField1_; + public static final int ID_FIELD_NUMBER = 1; + private long id_ = 0L; + /** + * uint64 id = 1; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int SHORTID_FIELD_NUMBER = 2; + private long shortId_ = 0L; + /** + * uint64 shortId = 2; + * @return The shortId. + */ + @java.lang.Override + public long getShortId() { + return shortId_; + } + + public static final int NICKNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object nickname_ = ""; + /** + * string nickname = 3; + * @return The nickname. + */ + @java.lang.Override + 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 nickname = 3; + * @return The bytes for nickname. + */ + @java.lang.Override + 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 GENDER_FIELD_NUMBER = 4; + private int gender_ = 0; + /** + * uint32 gender = 4; + * @return The gender. + */ + @java.lang.Override + public int getGender() { + return gender_; + } + + public static final int SIGNATURE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object signature_ = ""; + /** + * string signature = 5; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + * string signature = 5; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 6; + private int level_ = 0; + /** + * uint32 level = 6; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + + public static final int BIRTHDAY_FIELD_NUMBER = 7; + private long birthday_ = 0L; + /** + * uint64 birthday = 7; + * @return The birthday. + */ + @java.lang.Override + public long getBirthday() { + return birthday_; + } + + public static final int TELEPHONE_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object telephone_ = ""; + /** + * string telephone = 8; + * @return The telephone. + */ + @java.lang.Override + public java.lang.String getTelephone() { + java.lang.Object ref = telephone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + telephone_ = s; + return s; + } + } + /** + * string telephone = 8; + * @return The bytes for telephone. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTelephoneBytes() { + java.lang.Object ref = telephone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + telephone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATARTHUMB_FIELD_NUMBER = 9; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarThumb_; + /** + * .Image avatarThumb = 9; + * @return Whether the avatarThumb field is set. + */ + @java.lang.Override + public boolean hasAvatarThumb() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Image avatarThumb = 9; + * @return The avatarThumb. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarThumb() { + return avatarThumb_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } + /** + * .Image avatarThumb = 9; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarThumbOrBuilder() { + return avatarThumb_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } + + public static final int AVATARMEDIUM_FIELD_NUMBER = 10; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarMedium_; + /** + * .Image avatarMedium = 10; + * @return Whether the avatarMedium field is set. + */ + @java.lang.Override + public boolean hasAvatarMedium() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .Image avatarMedium = 10; + * @return The avatarMedium. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarMedium() { + return avatarMedium_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } + /** + * .Image avatarMedium = 10; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarMediumOrBuilder() { + return avatarMedium_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } + + public static final int AVATARLARGE_FIELD_NUMBER = 11; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarLarge_; + /** + * .Image avatarLarge = 11; + * @return Whether the avatarLarge field is set. + */ + @java.lang.Override + public boolean hasAvatarLarge() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .Image avatarLarge = 11; + * @return The avatarLarge. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarLarge() { + return avatarLarge_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } + /** + * .Image avatarLarge = 11; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarLargeOrBuilder() { + return avatarLarge_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } + + public static final int VERIFIED_FIELD_NUMBER = 12; + private boolean verified_ = false; + /** + * bool verified = 12; + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + + public static final int EXPERIENCE_FIELD_NUMBER = 13; + private int experience_ = 0; + /** + * int32 experience = 13; + * @return The experience. + */ + @java.lang.Override + public int getExperience() { + return experience_; + } + + public static final int CITY_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object city_ = ""; + /** + * string city = 14; + * @return The city. + */ + @java.lang.Override + public java.lang.String getCity() { + java.lang.Object ref = city_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + city_ = s; + return s; + } + } + /** + * string city = 14; + * @return The bytes for city. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCityBytes() { + java.lang.Object ref = city_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + city_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 15; + private int status_ = 0; + /** + * int32 status = 15; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + + public static final int CREATETIME_FIELD_NUMBER = 16; + private long createTime_ = 0L; + /** + * int64 createTime = 16; + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + + public static final int MODIFYTIME_FIELD_NUMBER = 17; + private long modifyTime_ = 0L; + /** + * int64 modifyTime = 17; + * @return The modifyTime. + */ + @java.lang.Override + public long getModifyTime() { + return modifyTime_; + } + + public static final int SECRET_FIELD_NUMBER = 18; + private int secret_ = 0; + /** + * int32 secret = 18; + * @return The secret. + */ + @java.lang.Override + public int getSecret() { + return secret_; + } + + public static final int SHAREQRCODEURI_FIELD_NUMBER = 19; + @SuppressWarnings("serial") + private volatile java.lang.Object shareQrcodeUri_ = ""; + /** + * string shareQrcodeUri = 19; + * @return The shareQrcodeUri. + */ + @java.lang.Override + public java.lang.String getShareQrcodeUri() { + java.lang.Object ref = shareQrcodeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareQrcodeUri_ = s; + return s; + } + } + /** + * string shareQrcodeUri = 19; + * @return The bytes for shareQrcodeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShareQrcodeUriBytes() { + java.lang.Object ref = shareQrcodeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareQrcodeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCOMESHAREPERCENT_FIELD_NUMBER = 20; + private int incomeSharePercent_ = 0; + /** + * int32 incomeSharePercent = 20; + * @return The incomeSharePercent. + */ + @java.lang.Override + public int getIncomeSharePercent() { + return incomeSharePercent_; + } + + public static final int BADGEIMAGELISTLIST_FIELD_NUMBER = 21; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListList_; + /** + * .Image badgeImageListList = 21; + * @return Whether the badgeImageListList field is set. + */ + @java.lang.Override + public boolean hasBadgeImageListList() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .Image badgeImageListList = 21; + * @return The badgeImageListList. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListList() { + return badgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } + /** + * .Image badgeImageListList = 21; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListListOrBuilder() { + return badgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } + + public static final int FOLLOWINFO_FIELD_NUMBER = 22; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo followInfo_; + /** + * .User.FollowInfo followInfo = 22; + * @return Whether the followInfo field is set. + */ + @java.lang.Override + public boolean hasFollowInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .User.FollowInfo followInfo = 22; + * @return The followInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getFollowInfo() { + return followInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } + /** + * .User.FollowInfo followInfo = 22; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder getFollowInfoOrBuilder() { + return followInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } + + public static final int PAYGRADE_FIELD_NUMBER = 23; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade payGrade_; + /** + * .User.PayGrade payGrade = 23; + * @return Whether the payGrade field is set. + */ + @java.lang.Override + public boolean hasPayGrade() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .User.PayGrade payGrade = 23; + * @return The payGrade. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade getPayGrade() { + return payGrade_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } + /** + * .User.PayGrade payGrade = 23; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder getPayGradeOrBuilder() { + return payGrade_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } + + public static final int FANSCLUB_FIELD_NUMBER = 24; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub fansClub_; + /** + * .User.FansClub fansClub = 24; + * @return Whether the fansClub field is set. + */ + @java.lang.Override + public boolean hasFansClub() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .User.FansClub fansClub = 24; + * @return The fansClub. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub getFansClub() { + return fansClub_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } + /** + * .User.FansClub fansClub = 24; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder getFansClubOrBuilder() { + return fansClub_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } + + public static final int BORDER_FIELD_NUMBER = 25; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border border_; + /** + * .User.Border border = 25; + * @return Whether the border field is set. + */ + @java.lang.Override + public boolean hasBorder() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .User.Border border = 25; + * @return The border. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border getBorder() { + return border_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } + /** + * .User.Border border = 25; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder getBorderOrBuilder() { + return border_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } + + public static final int SPECIALID_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private volatile java.lang.Object specialId_ = ""; + /** + * string specialId = 26; + * @return The specialId. + */ + @java.lang.Override + public java.lang.String getSpecialId() { + java.lang.Object ref = specialId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + specialId_ = s; + return s; + } + } + /** + * string specialId = 26; + * @return The bytes for specialId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSpecialIdBytes() { + java.lang.Object ref = specialId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + specialId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATARBORDER_FIELD_NUMBER = 27; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarBorder_; + /** + * .Image avatarBorder = 27; + * @return Whether the avatarBorder field is set. + */ + @java.lang.Override + public boolean hasAvatarBorder() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * .Image avatarBorder = 27; + * @return The avatarBorder. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarBorder() { + return avatarBorder_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } + /** + * .Image avatarBorder = 27; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarBorderOrBuilder() { + return avatarBorder_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } + + public static final int MEDAL_FIELD_NUMBER = 28; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image medal_; + /** + * .Image medal = 28; + * @return Whether the medal field is set. + */ + @java.lang.Override + public boolean hasMedal() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * .Image medal = 28; + * @return The medal. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getMedal() { + return medal_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } + /** + * .Image medal = 28; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMedalOrBuilder() { + return medal_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } + + public static final int REALTIMEICONSLIST_FIELD_NUMBER = 29; + @SuppressWarnings("serial") + private java.util.List realTimeIconsList_; + /** + * repeated .Image realTimeIconsList = 29; + */ + @java.lang.Override + public java.util.List getRealTimeIconsListList() { + return realTimeIconsList_; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + @java.lang.Override + public java.util.List + getRealTimeIconsListOrBuilderList() { + return realTimeIconsList_; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + @java.lang.Override + public int getRealTimeIconsListCount() { + return realTimeIconsList_.size(); + } + /** + * repeated .Image realTimeIconsList = 29; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getRealTimeIconsList(int index) { + return realTimeIconsList_.get(index); + } + /** + * repeated .Image realTimeIconsList = 29; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getRealTimeIconsListOrBuilder( + int index) { + return realTimeIconsList_.get(index); + } + + public static final int NEWREALTIMEICONSLIST_FIELD_NUMBER = 30; + @SuppressWarnings("serial") + private java.util.List newRealTimeIconsList_; + /** + * repeated .Image newRealTimeIconsList = 30; + */ + @java.lang.Override + public java.util.List getNewRealTimeIconsListList() { + return newRealTimeIconsList_; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + @java.lang.Override + public java.util.List + getNewRealTimeIconsListOrBuilderList() { + return newRealTimeIconsList_; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + @java.lang.Override + public int getNewRealTimeIconsListCount() { + return newRealTimeIconsList_.size(); + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewRealTimeIconsList(int index) { + return newRealTimeIconsList_.get(index); + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewRealTimeIconsListOrBuilder( + int index) { + return newRealTimeIconsList_.get(index); + } + + public static final int TOPVIPNO_FIELD_NUMBER = 31; + private long topVipNo_ = 0L; + /** + * int64 topVipNo = 31; + * @return The topVipNo. + */ + @java.lang.Override + public long getTopVipNo() { + return topVipNo_; + } + + public static final int USERATTR_FIELD_NUMBER = 32; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr userAttr_; + /** + * .User.UserAttr userAttr = 32; + * @return Whether the userAttr field is set. + */ + @java.lang.Override + public boolean hasUserAttr() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * .User.UserAttr userAttr = 32; + * @return The userAttr. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr getUserAttr() { + return userAttr_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } + /** + * .User.UserAttr userAttr = 32; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder getUserAttrOrBuilder() { + return userAttr_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } + + public static final int OWNROOM_FIELD_NUMBER = 33; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom ownRoom_; + /** + * .User.OwnRoom ownRoom = 33; + * @return Whether the ownRoom field is set. + */ + @java.lang.Override + public boolean hasOwnRoom() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * .User.OwnRoom ownRoom = 33; + * @return The ownRoom. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getOwnRoom() { + return ownRoom_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } + /** + * .User.OwnRoom ownRoom = 33; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder getOwnRoomOrBuilder() { + return ownRoom_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } + + public static final int PAYSCORE_FIELD_NUMBER = 34; + private long payScore_ = 0L; + /** + * int64 payScore = 34; + * @return The payScore. + */ + @java.lang.Override + public long getPayScore() { + return payScore_; + } + + public static final int TICKETCOUNT_FIELD_NUMBER = 35; + private long ticketCount_ = 0L; + /** + * int64 ticketCount = 35; + * @return The ticketCount. + */ + @java.lang.Override + public long getTicketCount() { + return ticketCount_; + } + + public static final int ANCHORINFO_FIELD_NUMBER = 36; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo anchorInfo_; + /** + * .User.AnchorInfo anchorInfo = 36; + * @return Whether the anchorInfo field is set. + */ + @java.lang.Override + public boolean hasAnchorInfo() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * .User.AnchorInfo anchorInfo = 36; + * @return The anchorInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getAnchorInfo() { + return anchorInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder getAnchorInfoOrBuilder() { + return anchorInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } + + public static final int LINKMICSTATS_FIELD_NUMBER = 37; + private int linkMicStats_ = 0; + /** + * int32 linkMicStats = 37; + * @return The linkMicStats. + */ + @java.lang.Override + public int getLinkMicStats() { + return linkMicStats_; + } + + public static final int DISPLAYID_FIELD_NUMBER = 38; + @SuppressWarnings("serial") + private volatile java.lang.Object displayId_ = ""; + /** + * string displayId = 38; + * @return The displayId. + */ + @java.lang.Override + public java.lang.String getDisplayId() { + java.lang.Object ref = displayId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayId_ = s; + return s; + } + } + /** + * string displayId = 38; + * @return The bytes for displayId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayIdBytes() { + java.lang.Object ref = displayId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WITHCOMMERCEPERMISSION_FIELD_NUMBER = 39; + private boolean withCommercePermission_ = false; + /** + * bool withCommercePermission = 39; + * @return The withCommercePermission. + */ + @java.lang.Override + public boolean getWithCommercePermission() { + return withCommercePermission_; + } + + public static final int WITHFUSIONSHOPENTRY_FIELD_NUMBER = 40; + private boolean withFusionShopEntry_ = false; + /** + * bool withFusionShopEntry = 40; + * @return The withFusionShopEntry. + */ + @java.lang.Override + public boolean getWithFusionShopEntry() { + return withFusionShopEntry_; + } + + public static final int TOTALRECHARGEDIAMONDCOUNT_FIELD_NUMBER = 41; + private long totalRechargeDiamondCount_ = 0L; + /** + * int64 totalRechargeDiamondCount = 41; + * @return The totalRechargeDiamondCount. + */ + @java.lang.Override + public long getTotalRechargeDiamondCount() { + return totalRechargeDiamondCount_; + } + + public static final int WEBCASTANCHORLEVEL_FIELD_NUMBER = 42; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel webcastAnchorLevel_; + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + * @return Whether the webcastAnchorLevel field is set. + */ + @java.lang.Override + public boolean hasWebcastAnchorLevel() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + * @return The webcastAnchorLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getWebcastAnchorLevel() { + return webcastAnchorLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getWebcastAnchorLevelOrBuilder() { + return webcastAnchorLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } + + public static final int VERIFIEDCONTENT_FIELD_NUMBER = 43; + @SuppressWarnings("serial") + private volatile java.lang.Object verifiedContent_ = ""; + /** + * string verifiedContent = 43; + * @return The verifiedContent. + */ + @java.lang.Override + public java.lang.String getVerifiedContent() { + java.lang.Object ref = verifiedContent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedContent_ = s; + return s; + } + } + /** + * string verifiedContent = 43; + * @return The bytes for verifiedContent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerifiedContentBytes() { + java.lang.Object ref = verifiedContent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedContent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHORSTATS_FIELD_NUMBER = 44; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats authorStats_; + /** + * .User.AuthorStats authorStats = 44; + * @return Whether the authorStats field is set. + */ + @java.lang.Override + public boolean hasAuthorStats() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * .User.AuthorStats authorStats = 44; + * @return The authorStats. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getAuthorStats() { + return authorStats_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } + /** + * .User.AuthorStats authorStats = 44; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder getAuthorStatsOrBuilder() { + return authorStats_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } + + public static final int TOPFANSLIST_FIELD_NUMBER = 45; + @SuppressWarnings("serial") + private java.util.List topFansList_; + /** + * repeated .User topFansList = 45; + */ + @java.lang.Override + public java.util.List getTopFansListList() { + return topFansList_; + } + /** + * repeated .User topFansList = 45; + */ + @java.lang.Override + public java.util.List + getTopFansListOrBuilderList() { + return topFansList_; + } + /** + * repeated .User topFansList = 45; + */ + @java.lang.Override + public int getTopFansListCount() { + return topFansList_.size(); + } + /** + * repeated .User topFansList = 45; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getTopFansList(int index) { + return topFansList_.get(index); + } + /** + * repeated .User topFansList = 45; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getTopFansListOrBuilder( + int index) { + return topFansList_.get(index); + } + + public static final int SECUID_FIELD_NUMBER = 46; + @SuppressWarnings("serial") + private volatile java.lang.Object secUid_ = ""; + /** + * string secUid = 46; + * @return The secUid. + */ + @java.lang.Override + public java.lang.String getSecUid() { + java.lang.Object ref = secUid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secUid_ = s; + return s; + } + } + /** + * string secUid = 46; + * @return The bytes for secUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSecUidBytes() { + java.lang.Object ref = secUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + secUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERROLE_FIELD_NUMBER = 47; + private int userRole_ = 0; + /** + * int32 userRole = 47; + * @return The userRole. + */ + @java.lang.Override + public int getUserRole() { + return userRole_; + } + + public static final int XIGUAINFO_FIELD_NUMBER = 48; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams xiguaInfo_; + /** + * .User.XiguaParams xiguaInfo = 48; + * @return Whether the xiguaInfo field is set. + */ + @java.lang.Override + public boolean hasXiguaInfo() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * .User.XiguaParams xiguaInfo = 48; + * @return The xiguaInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getXiguaInfo() { + return xiguaInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder getXiguaInfoOrBuilder() { + return xiguaInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } + + public static final int ACTIVITYREWARD_FIELD_NUMBER = 49; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo activityReward_; + /** + * .User.ActivityInfo activityReward = 49; + * @return Whether the activityReward field is set. + */ + @java.lang.Override + public boolean hasActivityReward() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * .User.ActivityInfo activityReward = 49; + * @return The activityReward. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getActivityReward() { + return activityReward_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } + /** + * .User.ActivityInfo activityReward = 49; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder getActivityRewardOrBuilder() { + return activityReward_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } + + public static final int NOBLEINFO_FIELD_NUMBER = 50; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo nobleInfo_; + /** + * .User.NobleLevelInfo nobleInfo = 50; + * @return Whether the nobleInfo field is set. + */ + @java.lang.Override + public boolean hasNobleInfo() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + * @return The nobleInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getNobleInfo() { + return nobleInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder getNobleInfoOrBuilder() { + return nobleInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } + + public static final int BROTHERHOODINFO_FIELD_NUMBER = 51; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo brotherhoodInfo_; + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + * @return Whether the brotherhoodInfo field is set. + */ + @java.lang.Override + public boolean hasBrotherhoodInfo() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + * @return The brotherhoodInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getBrotherhoodInfo() { + return brotherhoodInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder getBrotherhoodInfoOrBuilder() { + return brotherhoodInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } + + public static final int PERSONALCARD_FIELD_NUMBER = 52; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image personalCard_; + /** + * .Image personalCard = 52; + * @return Whether the personalCard field is set. + */ + @java.lang.Override + public boolean hasPersonalCard() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * .Image personalCard = 52; + * @return The personalCard. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getPersonalCard() { + return personalCard_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } + /** + * .Image personalCard = 52; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getPersonalCardOrBuilder() { + return personalCard_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } + + public static final int AUTHENTICATIONINFO_FIELD_NUMBER = 53; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo authenticationInfo_; + /** + * .User.AuthenticationInfo authenticationInfo = 53; + * @return Whether the authenticationInfo field is set. + */ + @java.lang.Override + public boolean hasAuthenticationInfo() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + * @return The authenticationInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getAuthenticationInfo() { + return authenticationInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { + return authenticationInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + + public static final int AUTHORIZATIONINFO_FIELD_NUMBER = 54; + private int authorizationInfo_ = 0; + /** + * int32 authorizationInfo = 54; + * @return The authorizationInfo. + */ + @java.lang.Override + public int getAuthorizationInfo() { + return authorizationInfo_; + } + + public static final int ADVERSARYAUTHORIZATIONINFO_FIELD_NUMBER = 55; + private int adversaryAuthorizationInfo_ = 0; + /** + * int32 adversaryAuthorizationInfo = 55; + * @return The adversaryAuthorizationInfo. + */ + @java.lang.Override + public int getAdversaryAuthorizationInfo() { + return adversaryAuthorizationInfo_; + } + + public static final int POIINFO_FIELD_NUMBER = 56; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo poiInfo_; + /** + * .User.PoiInfo poiInfo = 56; + * @return Whether the poiInfo field is set. + */ + @java.lang.Override + public boolean hasPoiInfo() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * .User.PoiInfo poiInfo = 56; + * @return The poiInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getPoiInfo() { + return poiInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } + /** + * .User.PoiInfo poiInfo = 56; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder getPoiInfoOrBuilder() { + return poiInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } + + public static final int MEDIABADGEIMAGELISTLIST_FIELD_NUMBER = 57; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image mediaBadgeImageListList_; + /** + * .Image mediaBadgeImageListList = 57; + * @return Whether the mediaBadgeImageListList field is set. + */ + @java.lang.Override + public boolean hasMediaBadgeImageListList() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * .Image mediaBadgeImageListList = 57; + * @return The mediaBadgeImageListList. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getMediaBadgeImageListList() { + return mediaBadgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } + /** + * .Image mediaBadgeImageListList = 57; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMediaBadgeImageListListOrBuilder() { + return mediaBadgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } + + public static final int ADVERSARYUSERSTATUS_FIELD_NUMBER = 58; + private int adversaryUserStatus_ = 0; + /** + * int32 adversaryUserStatus = 58; + * @return The adversaryUserStatus. + */ + @java.lang.Override + public int getAdversaryUserStatus() { + return adversaryUserStatus_; + } + + public static final int USERVIPINFO_FIELD_NUMBER = 59; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo userVipInfo_; + /** + * .User.UserVIPInfo userVipInfo = 59; + * @return Whether the userVipInfo field is set. + */ + @java.lang.Override + public boolean hasUserVipInfo() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * .User.UserVIPInfo userVipInfo = 59; + * @return The userVipInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getUserVipInfo() { + return userVipInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder getUserVipInfoOrBuilder() { + return userVipInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } + + public static final int COMMERCEWEBCASTCONFIGIDSLIST_FIELD_NUMBER = 60; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList commerceWebcastConfigIdsList_ = + emptyLongList(); + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @return A list containing the commerceWebcastConfigIdsList. + */ + @java.lang.Override + public java.util.List + getCommerceWebcastConfigIdsListList() { + return commerceWebcastConfigIdsList_; + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @return The count of commerceWebcastConfigIdsList. + */ + public int getCommerceWebcastConfigIdsListCount() { + return commerceWebcastConfigIdsList_.size(); + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @param index The index of the element to return. + * @return The commerceWebcastConfigIdsList at the given index. + */ + public long getCommerceWebcastConfigIdsList(int index) { + return commerceWebcastConfigIdsList_.getLong(index); + } + private int commerceWebcastConfigIdsListMemoizedSerializedSize = -1; + + public static final int BADGEIMAGELISTV2LIST_FIELD_NUMBER = 61; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListV2List_; + /** + * .Image badgeImageListV2List = 61; + * @return Whether the badgeImageListV2List field is set. + */ + @java.lang.Override + public boolean hasBadgeImageListV2List() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * .Image badgeImageListV2List = 61; + * @return The badgeImageListV2List. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListV2List() { + return badgeImageListV2List_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } + /** + * .Image badgeImageListV2List = 61; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListV2ListOrBuilder() { + return badgeImageListV2List_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } + + public static final int LOCATIONCITY_FIELD_NUMBER = 63; + @SuppressWarnings("serial") + private volatile java.lang.Object locationCity_ = ""; + /** + *
+     * IndustryCertification  industryCertification = 62;
+     * 
+ * + * string locationCity = 63; + * @return The locationCity. + */ + @java.lang.Override + public java.lang.String getLocationCity() { + java.lang.Object ref = locationCity_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationCity_ = s; + return s; + } + } + /** + *
+     * IndustryCertification  industryCertification = 62;
+     * 
+ * + * string locationCity = 63; + * @return The bytes for locationCity. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationCityBytes() { + java.lang.Object ref = locationCity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationCity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FANSGROUPINFO_FIELD_NUMBER = 64; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo fansGroupInfo_; + /** + * .User.FansGroupInfo fansGroupInfo = 64; + * @return Whether the fansGroupInfo field is set. + */ + @java.lang.Override + public boolean hasFansGroupInfo() { + return ((bitField0_ & 0x02000000) != 0); + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + * @return The fansGroupInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getFansGroupInfo() { + return fansGroupInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder getFansGroupInfoOrBuilder() { + return fansGroupInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } + + public static final int REMARKNAME_FIELD_NUMBER = 65; + @SuppressWarnings("serial") + private volatile java.lang.Object remarkName_ = ""; + /** + * string remarkName = 65; + * @return The remarkName. + */ + @java.lang.Override + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } + } + /** + * string remarkName = 65; + * @return The bytes for remarkName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MYSTERYMAN_FIELD_NUMBER = 66; + private int mysteryMan_ = 0; + /** + * int32 mysteryMan = 66; + * @return The mysteryMan. + */ + @java.lang.Override + public int getMysteryMan() { + return mysteryMan_; + } + + public static final int WEBRID_FIELD_NUMBER = 67; + @SuppressWarnings("serial") + private volatile java.lang.Object webRid_ = ""; + /** + * string webRid = 67; + * @return The webRid. + */ + @java.lang.Override + public java.lang.String getWebRid() { + java.lang.Object ref = webRid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webRid_ = s; + return s; + } + } + /** + * string webRid = 67; + * @return The bytes for webRid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWebRidBytes() { + java.lang.Object ref = webRid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webRid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESENSITIZEDNICKNAME_FIELD_NUMBER = 68; + @SuppressWarnings("serial") + private volatile java.lang.Object desensitizedNickname_ = ""; + /** + * string desensitizedNickname = 68; + * @return The desensitizedNickname. + */ + @java.lang.Override + public java.lang.String getDesensitizedNickname() { + java.lang.Object ref = desensitizedNickname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + desensitizedNickname_ = s; + return s; + } + } + /** + * string desensitizedNickname = 68; + * @return The bytes for desensitizedNickname. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDesensitizedNicknameBytes() { + java.lang.Object ref = desensitizedNickname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + desensitizedNickname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JACCREDITINFO_FIELD_NUMBER = 69; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo jAccreditInfo_; + /** + * .User.JAccreditInfo jAccreditInfo = 69; + * @return Whether the jAccreditInfo field is set. + */ + @java.lang.Override + public boolean hasJAccreditInfo() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + * @return The jAccreditInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getJAccreditInfo() { + return jAccreditInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder getJAccreditInfoOrBuilder() { + return jAccreditInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } + + public static final int SUBSCRIBE_FIELD_NUMBER = 70; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe subscribe_; + /** + * .User.Subscribe subscribe = 70; + * @return Whether the subscribe field is set. + */ + @java.lang.Override + public boolean hasSubscribe() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * .User.Subscribe subscribe = 70; + * @return The subscribe. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe getSubscribe() { + return subscribe_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } + /** + * .User.Subscribe subscribe = 70; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder getSubscribeOrBuilder() { + return subscribe_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } + + public static final int ISANONYMOUS_FIELD_NUMBER = 71; + private boolean isAnonymous_ = false; + /** + * bool isAnonymous = 71; + * @return The isAnonymous. + */ + @java.lang.Override + public boolean getIsAnonymous() { + return isAnonymous_; + } + + public static final int CONSUMEDIAMONDLEVEL_FIELD_NUMBER = 72; + private int consumeDiamondLevel_ = 0; + /** + * int32 consumeDiamondLevel = 72; + * @return The consumeDiamondLevel. + */ + @java.lang.Override + public int getConsumeDiamondLevel() { + return consumeDiamondLevel_; + } + + public static final int WEBCASTUID_FIELD_NUMBER = 73; + @SuppressWarnings("serial") + private volatile java.lang.Object webcastUid_ = ""; + /** + * string webcastUid = 73; + * @return The webcastUid. + */ + @java.lang.Override + public java.lang.String getWebcastUid() { + java.lang.Object ref = webcastUid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webcastUid_ = s; + return s; + } + } + /** + * string webcastUid = 73; + * @return The bytes for webcastUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWebcastUidBytes() { + java.lang.Object ref = webcastUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webcastUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROFILESTYLEPARAMS_FIELD_NUMBER = 74; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams profileStyleParams_; + /** + * .User.ProfileStyleParams profileStyleParams = 74; + * @return Whether the profileStyleParams field is set. + */ + @java.lang.Override + public boolean hasProfileStyleParams() { + return ((bitField0_ & 0x10000000) != 0); + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + * @return The profileStyleParams. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getProfileStyleParams() { + return profileStyleParams_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder getProfileStyleParamsOrBuilder() { + return profileStyleParams_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } + + public static final int USERDRESSINFO_FIELD_NUMBER = 75; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo userDressInfo_; + /** + * .User.UserDressInfo userDressInfo = 75; + * @return Whether the userDressInfo field is set. + */ + @java.lang.Override + public boolean hasUserDressInfo() { + return ((bitField0_ & 0x20000000) != 0); + } + /** + * .User.UserDressInfo userDressInfo = 75; + * @return The userDressInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getUserDressInfo() { + return userDressInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder getUserDressInfoOrBuilder() { + return userDressInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } + + public static final int ALLOWBELOCATED_FIELD_NUMBER = 1001; + private boolean allowBeLocated_ = false; + /** + * bool allowBeLocated = 1001; + * @return The allowBeLocated. + */ + @java.lang.Override + public boolean getAllowBeLocated() { + return allowBeLocated_; + } + + public static final int ALLOWFINDBYCONTACTS_FIELD_NUMBER = 1002; + private boolean allowFindByContacts_ = false; + /** + * bool allowFindByContacts = 1002; + * @return The allowFindByContacts. + */ + @java.lang.Override + public boolean getAllowFindByContacts() { + return allowFindByContacts_; + } + + public static final int ALLOWOTHERSDOWNLOADVIDEO_FIELD_NUMBER = 1003; + private boolean allowOthersDownloadVideo_ = false; + /** + * bool allowOthersDownloadVideo = 1003; + * @return The allowOthersDownloadVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadVideo() { + return allowOthersDownloadVideo_; + } + + public static final int ALLOWOTHERSDOWNLOADWHENSHARINGVIDEO_FIELD_NUMBER = 1004; + private boolean allowOthersDownloadWhenSharingVideo_ = false; + /** + * bool allowOthersDownloadWhenSharingVideo = 1004; + * @return The allowOthersDownloadWhenSharingVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadWhenSharingVideo() { + return allowOthersDownloadWhenSharingVideo_; + } + + public static final int ALLOWSHARESHOWPROFILE_FIELD_NUMBER = 1005; + private boolean allowShareShowProfile_ = false; + /** + * bool allowShareShowProfile = 1005; + * @return The allowShareShowProfile. + */ + @java.lang.Override + public boolean getAllowShareShowProfile() { + return allowShareShowProfile_; + } + + public static final int ALLOWSHOWINGOSSIP_FIELD_NUMBER = 1006; + private boolean allowShowInGossip_ = false; + /** + * bool allowShowInGossip = 1006; + * @return The allowShowInGossip. + */ + @java.lang.Override + public boolean getAllowShowInGossip() { + return allowShowInGossip_; + } + + public static final int ALLOWSHOWMYACTION_FIELD_NUMBER = 1007; + private boolean allowShowMyAction_ = false; + /** + * bool allowShowMyAction = 1007; + * @return The allowShowMyAction. + */ + @java.lang.Override + public boolean getAllowShowMyAction() { + return allowShowMyAction_; + } + + public static final int ALLOWSTRANGECOMMENT_FIELD_NUMBER = 1008; + private boolean allowStrangeComment_ = false; + /** + * bool allowStrangeComment = 1008; + * @return The allowStrangeComment. + */ + @java.lang.Override + public boolean getAllowStrangeComment() { + return allowStrangeComment_; + } + + public static final int ALLOWUNFOLLOWERCOMMENT_FIELD_NUMBER = 1009; + private boolean allowUnfollowerComment_ = false; + /** + * bool allowUnfollowerComment = 1009; + * @return The allowUnfollowerComment. + */ + @java.lang.Override + public boolean getAllowUnfollowerComment() { + return allowUnfollowerComment_; + } + + public static final int ALLOWUSELINKMIC_FIELD_NUMBER = 1010; + private boolean allowUseLinkmic_ = false; + /** + * bool allowUseLinkmic = 1010; + * @return The allowUseLinkmic. + */ + @java.lang.Override + public boolean getAllowUseLinkmic() { + return allowUseLinkmic_; + } + + public static final int ANCHORLEVEL_FIELD_NUMBER = 1011; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel anchorLevel_; + /** + * .User.AnchorLevel anchorLevel = 1011; + * @return Whether the anchorLevel field is set. + */ + @java.lang.Override + public boolean hasAnchorLevel() { + return ((bitField0_ & 0x40000000) != 0); + } + /** + * .User.AnchorLevel anchorLevel = 1011; + * @return The anchorLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getAnchorLevel() { + return anchorLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getAnchorLevelOrBuilder() { + return anchorLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } + + public static final int AVATARJPG_FIELD_NUMBER = 1012; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarJpg_; + /** + * .Image avatarJpg = 1012; + * @return Whether the avatarJpg field is set. + */ + @java.lang.Override + public boolean hasAvatarJpg() { + return ((bitField0_ & 0x80000000) != 0); + } + /** + * .Image avatarJpg = 1012; + * @return The avatarJpg. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarJpg() { + return avatarJpg_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } + /** + * .Image avatarJpg = 1012; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarJpgOrBuilder() { + return avatarJpg_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } + + public static final int BGIMGURL_FIELD_NUMBER = 1013; + @SuppressWarnings("serial") + private volatile java.lang.Object bgImgUrl_ = ""; + /** + * string bgImgUrl = 1013; + * @return The bgImgUrl. + */ + @java.lang.Override + public java.lang.String getBgImgUrl() { + java.lang.Object ref = bgImgUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bgImgUrl_ = s; + return s; + } + } + /** + * string bgImgUrl = 1013; + * @return The bytes for bgImgUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBgImgUrlBytes() { + java.lang.Object ref = bgImgUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bgImgUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BIRTHDAYDESCRIPTION_FIELD_NUMBER = 1014; + @SuppressWarnings("serial") + private volatile java.lang.Object birthdayDescription_ = ""; + /** + * string birthdayDescription = 1014; + * @return The birthdayDescription. + */ + @java.lang.Override + public java.lang.String getBirthdayDescription() { + java.lang.Object ref = birthdayDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + birthdayDescription_ = s; + return s; + } + } + /** + * string birthdayDescription = 1014; + * @return The bytes for birthdayDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBirthdayDescriptionBytes() { + java.lang.Object ref = birthdayDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + birthdayDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BIRTHDAYVALID_FIELD_NUMBER = 1015; + private boolean birthdayValid_ = false; + /** + * bool birthdayValid = 1015; + * @return The birthdayValid. + */ + @java.lang.Override + public boolean getBirthdayValid() { + return birthdayValid_; + } + + public static final int BLOCKSTATUS_FIELD_NUMBER = 1016; + private int blockStatus_ = 0; + /** + * int32 blockStatus = 1016; + * @return The blockStatus. + */ + @java.lang.Override + public int getBlockStatus() { + return blockStatus_; + } + + public static final int COMMENTRESTRICT_FIELD_NUMBER = 1017; + private int commentRestrict_ = 0; + /** + * int32 commentRestrict = 1017; + * @return The commentRestrict. + */ + @java.lang.Override + public int getCommentRestrict() { + return commentRestrict_; + } + + public static final int CONSTELLATION_FIELD_NUMBER = 1018; + @SuppressWarnings("serial") + private volatile java.lang.Object constellation_ = ""; + /** + * string constellation = 1018; + * @return The constellation. + */ + @java.lang.Override + public java.lang.String getConstellation() { + java.lang.Object ref = constellation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constellation_ = s; + return s; + } + } + /** + * string constellation = 1018; + * @return The bytes for constellation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConstellationBytes() { + java.lang.Object ref = constellation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + constellation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISABLEICHAT_FIELD_NUMBER = 1019; + private int disableIchat_ = 0; + /** + * int32 disableIchat = 1019; + * @return The disableIchat. + */ + @java.lang.Override + public int getDisableIchat() { + return disableIchat_; + } + + public static final int ENABLEICHATIMG_FIELD_NUMBER = 1020; + private long enableIchatImg_ = 0L; + /** + * int64 enableIchatImg = 1020; + * @return The enableIchatImg. + */ + @java.lang.Override + public long getEnableIchatImg() { + return enableIchatImg_; + } + + public static final int EXP_FIELD_NUMBER = 1021; + private int exp_ = 0; + /** + * int32 exp = 1021; + * @return The exp. + */ + @java.lang.Override + public int getExp() { + return exp_; + } + + public static final int FANTICKETCOUNT_FIELD_NUMBER = 1022; + private long fanTicketCount_ = 0L; + /** + * int64 fanTicketCount = 1022; + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + + public static final int FOLDSTRANGERCHAT_FIELD_NUMBER = 1023; + private boolean foldStrangerChat_ = false; + /** + * bool foldStrangerChat = 1023; + * @return The foldStrangerChat. + */ + @java.lang.Override + public boolean getFoldStrangerChat() { + return foldStrangerChat_; + } + + public static final int FOLLOWSTATUS_FIELD_NUMBER = 1024; + private long followStatus_ = 0L; + /** + * int64 followStatus = 1024; + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + + public static final int HOTSOONVERIFIED_FIELD_NUMBER = 1025; + private boolean hotsoonVerified_ = false; + /** + * bool hotsoonVerified = 1025; + * @return The hotsoonVerified. + */ + @java.lang.Override + public boolean getHotsoonVerified() { + return hotsoonVerified_; + } + + public static final int HOTSOONVERIFIEDREASON_FIELD_NUMBER = 1026; + @SuppressWarnings("serial") + private volatile java.lang.Object hotsoonVerifiedReason_ = ""; + /** + * string hotsoonVerifiedReason = 1026; + * @return The hotsoonVerifiedReason. + */ + @java.lang.Override + public java.lang.String getHotsoonVerifiedReason() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hotsoonVerifiedReason_ = s; + return s; + } + } + /** + * string hotsoonVerifiedReason = 1026; + * @return The bytes for hotsoonVerifiedReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHotsoonVerifiedReasonBytes() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hotsoonVerifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ICHATRESTRICTTYPE_FIELD_NUMBER = 1027; + private int ichatRestrictType_ = 0; + /** + * int32 ichatRestrictType = 1027; + * @return The ichatRestrictType. + */ + @java.lang.Override + public int getIchatRestrictType() { + return ichatRestrictType_; + } + + public static final int IDSTR_FIELD_NUMBER = 1028; + @SuppressWarnings("serial") + private volatile java.lang.Object idStr_ = ""; + /** + * string idStr = 1028; + * @return The idStr. + */ + @java.lang.Override + public java.lang.String getIdStr() { + java.lang.Object ref = idStr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idStr_ = s; + return s; + } + } + /** + * string idStr = 1028; + * @return The bytes for idStr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdStrBytes() { + java.lang.Object ref = idStr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISFOLLOWER_FIELD_NUMBER = 1029; + private boolean isFollower_ = false; + /** + * bool isFollower = 1029; + * @return The isFollower. + */ + @java.lang.Override + public boolean getIsFollower() { + return isFollower_; + } + + public static final int ISFOLLOWING_FIELD_NUMBER = 1030; + private boolean isFollowing_ = false; + /** + * bool isFollowing = 1030; + * @return The isFollowing. + */ + @java.lang.Override + public boolean getIsFollowing() { + return isFollowing_; + } + + public static final int NEEDPROFILEGUIDE_FIELD_NUMBER = 1031; + private boolean needProfileGuide_ = false; + /** + * bool needProfileGuide = 1031; + * @return The needProfileGuide. + */ + @java.lang.Override + public boolean getNeedProfileGuide() { + return needProfileGuide_; + } + + public static final int PAYSCORES_FIELD_NUMBER = 1032; + private long payScores_ = 0L; + /** + * int64 payScores = 1032; + * @return The payScores. + */ + @java.lang.Override + public long getPayScores() { + return payScores_; + } + + public static final int PUSHCOMMENTSTATUS_FIELD_NUMBER = 1033; + private boolean pushCommentStatus_ = false; + /** + * bool pushCommentStatus = 1033; + * @return The pushCommentStatus. + */ + @java.lang.Override + public boolean getPushCommentStatus() { + return pushCommentStatus_; + } + + public static final int PUSHDIGG_FIELD_NUMBER = 1034; + private boolean pushDigg_ = false; + /** + * bool pushDigg = 1034; + * @return The pushDigg. + */ + @java.lang.Override + public boolean getPushDigg() { + return pushDigg_; + } + + public static final int PUSHFOLLOW_FIELD_NUMBER = 1035; + private boolean pushFollow_ = false; + /** + * bool pushFollow = 1035; + * @return The pushFollow. + */ + @java.lang.Override + public boolean getPushFollow() { + return pushFollow_; + } + + public static final int PUSHFRIENDACTION_FIELD_NUMBER = 1036; + private boolean pushFriendAction_ = false; + /** + * bool pushFriendAction = 1036; + * @return The pushFriendAction. + */ + @java.lang.Override + public boolean getPushFriendAction() { + return pushFriendAction_; + } + + public static final int PUSHICHAT_FIELD_NUMBER = 1037; + private boolean pushIchat_ = false; + /** + * bool pushIchat = 1037; + * @return The pushIchat. + */ + @java.lang.Override + public boolean getPushIchat() { + return pushIchat_; + } + + public static final int PUSHSTATUS_FIELD_NUMBER = 1038; + private boolean pushStatus_ = false; + /** + * bool pushStatus = 1038; + * @return The pushStatus. + */ + @java.lang.Override + public boolean getPushStatus() { + return pushStatus_; + } + + public static final int PUSHVIDEOPOST_FIELD_NUMBER = 1039; + private boolean pushVideoPost_ = false; + /** + * bool pushVideoPost = 1039; + * @return The pushVideoPost. + */ + @java.lang.Override + public boolean getPushVideoPost() { + return pushVideoPost_; + } + + public static final int PUSHVIDEORECOMMEND_FIELD_NUMBER = 1040; + private boolean pushVideoRecommend_ = false; + /** + * bool pushVideoRecommend = 1040; + * @return The pushVideoRecommend. + */ + @java.lang.Override + public boolean getPushVideoRecommend() { + return pushVideoRecommend_; + } + + public static final int STATS_FIELD_NUMBER = 1041; + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats stats_; + /** + * .User.UserStats stats = 1041; + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return ((bitField1_ & 0x00000001) != 0); + } + /** + * .User.UserStats stats = 1041; + * @return The stats. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats getStats() { + return stats_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } + /** + * .User.UserStats stats = 1041; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder getStatsOrBuilder() { + return stats_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } + + public static final int VERIFIEDMOBILE_FIELD_NUMBER = 1042; + private boolean verifiedMobile_ = false; + /** + * bool verifiedMobile = 1042; + * @return The verifiedMobile. + */ + @java.lang.Override + public boolean getVerifiedMobile() { + return verifiedMobile_; + } + + public static final int VERIFIEDREASON_FIELD_NUMBER = 1043; + @SuppressWarnings("serial") + private volatile java.lang.Object verifiedReason_ = ""; + /** + * string verifiedReason = 1043; + * @return The verifiedReason. + */ + @java.lang.Override + public java.lang.String getVerifiedReason() { + java.lang.Object ref = verifiedReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedReason_ = s; + return s; + } + } + /** + * string verifiedReason = 1043; + * @return The bytes for verifiedReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerifiedReasonBytes() { + java.lang.Object ref = verifiedReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WITHCARMANAGEMENTPERMISSION_FIELD_NUMBER = 1044; + private boolean withCarManagementPermission_ = false; + /** + * bool withCarManagementPermission = 1044; + * @return The withCarManagementPermission. + */ + @java.lang.Override + public boolean getWithCarManagementPermission() { + return withCarManagementPermission_; + } + + public static final int AGERANGE_FIELD_NUMBER = 1045; + private int ageRange_ = 0; + /** + * int32 ageRange = 1045; + * @return The ageRange. + */ + @java.lang.Override + public int getAgeRange() { + return ageRange_; + } + + public static final int WATCHDURATIONMONTH_FIELD_NUMBER = 1046; + private long watchDurationMonth_ = 0L; + /** + * int64 watchDurationMonth = 1046; + * @return The watchDurationMonth. + */ + @java.lang.Override + public long getWatchDurationMonth() { + return watchDurationMonth_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (id_ != 0L) { + output.writeUInt64(1, id_); + } + if (shortId_ != 0L) { + output.writeUInt64(2, shortId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nickname_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nickname_); + } + if (gender_ != 0) { + output.writeUInt32(4, gender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, signature_); + } + if (level_ != 0) { + output.writeUInt32(6, level_); + } + if (birthday_ != 0L) { + output.writeUInt64(7, birthday_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(telephone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, telephone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(9, getAvatarThumb()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(10, getAvatarMedium()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(11, getAvatarLarge()); + } + if (verified_ != false) { + output.writeBool(12, verified_); + } + if (experience_ != 0) { + output.writeInt32(13, experience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(city_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, city_); + } + if (status_ != 0) { + output.writeInt32(15, status_); + } + if (createTime_ != 0L) { + output.writeInt64(16, createTime_); + } + if (modifyTime_ != 0L) { + output.writeInt64(17, modifyTime_); + } + if (secret_ != 0) { + output.writeInt32(18, secret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareQrcodeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, shareQrcodeUri_); + } + if (incomeSharePercent_ != 0) { + output.writeInt32(20, incomeSharePercent_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(21, getBadgeImageListList()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(22, getFollowInfo()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(23, getPayGrade()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(24, getFansClub()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(25, getBorder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specialId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, specialId_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(27, getAvatarBorder()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(28, getMedal()); + } + for (int i = 0; i < realTimeIconsList_.size(); i++) { + output.writeMessage(29, realTimeIconsList_.get(i)); + } + for (int i = 0; i < newRealTimeIconsList_.size(); i++) { + output.writeMessage(30, newRealTimeIconsList_.get(i)); + } + if (topVipNo_ != 0L) { + output.writeInt64(31, topVipNo_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(32, getUserAttr()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(33, getOwnRoom()); + } + if (payScore_ != 0L) { + output.writeInt64(34, payScore_); + } + if (ticketCount_ != 0L) { + output.writeInt64(35, ticketCount_); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeMessage(36, getAnchorInfo()); + } + if (linkMicStats_ != 0) { + output.writeInt32(37, linkMicStats_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 38, displayId_); + } + if (withCommercePermission_ != false) { + output.writeBool(39, withCommercePermission_); + } + if (withFusionShopEntry_ != false) { + output.writeBool(40, withFusionShopEntry_); + } + if (totalRechargeDiamondCount_ != 0L) { + output.writeInt64(41, totalRechargeDiamondCount_); + } + if (((bitField0_ & 0x00002000) != 0)) { + output.writeMessage(42, getWebcastAnchorLevel()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedContent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 43, verifiedContent_); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeMessage(44, getAuthorStats()); + } + for (int i = 0; i < topFansList_.size(); i++) { + output.writeMessage(45, topFansList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 46, secUid_); + } + if (userRole_ != 0) { + output.writeInt32(47, userRole_); + } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeMessage(48, getXiguaInfo()); + } + if (((bitField0_ & 0x00010000) != 0)) { + output.writeMessage(49, getActivityReward()); + } + if (((bitField0_ & 0x00020000) != 0)) { + output.writeMessage(50, getNobleInfo()); + } + if (((bitField0_ & 0x00040000) != 0)) { + output.writeMessage(51, getBrotherhoodInfo()); + } + if (((bitField0_ & 0x00080000) != 0)) { + output.writeMessage(52, getPersonalCard()); + } + if (((bitField0_ & 0x00100000) != 0)) { + output.writeMessage(53, getAuthenticationInfo()); + } + if (authorizationInfo_ != 0) { + output.writeInt32(54, authorizationInfo_); + } + if (adversaryAuthorizationInfo_ != 0) { + output.writeInt32(55, adversaryAuthorizationInfo_); + } + if (((bitField0_ & 0x00200000) != 0)) { + output.writeMessage(56, getPoiInfo()); + } + if (((bitField0_ & 0x00400000) != 0)) { + output.writeMessage(57, getMediaBadgeImageListList()); + } + if (adversaryUserStatus_ != 0) { + output.writeInt32(58, adversaryUserStatus_); + } + if (((bitField0_ & 0x00800000) != 0)) { + output.writeMessage(59, getUserVipInfo()); + } + if (getCommerceWebcastConfigIdsListList().size() > 0) { + output.writeUInt32NoTag(482); + output.writeUInt32NoTag(commerceWebcastConfigIdsListMemoizedSerializedSize); + } + for (int i = 0; i < commerceWebcastConfigIdsList_.size(); i++) { + output.writeInt64NoTag(commerceWebcastConfigIdsList_.getLong(i)); + } + if (((bitField0_ & 0x01000000) != 0)) { + output.writeMessage(61, getBadgeImageListV2List()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationCity_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 63, locationCity_); + } + if (((bitField0_ & 0x02000000) != 0)) { + output.writeMessage(64, getFansGroupInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 65, remarkName_); + } + if (mysteryMan_ != 0) { + output.writeInt32(66, mysteryMan_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webRid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 67, webRid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(desensitizedNickname_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 68, desensitizedNickname_); + } + if (((bitField0_ & 0x04000000) != 0)) { + output.writeMessage(69, getJAccreditInfo()); + } + if (((bitField0_ & 0x08000000) != 0)) { + output.writeMessage(70, getSubscribe()); + } + if (isAnonymous_ != false) { + output.writeBool(71, isAnonymous_); + } + if (consumeDiamondLevel_ != 0) { + output.writeInt32(72, consumeDiamondLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webcastUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 73, webcastUid_); + } + if (((bitField0_ & 0x10000000) != 0)) { + output.writeMessage(74, getProfileStyleParams()); + } + if (((bitField0_ & 0x20000000) != 0)) { + output.writeMessage(75, getUserDressInfo()); + } + if (allowBeLocated_ != false) { + output.writeBool(1001, allowBeLocated_); + } + if (allowFindByContacts_ != false) { + output.writeBool(1002, allowFindByContacts_); + } + if (allowOthersDownloadVideo_ != false) { + output.writeBool(1003, allowOthersDownloadVideo_); + } + if (allowOthersDownloadWhenSharingVideo_ != false) { + output.writeBool(1004, allowOthersDownloadWhenSharingVideo_); + } + if (allowShareShowProfile_ != false) { + output.writeBool(1005, allowShareShowProfile_); + } + if (allowShowInGossip_ != false) { + output.writeBool(1006, allowShowInGossip_); + } + if (allowShowMyAction_ != false) { + output.writeBool(1007, allowShowMyAction_); + } + if (allowStrangeComment_ != false) { + output.writeBool(1008, allowStrangeComment_); + } + if (allowUnfollowerComment_ != false) { + output.writeBool(1009, allowUnfollowerComment_); + } + if (allowUseLinkmic_ != false) { + output.writeBool(1010, allowUseLinkmic_); + } + if (((bitField0_ & 0x40000000) != 0)) { + output.writeMessage(1011, getAnchorLevel()); + } + if (((bitField0_ & 0x80000000) != 0)) { + output.writeMessage(1012, getAvatarJpg()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bgImgUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1013, bgImgUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(birthdayDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1014, birthdayDescription_); + } + if (birthdayValid_ != false) { + output.writeBool(1015, birthdayValid_); + } + if (blockStatus_ != 0) { + output.writeInt32(1016, blockStatus_); + } + if (commentRestrict_ != 0) { + output.writeInt32(1017, commentRestrict_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constellation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1018, constellation_); + } + if (disableIchat_ != 0) { + output.writeInt32(1019, disableIchat_); + } + if (enableIchatImg_ != 0L) { + output.writeInt64(1020, enableIchatImg_); + } + if (exp_ != 0) { + output.writeInt32(1021, exp_); + } + if (fanTicketCount_ != 0L) { + output.writeInt64(1022, fanTicketCount_); + } + if (foldStrangerChat_ != false) { + output.writeBool(1023, foldStrangerChat_); + } + if (followStatus_ != 0L) { + output.writeInt64(1024, followStatus_); + } + if (hotsoonVerified_ != false) { + output.writeBool(1025, hotsoonVerified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hotsoonVerifiedReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1026, hotsoonVerifiedReason_); + } + if (ichatRestrictType_ != 0) { + output.writeInt32(1027, ichatRestrictType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idStr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1028, idStr_); + } + if (isFollower_ != false) { + output.writeBool(1029, isFollower_); + } + if (isFollowing_ != false) { + output.writeBool(1030, isFollowing_); + } + if (needProfileGuide_ != false) { + output.writeBool(1031, needProfileGuide_); + } + if (payScores_ != 0L) { + output.writeInt64(1032, payScores_); + } + if (pushCommentStatus_ != false) { + output.writeBool(1033, pushCommentStatus_); + } + if (pushDigg_ != false) { + output.writeBool(1034, pushDigg_); + } + if (pushFollow_ != false) { + output.writeBool(1035, pushFollow_); + } + if (pushFriendAction_ != false) { + output.writeBool(1036, pushFriendAction_); + } + if (pushIchat_ != false) { + output.writeBool(1037, pushIchat_); + } + if (pushStatus_ != false) { + output.writeBool(1038, pushStatus_); + } + if (pushVideoPost_ != false) { + output.writeBool(1039, pushVideoPost_); + } + if (pushVideoRecommend_ != false) { + output.writeBool(1040, pushVideoRecommend_); + } + if (((bitField1_ & 0x00000001) != 0)) { + output.writeMessage(1041, getStats()); + } + if (verifiedMobile_ != false) { + output.writeBool(1042, verifiedMobile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1043, verifiedReason_); + } + if (withCarManagementPermission_ != false) { + output.writeBool(1044, withCarManagementPermission_); + } + if (ageRange_ != 0) { + output.writeInt32(1045, ageRange_); + } + if (watchDurationMonth_ != 0L) { + output.writeInt64(1046, watchDurationMonth_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, id_); + } + if (shortId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, shortId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nickname_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nickname_); + } + if (gender_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, gender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, signature_); + } + if (level_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, level_); + } + if (birthday_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(7, birthday_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(telephone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, telephone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getAvatarThumb()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getAvatarMedium()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getAvatarLarge()); + } + if (verified_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, verified_); + } + if (experience_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(13, experience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(city_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, city_); + } + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(15, status_); + } + if (createTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(16, createTime_); + } + if (modifyTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(17, modifyTime_); + } + if (secret_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(18, secret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareQrcodeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, shareQrcodeUri_); + } + if (incomeSharePercent_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(20, incomeSharePercent_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getBadgeImageListList()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, getFollowInfo()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getPayGrade()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getFansClub()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getBorder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specialId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, specialId_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(27, getAvatarBorder()); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(28, getMedal()); + } + for (int i = 0; i < realTimeIconsList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(29, realTimeIconsList_.get(i)); + } + for (int i = 0; i < newRealTimeIconsList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, newRealTimeIconsList_.get(i)); + } + if (topVipNo_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(31, topVipNo_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(32, getUserAttr()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, getOwnRoom()); + } + if (payScore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(34, payScore_); + } + if (ticketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(35, ticketCount_); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(36, getAnchorInfo()); + } + if (linkMicStats_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(37, linkMicStats_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(38, displayId_); + } + if (withCommercePermission_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(39, withCommercePermission_); + } + if (withFusionShopEntry_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(40, withFusionShopEntry_); + } + if (totalRechargeDiamondCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(41, totalRechargeDiamondCount_); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(42, getWebcastAnchorLevel()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedContent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(43, verifiedContent_); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(44, getAuthorStats()); + } + for (int i = 0; i < topFansList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(45, topFansList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(46, secUid_); + } + if (userRole_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(47, userRole_); + } + if (((bitField0_ & 0x00008000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(48, getXiguaInfo()); + } + if (((bitField0_ & 0x00010000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(49, getActivityReward()); + } + if (((bitField0_ & 0x00020000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(50, getNobleInfo()); + } + if (((bitField0_ & 0x00040000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(51, getBrotherhoodInfo()); + } + if (((bitField0_ & 0x00080000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(52, getPersonalCard()); + } + if (((bitField0_ & 0x00100000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(53, getAuthenticationInfo()); + } + if (authorizationInfo_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(54, authorizationInfo_); + } + if (adversaryAuthorizationInfo_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(55, adversaryAuthorizationInfo_); + } + if (((bitField0_ & 0x00200000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(56, getPoiInfo()); + } + if (((bitField0_ & 0x00400000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(57, getMediaBadgeImageListList()); + } + if (adversaryUserStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(58, adversaryUserStatus_); + } + if (((bitField0_ & 0x00800000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(59, getUserVipInfo()); + } + { + int dataSize = 0; + for (int i = 0; i < commerceWebcastConfigIdsList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(commerceWebcastConfigIdsList_.getLong(i)); + } + size += dataSize; + if (!getCommerceWebcastConfigIdsListList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + commerceWebcastConfigIdsListMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x01000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(61, getBadgeImageListV2List()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationCity_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(63, locationCity_); + } + if (((bitField0_ & 0x02000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(64, getFansGroupInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(65, remarkName_); + } + if (mysteryMan_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(66, mysteryMan_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webRid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(67, webRid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(desensitizedNickname_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(68, desensitizedNickname_); + } + if (((bitField0_ & 0x04000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(69, getJAccreditInfo()); + } + if (((bitField0_ & 0x08000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(70, getSubscribe()); + } + if (isAnonymous_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(71, isAnonymous_); + } + if (consumeDiamondLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(72, consumeDiamondLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webcastUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(73, webcastUid_); + } + if (((bitField0_ & 0x10000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(74, getProfileStyleParams()); + } + if (((bitField0_ & 0x20000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(75, getUserDressInfo()); + } + if (allowBeLocated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1001, allowBeLocated_); + } + if (allowFindByContacts_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1002, allowFindByContacts_); + } + if (allowOthersDownloadVideo_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1003, allowOthersDownloadVideo_); + } + if (allowOthersDownloadWhenSharingVideo_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1004, allowOthersDownloadWhenSharingVideo_); + } + if (allowShareShowProfile_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1005, allowShareShowProfile_); + } + if (allowShowInGossip_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1006, allowShowInGossip_); + } + if (allowShowMyAction_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1007, allowShowMyAction_); + } + if (allowStrangeComment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1008, allowStrangeComment_); + } + if (allowUnfollowerComment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1009, allowUnfollowerComment_); + } + if (allowUseLinkmic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1010, allowUseLinkmic_); + } + if (((bitField0_ & 0x40000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1011, getAnchorLevel()); + } + if (((bitField0_ & 0x80000000) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1012, getAvatarJpg()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bgImgUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1013, bgImgUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(birthdayDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1014, birthdayDescription_); + } + if (birthdayValid_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1015, birthdayValid_); + } + if (blockStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1016, blockStatus_); + } + if (commentRestrict_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1017, commentRestrict_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constellation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1018, constellation_); + } + if (disableIchat_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1019, disableIchat_); + } + if (enableIchatImg_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1020, enableIchatImg_); + } + if (exp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1021, exp_); + } + if (fanTicketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1022, fanTicketCount_); + } + if (foldStrangerChat_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1023, foldStrangerChat_); + } + if (followStatus_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1024, followStatus_); + } + if (hotsoonVerified_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1025, hotsoonVerified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hotsoonVerifiedReason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1026, hotsoonVerifiedReason_); + } + if (ichatRestrictType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1027, ichatRestrictType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idStr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1028, idStr_); + } + if (isFollower_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1029, isFollower_); + } + if (isFollowing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1030, isFollowing_); + } + if (needProfileGuide_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1031, needProfileGuide_); + } + if (payScores_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1032, payScores_); + } + if (pushCommentStatus_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1033, pushCommentStatus_); + } + if (pushDigg_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1034, pushDigg_); + } + if (pushFollow_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1035, pushFollow_); + } + if (pushFriendAction_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1036, pushFriendAction_); + } + if (pushIchat_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1037, pushIchat_); + } + if (pushStatus_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1038, pushStatus_); + } + if (pushVideoPost_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1039, pushVideoPost_); + } + if (pushVideoRecommend_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1040, pushVideoRecommend_); + } + if (((bitField1_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1041, getStats()); + } + if (verifiedMobile_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1042, verifiedMobile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedReason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1043, verifiedReason_); + } + if (withCarManagementPermission_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1044, withCarManagementPermission_); + } + if (ageRange_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1045, ageRange_); + } + if (watchDurationMonth_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1046, watchDurationMonth_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User other = (tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User) obj; + + if (getId() + != other.getId()) return false; + if (getShortId() + != other.getShortId()) return false; + if (!getNickname() + .equals(other.getNickname())) return false; + if (getGender() + != other.getGender()) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (getLevel() + != other.getLevel()) return false; + if (getBirthday() + != other.getBirthday()) return false; + if (!getTelephone() + .equals(other.getTelephone())) return false; + if (hasAvatarThumb() != other.hasAvatarThumb()) return false; + if (hasAvatarThumb()) { + if (!getAvatarThumb() + .equals(other.getAvatarThumb())) return false; + } + if (hasAvatarMedium() != other.hasAvatarMedium()) return false; + if (hasAvatarMedium()) { + if (!getAvatarMedium() + .equals(other.getAvatarMedium())) return false; + } + if (hasAvatarLarge() != other.hasAvatarLarge()) return false; + if (hasAvatarLarge()) { + if (!getAvatarLarge() + .equals(other.getAvatarLarge())) return false; + } + if (getVerified() + != other.getVerified()) return false; + if (getExperience() + != other.getExperience()) return false; + if (!getCity() + .equals(other.getCity())) return false; + if (getStatus() + != other.getStatus()) return false; + if (getCreateTime() + != other.getCreateTime()) return false; + if (getModifyTime() + != other.getModifyTime()) return false; + if (getSecret() + != other.getSecret()) return false; + if (!getShareQrcodeUri() + .equals(other.getShareQrcodeUri())) return false; + if (getIncomeSharePercent() + != other.getIncomeSharePercent()) return false; + if (hasBadgeImageListList() != other.hasBadgeImageListList()) return false; + if (hasBadgeImageListList()) { + if (!getBadgeImageListList() + .equals(other.getBadgeImageListList())) return false; + } + if (hasFollowInfo() != other.hasFollowInfo()) return false; + if (hasFollowInfo()) { + if (!getFollowInfo() + .equals(other.getFollowInfo())) return false; + } + if (hasPayGrade() != other.hasPayGrade()) return false; + if (hasPayGrade()) { + if (!getPayGrade() + .equals(other.getPayGrade())) return false; + } + if (hasFansClub() != other.hasFansClub()) return false; + if (hasFansClub()) { + if (!getFansClub() + .equals(other.getFansClub())) return false; + } + if (hasBorder() != other.hasBorder()) return false; + if (hasBorder()) { + if (!getBorder() + .equals(other.getBorder())) return false; + } + if (!getSpecialId() + .equals(other.getSpecialId())) return false; + if (hasAvatarBorder() != other.hasAvatarBorder()) return false; + if (hasAvatarBorder()) { + if (!getAvatarBorder() + .equals(other.getAvatarBorder())) return false; + } + if (hasMedal() != other.hasMedal()) return false; + if (hasMedal()) { + if (!getMedal() + .equals(other.getMedal())) return false; + } + if (!getRealTimeIconsListList() + .equals(other.getRealTimeIconsListList())) return false; + if (!getNewRealTimeIconsListList() + .equals(other.getNewRealTimeIconsListList())) return false; + if (getTopVipNo() + != other.getTopVipNo()) return false; + if (hasUserAttr() != other.hasUserAttr()) return false; + if (hasUserAttr()) { + if (!getUserAttr() + .equals(other.getUserAttr())) return false; + } + if (hasOwnRoom() != other.hasOwnRoom()) return false; + if (hasOwnRoom()) { + if (!getOwnRoom() + .equals(other.getOwnRoom())) return false; + } + if (getPayScore() + != other.getPayScore()) return false; + if (getTicketCount() + != other.getTicketCount()) return false; + if (hasAnchorInfo() != other.hasAnchorInfo()) return false; + if (hasAnchorInfo()) { + if (!getAnchorInfo() + .equals(other.getAnchorInfo())) return false; + } + if (getLinkMicStats() + != other.getLinkMicStats()) return false; + if (!getDisplayId() + .equals(other.getDisplayId())) return false; + if (getWithCommercePermission() + != other.getWithCommercePermission()) return false; + if (getWithFusionShopEntry() + != other.getWithFusionShopEntry()) return false; + if (getTotalRechargeDiamondCount() + != other.getTotalRechargeDiamondCount()) return false; + if (hasWebcastAnchorLevel() != other.hasWebcastAnchorLevel()) return false; + if (hasWebcastAnchorLevel()) { + if (!getWebcastAnchorLevel() + .equals(other.getWebcastAnchorLevel())) return false; + } + if (!getVerifiedContent() + .equals(other.getVerifiedContent())) return false; + if (hasAuthorStats() != other.hasAuthorStats()) return false; + if (hasAuthorStats()) { + if (!getAuthorStats() + .equals(other.getAuthorStats())) return false; + } + if (!getTopFansListList() + .equals(other.getTopFansListList())) return false; + if (!getSecUid() + .equals(other.getSecUid())) return false; + if (getUserRole() + != other.getUserRole()) return false; + if (hasXiguaInfo() != other.hasXiguaInfo()) return false; + if (hasXiguaInfo()) { + if (!getXiguaInfo() + .equals(other.getXiguaInfo())) return false; + } + if (hasActivityReward() != other.hasActivityReward()) return false; + if (hasActivityReward()) { + if (!getActivityReward() + .equals(other.getActivityReward())) return false; + } + if (hasNobleInfo() != other.hasNobleInfo()) return false; + if (hasNobleInfo()) { + if (!getNobleInfo() + .equals(other.getNobleInfo())) return false; + } + if (hasBrotherhoodInfo() != other.hasBrotherhoodInfo()) return false; + if (hasBrotherhoodInfo()) { + if (!getBrotherhoodInfo() + .equals(other.getBrotherhoodInfo())) return false; + } + if (hasPersonalCard() != other.hasPersonalCard()) return false; + if (hasPersonalCard()) { + if (!getPersonalCard() + .equals(other.getPersonalCard())) return false; + } + if (hasAuthenticationInfo() != other.hasAuthenticationInfo()) return false; + if (hasAuthenticationInfo()) { + if (!getAuthenticationInfo() + .equals(other.getAuthenticationInfo())) return false; + } + if (getAuthorizationInfo() + != other.getAuthorizationInfo()) return false; + if (getAdversaryAuthorizationInfo() + != other.getAdversaryAuthorizationInfo()) return false; + if (hasPoiInfo() != other.hasPoiInfo()) return false; + if (hasPoiInfo()) { + if (!getPoiInfo() + .equals(other.getPoiInfo())) return false; + } + if (hasMediaBadgeImageListList() != other.hasMediaBadgeImageListList()) return false; + if (hasMediaBadgeImageListList()) { + if (!getMediaBadgeImageListList() + .equals(other.getMediaBadgeImageListList())) return false; + } + if (getAdversaryUserStatus() + != other.getAdversaryUserStatus()) return false; + if (hasUserVipInfo() != other.hasUserVipInfo()) return false; + if (hasUserVipInfo()) { + if (!getUserVipInfo() + .equals(other.getUserVipInfo())) return false; + } + if (!getCommerceWebcastConfigIdsListList() + .equals(other.getCommerceWebcastConfigIdsListList())) return false; + if (hasBadgeImageListV2List() != other.hasBadgeImageListV2List()) return false; + if (hasBadgeImageListV2List()) { + if (!getBadgeImageListV2List() + .equals(other.getBadgeImageListV2List())) return false; + } + if (!getLocationCity() + .equals(other.getLocationCity())) return false; + if (hasFansGroupInfo() != other.hasFansGroupInfo()) return false; + if (hasFansGroupInfo()) { + if (!getFansGroupInfo() + .equals(other.getFansGroupInfo())) return false; + } + if (!getRemarkName() + .equals(other.getRemarkName())) return false; + if (getMysteryMan() + != other.getMysteryMan()) return false; + if (!getWebRid() + .equals(other.getWebRid())) return false; + if (!getDesensitizedNickname() + .equals(other.getDesensitizedNickname())) return false; + if (hasJAccreditInfo() != other.hasJAccreditInfo()) return false; + if (hasJAccreditInfo()) { + if (!getJAccreditInfo() + .equals(other.getJAccreditInfo())) return false; + } + if (hasSubscribe() != other.hasSubscribe()) return false; + if (hasSubscribe()) { + if (!getSubscribe() + .equals(other.getSubscribe())) return false; + } + if (getIsAnonymous() + != other.getIsAnonymous()) return false; + if (getConsumeDiamondLevel() + != other.getConsumeDiamondLevel()) return false; + if (!getWebcastUid() + .equals(other.getWebcastUid())) return false; + if (hasProfileStyleParams() != other.hasProfileStyleParams()) return false; + if (hasProfileStyleParams()) { + if (!getProfileStyleParams() + .equals(other.getProfileStyleParams())) return false; + } + if (hasUserDressInfo() != other.hasUserDressInfo()) return false; + if (hasUserDressInfo()) { + if (!getUserDressInfo() + .equals(other.getUserDressInfo())) return false; + } + if (getAllowBeLocated() + != other.getAllowBeLocated()) return false; + if (getAllowFindByContacts() + != other.getAllowFindByContacts()) return false; + if (getAllowOthersDownloadVideo() + != other.getAllowOthersDownloadVideo()) return false; + if (getAllowOthersDownloadWhenSharingVideo() + != other.getAllowOthersDownloadWhenSharingVideo()) return false; + if (getAllowShareShowProfile() + != other.getAllowShareShowProfile()) return false; + if (getAllowShowInGossip() + != other.getAllowShowInGossip()) return false; + if (getAllowShowMyAction() + != other.getAllowShowMyAction()) return false; + if (getAllowStrangeComment() + != other.getAllowStrangeComment()) return false; + if (getAllowUnfollowerComment() + != other.getAllowUnfollowerComment()) return false; + if (getAllowUseLinkmic() + != other.getAllowUseLinkmic()) return false; + if (hasAnchorLevel() != other.hasAnchorLevel()) return false; + if (hasAnchorLevel()) { + if (!getAnchorLevel() + .equals(other.getAnchorLevel())) return false; + } + if (hasAvatarJpg() != other.hasAvatarJpg()) return false; + if (hasAvatarJpg()) { + if (!getAvatarJpg() + .equals(other.getAvatarJpg())) return false; + } + if (!getBgImgUrl() + .equals(other.getBgImgUrl())) return false; + if (!getBirthdayDescription() + .equals(other.getBirthdayDescription())) return false; + if (getBirthdayValid() + != other.getBirthdayValid()) return false; + if (getBlockStatus() + != other.getBlockStatus()) return false; + if (getCommentRestrict() + != other.getCommentRestrict()) return false; + if (!getConstellation() + .equals(other.getConstellation())) return false; + if (getDisableIchat() + != other.getDisableIchat()) return false; + if (getEnableIchatImg() + != other.getEnableIchatImg()) return false; + if (getExp() + != other.getExp()) return false; + if (getFanTicketCount() + != other.getFanTicketCount()) return false; + if (getFoldStrangerChat() + != other.getFoldStrangerChat()) return false; + if (getFollowStatus() + != other.getFollowStatus()) return false; + if (getHotsoonVerified() + != other.getHotsoonVerified()) return false; + if (!getHotsoonVerifiedReason() + .equals(other.getHotsoonVerifiedReason())) return false; + if (getIchatRestrictType() + != other.getIchatRestrictType()) return false; + if (!getIdStr() + .equals(other.getIdStr())) return false; + if (getIsFollower() + != other.getIsFollower()) return false; + if (getIsFollowing() + != other.getIsFollowing()) return false; + if (getNeedProfileGuide() + != other.getNeedProfileGuide()) return false; + if (getPayScores() + != other.getPayScores()) return false; + if (getPushCommentStatus() + != other.getPushCommentStatus()) return false; + if (getPushDigg() + != other.getPushDigg()) return false; + if (getPushFollow() + != other.getPushFollow()) return false; + if (getPushFriendAction() + != other.getPushFriendAction()) return false; + if (getPushIchat() + != other.getPushIchat()) return false; + if (getPushStatus() + != other.getPushStatus()) return false; + if (getPushVideoPost() + != other.getPushVideoPost()) return false; + if (getPushVideoRecommend() + != other.getPushVideoRecommend()) return false; + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats() + .equals(other.getStats())) return false; + } + if (getVerifiedMobile() + != other.getVerifiedMobile()) return false; + if (!getVerifiedReason() + .equals(other.getVerifiedReason())) return false; + if (getWithCarManagementPermission() + != other.getWithCarManagementPermission()) return false; + if (getAgeRange() + != other.getAgeRange()) return false; + if (getWatchDurationMonth() + != other.getWatchDurationMonth()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + SHORTID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getShortId()); + hash = (37 * hash) + NICKNAME_FIELD_NUMBER; + hash = (53 * hash) + getNickname().hashCode(); + hash = (37 * hash) + GENDER_FIELD_NUMBER; + hash = (53 * hash) + getGender(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getLevel(); + hash = (37 * hash) + BIRTHDAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBirthday()); + hash = (37 * hash) + TELEPHONE_FIELD_NUMBER; + hash = (53 * hash) + getTelephone().hashCode(); + if (hasAvatarThumb()) { + hash = (37 * hash) + AVATARTHUMB_FIELD_NUMBER; + hash = (53 * hash) + getAvatarThumb().hashCode(); + } + if (hasAvatarMedium()) { + hash = (37 * hash) + AVATARMEDIUM_FIELD_NUMBER; + hash = (53 * hash) + getAvatarMedium().hashCode(); + } + if (hasAvatarLarge()) { + hash = (37 * hash) + AVATARLARGE_FIELD_NUMBER; + hash = (53 * hash) + getAvatarLarge().hashCode(); + } + hash = (37 * hash) + VERIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerified()); + hash = (37 * hash) + EXPERIENCE_FIELD_NUMBER; + hash = (53 * hash) + getExperience(); + hash = (37 * hash) + CITY_FIELD_NUMBER; + hash = (53 * hash) + getCity().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (37 * hash) + CREATETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCreateTime()); + hash = (37 * hash) + MODIFYTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getModifyTime()); + hash = (37 * hash) + SECRET_FIELD_NUMBER; + hash = (53 * hash) + getSecret(); + hash = (37 * hash) + SHAREQRCODEURI_FIELD_NUMBER; + hash = (53 * hash) + getShareQrcodeUri().hashCode(); + hash = (37 * hash) + INCOMESHAREPERCENT_FIELD_NUMBER; + hash = (53 * hash) + getIncomeSharePercent(); + if (hasBadgeImageListList()) { + hash = (37 * hash) + BADGEIMAGELISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getBadgeImageListList().hashCode(); + } + if (hasFollowInfo()) { + hash = (37 * hash) + FOLLOWINFO_FIELD_NUMBER; + hash = (53 * hash) + getFollowInfo().hashCode(); + } + if (hasPayGrade()) { + hash = (37 * hash) + PAYGRADE_FIELD_NUMBER; + hash = (53 * hash) + getPayGrade().hashCode(); + } + if (hasFansClub()) { + hash = (37 * hash) + FANSCLUB_FIELD_NUMBER; + hash = (53 * hash) + getFansClub().hashCode(); + } + if (hasBorder()) { + hash = (37 * hash) + BORDER_FIELD_NUMBER; + hash = (53 * hash) + getBorder().hashCode(); + } + hash = (37 * hash) + SPECIALID_FIELD_NUMBER; + hash = (53 * hash) + getSpecialId().hashCode(); + if (hasAvatarBorder()) { + hash = (37 * hash) + AVATARBORDER_FIELD_NUMBER; + hash = (53 * hash) + getAvatarBorder().hashCode(); + } + if (hasMedal()) { + hash = (37 * hash) + MEDAL_FIELD_NUMBER; + hash = (53 * hash) + getMedal().hashCode(); + } + if (getRealTimeIconsListCount() > 0) { + hash = (37 * hash) + REALTIMEICONSLIST_FIELD_NUMBER; + hash = (53 * hash) + getRealTimeIconsListList().hashCode(); + } + if (getNewRealTimeIconsListCount() > 0) { + hash = (37 * hash) + NEWREALTIMEICONSLIST_FIELD_NUMBER; + hash = (53 * hash) + getNewRealTimeIconsListList().hashCode(); + } + hash = (37 * hash) + TOPVIPNO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTopVipNo()); + if (hasUserAttr()) { + hash = (37 * hash) + USERATTR_FIELD_NUMBER; + hash = (53 * hash) + getUserAttr().hashCode(); + } + if (hasOwnRoom()) { + hash = (37 * hash) + OWNROOM_FIELD_NUMBER; + hash = (53 * hash) + getOwnRoom().hashCode(); + } + hash = (37 * hash) + PAYSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPayScore()); + hash = (37 * hash) + TICKETCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTicketCount()); + if (hasAnchorInfo()) { + hash = (37 * hash) + ANCHORINFO_FIELD_NUMBER; + hash = (53 * hash) + getAnchorInfo().hashCode(); + } + hash = (37 * hash) + LINKMICSTATS_FIELD_NUMBER; + hash = (53 * hash) + getLinkMicStats(); + hash = (37 * hash) + DISPLAYID_FIELD_NUMBER; + hash = (53 * hash) + getDisplayId().hashCode(); + hash = (37 * hash) + WITHCOMMERCEPERMISSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithCommercePermission()); + hash = (37 * hash) + WITHFUSIONSHOPENTRY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithFusionShopEntry()); + hash = (37 * hash) + TOTALRECHARGEDIAMONDCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalRechargeDiamondCount()); + if (hasWebcastAnchorLevel()) { + hash = (37 * hash) + WEBCASTANCHORLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getWebcastAnchorLevel().hashCode(); + } + hash = (37 * hash) + VERIFIEDCONTENT_FIELD_NUMBER; + hash = (53 * hash) + getVerifiedContent().hashCode(); + if (hasAuthorStats()) { + hash = (37 * hash) + AUTHORSTATS_FIELD_NUMBER; + hash = (53 * hash) + getAuthorStats().hashCode(); + } + if (getTopFansListCount() > 0) { + hash = (37 * hash) + TOPFANSLIST_FIELD_NUMBER; + hash = (53 * hash) + getTopFansListList().hashCode(); + } + hash = (37 * hash) + SECUID_FIELD_NUMBER; + hash = (53 * hash) + getSecUid().hashCode(); + hash = (37 * hash) + USERROLE_FIELD_NUMBER; + hash = (53 * hash) + getUserRole(); + if (hasXiguaInfo()) { + hash = (37 * hash) + XIGUAINFO_FIELD_NUMBER; + hash = (53 * hash) + getXiguaInfo().hashCode(); + } + if (hasActivityReward()) { + hash = (37 * hash) + ACTIVITYREWARD_FIELD_NUMBER; + hash = (53 * hash) + getActivityReward().hashCode(); + } + if (hasNobleInfo()) { + hash = (37 * hash) + NOBLEINFO_FIELD_NUMBER; + hash = (53 * hash) + getNobleInfo().hashCode(); + } + if (hasBrotherhoodInfo()) { + hash = (37 * hash) + BROTHERHOODINFO_FIELD_NUMBER; + hash = (53 * hash) + getBrotherhoodInfo().hashCode(); + } + if (hasPersonalCard()) { + hash = (37 * hash) + PERSONALCARD_FIELD_NUMBER; + hash = (53 * hash) + getPersonalCard().hashCode(); + } + if (hasAuthenticationInfo()) { + hash = (37 * hash) + AUTHENTICATIONINFO_FIELD_NUMBER; + hash = (53 * hash) + getAuthenticationInfo().hashCode(); + } + hash = (37 * hash) + AUTHORIZATIONINFO_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationInfo(); + hash = (37 * hash) + ADVERSARYAUTHORIZATIONINFO_FIELD_NUMBER; + hash = (53 * hash) + getAdversaryAuthorizationInfo(); + if (hasPoiInfo()) { + hash = (37 * hash) + POIINFO_FIELD_NUMBER; + hash = (53 * hash) + getPoiInfo().hashCode(); + } + if (hasMediaBadgeImageListList()) { + hash = (37 * hash) + MEDIABADGEIMAGELISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getMediaBadgeImageListList().hashCode(); + } + hash = (37 * hash) + ADVERSARYUSERSTATUS_FIELD_NUMBER; + hash = (53 * hash) + getAdversaryUserStatus(); + if (hasUserVipInfo()) { + hash = (37 * hash) + USERVIPINFO_FIELD_NUMBER; + hash = (53 * hash) + getUserVipInfo().hashCode(); + } + if (getCommerceWebcastConfigIdsListCount() > 0) { + hash = (37 * hash) + COMMERCEWEBCASTCONFIGIDSLIST_FIELD_NUMBER; + hash = (53 * hash) + getCommerceWebcastConfigIdsListList().hashCode(); + } + if (hasBadgeImageListV2List()) { + hash = (37 * hash) + BADGEIMAGELISTV2LIST_FIELD_NUMBER; + hash = (53 * hash) + getBadgeImageListV2List().hashCode(); + } + hash = (37 * hash) + LOCATIONCITY_FIELD_NUMBER; + hash = (53 * hash) + getLocationCity().hashCode(); + if (hasFansGroupInfo()) { + hash = (37 * hash) + FANSGROUPINFO_FIELD_NUMBER; + hash = (53 * hash) + getFansGroupInfo().hashCode(); + } + hash = (37 * hash) + REMARKNAME_FIELD_NUMBER; + hash = (53 * hash) + getRemarkName().hashCode(); + hash = (37 * hash) + MYSTERYMAN_FIELD_NUMBER; + hash = (53 * hash) + getMysteryMan(); + hash = (37 * hash) + WEBRID_FIELD_NUMBER; + hash = (53 * hash) + getWebRid().hashCode(); + hash = (37 * hash) + DESENSITIZEDNICKNAME_FIELD_NUMBER; + hash = (53 * hash) + getDesensitizedNickname().hashCode(); + if (hasJAccreditInfo()) { + hash = (37 * hash) + JACCREDITINFO_FIELD_NUMBER; + hash = (53 * hash) + getJAccreditInfo().hashCode(); + } + if (hasSubscribe()) { + hash = (37 * hash) + SUBSCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getSubscribe().hashCode(); + } + hash = (37 * hash) + ISANONYMOUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsAnonymous()); + hash = (37 * hash) + CONSUMEDIAMONDLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getConsumeDiamondLevel(); + hash = (37 * hash) + WEBCASTUID_FIELD_NUMBER; + hash = (53 * hash) + getWebcastUid().hashCode(); + if (hasProfileStyleParams()) { + hash = (37 * hash) + PROFILESTYLEPARAMS_FIELD_NUMBER; + hash = (53 * hash) + getProfileStyleParams().hashCode(); + } + if (hasUserDressInfo()) { + hash = (37 * hash) + USERDRESSINFO_FIELD_NUMBER; + hash = (53 * hash) + getUserDressInfo().hashCode(); + } + hash = (37 * hash) + ALLOWBELOCATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowBeLocated()); + hash = (37 * hash) + ALLOWFINDBYCONTACTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowFindByContacts()); + hash = (37 * hash) + ALLOWOTHERSDOWNLOADVIDEO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowOthersDownloadVideo()); + hash = (37 * hash) + ALLOWOTHERSDOWNLOADWHENSHARINGVIDEO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowOthersDownloadWhenSharingVideo()); + hash = (37 * hash) + ALLOWSHARESHOWPROFILE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowShareShowProfile()); + hash = (37 * hash) + ALLOWSHOWINGOSSIP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowShowInGossip()); + hash = (37 * hash) + ALLOWSHOWMYACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowShowMyAction()); + hash = (37 * hash) + ALLOWSTRANGECOMMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowStrangeComment()); + hash = (37 * hash) + ALLOWUNFOLLOWERCOMMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowUnfollowerComment()); + hash = (37 * hash) + ALLOWUSELINKMIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowUseLinkmic()); + if (hasAnchorLevel()) { + hash = (37 * hash) + ANCHORLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getAnchorLevel().hashCode(); + } + if (hasAvatarJpg()) { + hash = (37 * hash) + AVATARJPG_FIELD_NUMBER; + hash = (53 * hash) + getAvatarJpg().hashCode(); + } + hash = (37 * hash) + BGIMGURL_FIELD_NUMBER; + hash = (53 * hash) + getBgImgUrl().hashCode(); + hash = (37 * hash) + BIRTHDAYDESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getBirthdayDescription().hashCode(); + hash = (37 * hash) + BIRTHDAYVALID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBirthdayValid()); + hash = (37 * hash) + BLOCKSTATUS_FIELD_NUMBER; + hash = (53 * hash) + getBlockStatus(); + hash = (37 * hash) + COMMENTRESTRICT_FIELD_NUMBER; + hash = (53 * hash) + getCommentRestrict(); + hash = (37 * hash) + CONSTELLATION_FIELD_NUMBER; + hash = (53 * hash) + getConstellation().hashCode(); + hash = (37 * hash) + DISABLEICHAT_FIELD_NUMBER; + hash = (53 * hash) + getDisableIchat(); + hash = (37 * hash) + ENABLEICHATIMG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEnableIchatImg()); + hash = (37 * hash) + EXP_FIELD_NUMBER; + hash = (53 * hash) + getExp(); + hash = (37 * hash) + FANTICKETCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFanTicketCount()); + hash = (37 * hash) + FOLDSTRANGERCHAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFoldStrangerChat()); + hash = (37 * hash) + FOLLOWSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowStatus()); + hash = (37 * hash) + HOTSOONVERIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHotsoonVerified()); + hash = (37 * hash) + HOTSOONVERIFIEDREASON_FIELD_NUMBER; + hash = (53 * hash) + getHotsoonVerifiedReason().hashCode(); + hash = (37 * hash) + ICHATRESTRICTTYPE_FIELD_NUMBER; + hash = (53 * hash) + getIchatRestrictType(); + hash = (37 * hash) + IDSTR_FIELD_NUMBER; + hash = (53 * hash) + getIdStr().hashCode(); + hash = (37 * hash) + ISFOLLOWER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFollower()); + hash = (37 * hash) + ISFOLLOWING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFollowing()); + hash = (37 * hash) + NEEDPROFILEGUIDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedProfileGuide()); + hash = (37 * hash) + PAYSCORES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPayScores()); + hash = (37 * hash) + PUSHCOMMENTSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushCommentStatus()); + hash = (37 * hash) + PUSHDIGG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushDigg()); + hash = (37 * hash) + PUSHFOLLOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushFollow()); + hash = (37 * hash) + PUSHFRIENDACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushFriendAction()); + hash = (37 * hash) + PUSHICHAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushIchat()); + hash = (37 * hash) + PUSHSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushStatus()); + hash = (37 * hash) + PUSHVIDEOPOST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushVideoPost()); + hash = (37 * hash) + PUSHVIDEORECOMMEND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushVideoRecommend()); + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + hash = (37 * hash) + VERIFIEDMOBILE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerifiedMobile()); + hash = (37 * hash) + VERIFIEDREASON_FIELD_NUMBER; + hash = (53 * hash) + getVerifiedReason().hashCode(); + hash = (37 * hash) + WITHCARMANAGEMENTPERMISSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithCarManagementPermission()); + hash = (37 * hash) + AGERANGE_FIELD_NUMBER; + hash = (53 * hash) + getAgeRange(); + hash = (37 * hash) + WATCHDURATIONMONTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWatchDurationMonth()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User 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 tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 User} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:User) + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.class, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAvatarThumbFieldBuilder(); + getAvatarMediumFieldBuilder(); + getAvatarLargeFieldBuilder(); + getBadgeImageListListFieldBuilder(); + getFollowInfoFieldBuilder(); + getPayGradeFieldBuilder(); + getFansClubFieldBuilder(); + getBorderFieldBuilder(); + getAvatarBorderFieldBuilder(); + getMedalFieldBuilder(); + getRealTimeIconsListFieldBuilder(); + getNewRealTimeIconsListFieldBuilder(); + getUserAttrFieldBuilder(); + getOwnRoomFieldBuilder(); + getAnchorInfoFieldBuilder(); + getWebcastAnchorLevelFieldBuilder(); + getAuthorStatsFieldBuilder(); + getTopFansListFieldBuilder(); + getXiguaInfoFieldBuilder(); + getActivityRewardFieldBuilder(); + getNobleInfoFieldBuilder(); + getBrotherhoodInfoFieldBuilder(); + getPersonalCardFieldBuilder(); + getAuthenticationInfoFieldBuilder(); + getPoiInfoFieldBuilder(); + getMediaBadgeImageListListFieldBuilder(); + getUserVipInfoFieldBuilder(); + getBadgeImageListV2ListFieldBuilder(); + getFansGroupInfoFieldBuilder(); + getJAccreditInfoFieldBuilder(); + getSubscribeFieldBuilder(); + getProfileStyleParamsFieldBuilder(); + getUserDressInfoFieldBuilder(); + getAnchorLevelFieldBuilder(); + getAvatarJpgFieldBuilder(); + getStatsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + bitField2_ = 0; + bitField3_ = 0; + id_ = 0L; + shortId_ = 0L; + nickname_ = ""; + gender_ = 0; + signature_ = ""; + level_ = 0; + birthday_ = 0L; + telephone_ = ""; + avatarThumb_ = null; + if (avatarThumbBuilder_ != null) { + avatarThumbBuilder_.dispose(); + avatarThumbBuilder_ = null; + } + avatarMedium_ = null; + if (avatarMediumBuilder_ != null) { + avatarMediumBuilder_.dispose(); + avatarMediumBuilder_ = null; + } + avatarLarge_ = null; + if (avatarLargeBuilder_ != null) { + avatarLargeBuilder_.dispose(); + avatarLargeBuilder_ = null; + } + verified_ = false; + experience_ = 0; + city_ = ""; + status_ = 0; + createTime_ = 0L; + modifyTime_ = 0L; + secret_ = 0; + shareQrcodeUri_ = ""; + incomeSharePercent_ = 0; + badgeImageListList_ = null; + if (badgeImageListListBuilder_ != null) { + badgeImageListListBuilder_.dispose(); + badgeImageListListBuilder_ = null; + } + followInfo_ = null; + if (followInfoBuilder_ != null) { + followInfoBuilder_.dispose(); + followInfoBuilder_ = null; + } + payGrade_ = null; + if (payGradeBuilder_ != null) { + payGradeBuilder_.dispose(); + payGradeBuilder_ = null; + } + fansClub_ = null; + if (fansClubBuilder_ != null) { + fansClubBuilder_.dispose(); + fansClubBuilder_ = null; + } + border_ = null; + if (borderBuilder_ != null) { + borderBuilder_.dispose(); + borderBuilder_ = null; + } + specialId_ = ""; + avatarBorder_ = null; + if (avatarBorderBuilder_ != null) { + avatarBorderBuilder_.dispose(); + avatarBorderBuilder_ = null; + } + medal_ = null; + if (medalBuilder_ != null) { + medalBuilder_.dispose(); + medalBuilder_ = null; + } + if (realTimeIconsListBuilder_ == null) { + realTimeIconsList_ = java.util.Collections.emptyList(); + } else { + realTimeIconsList_ = null; + realTimeIconsListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x10000000); + if (newRealTimeIconsListBuilder_ == null) { + newRealTimeIconsList_ = java.util.Collections.emptyList(); + } else { + newRealTimeIconsList_ = null; + newRealTimeIconsListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x20000000); + topVipNo_ = 0L; + userAttr_ = null; + if (userAttrBuilder_ != null) { + userAttrBuilder_.dispose(); + userAttrBuilder_ = null; + } + ownRoom_ = null; + if (ownRoomBuilder_ != null) { + ownRoomBuilder_.dispose(); + ownRoomBuilder_ = null; + } + payScore_ = 0L; + ticketCount_ = 0L; + anchorInfo_ = null; + if (anchorInfoBuilder_ != null) { + anchorInfoBuilder_.dispose(); + anchorInfoBuilder_ = null; + } + linkMicStats_ = 0; + displayId_ = ""; + withCommercePermission_ = false; + withFusionShopEntry_ = false; + totalRechargeDiamondCount_ = 0L; + webcastAnchorLevel_ = null; + if (webcastAnchorLevelBuilder_ != null) { + webcastAnchorLevelBuilder_.dispose(); + webcastAnchorLevelBuilder_ = null; + } + verifiedContent_ = ""; + authorStats_ = null; + if (authorStatsBuilder_ != null) { + authorStatsBuilder_.dispose(); + authorStatsBuilder_ = null; + } + if (topFansListBuilder_ == null) { + topFansList_ = java.util.Collections.emptyList(); + } else { + topFansList_ = null; + topFansListBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00001000); + secUid_ = ""; + userRole_ = 0; + xiguaInfo_ = null; + if (xiguaInfoBuilder_ != null) { + xiguaInfoBuilder_.dispose(); + xiguaInfoBuilder_ = null; + } + activityReward_ = null; + if (activityRewardBuilder_ != null) { + activityRewardBuilder_.dispose(); + activityRewardBuilder_ = null; + } + nobleInfo_ = null; + if (nobleInfoBuilder_ != null) { + nobleInfoBuilder_.dispose(); + nobleInfoBuilder_ = null; + } + brotherhoodInfo_ = null; + if (brotherhoodInfoBuilder_ != null) { + brotherhoodInfoBuilder_.dispose(); + brotherhoodInfoBuilder_ = null; + } + personalCard_ = null; + if (personalCardBuilder_ != null) { + personalCardBuilder_.dispose(); + personalCardBuilder_ = null; + } + authenticationInfo_ = null; + if (authenticationInfoBuilder_ != null) { + authenticationInfoBuilder_.dispose(); + authenticationInfoBuilder_ = null; + } + authorizationInfo_ = 0; + adversaryAuthorizationInfo_ = 0; + poiInfo_ = null; + if (poiInfoBuilder_ != null) { + poiInfoBuilder_.dispose(); + poiInfoBuilder_ = null; + } + mediaBadgeImageListList_ = null; + if (mediaBadgeImageListListBuilder_ != null) { + mediaBadgeImageListListBuilder_.dispose(); + mediaBadgeImageListListBuilder_ = null; + } + adversaryUserStatus_ = 0; + userVipInfo_ = null; + if (userVipInfoBuilder_ != null) { + userVipInfoBuilder_.dispose(); + userVipInfoBuilder_ = null; + } + commerceWebcastConfigIdsList_ = emptyLongList(); + badgeImageListV2List_ = null; + if (badgeImageListV2ListBuilder_ != null) { + badgeImageListV2ListBuilder_.dispose(); + badgeImageListV2ListBuilder_ = null; + } + locationCity_ = ""; + fansGroupInfo_ = null; + if (fansGroupInfoBuilder_ != null) { + fansGroupInfoBuilder_.dispose(); + fansGroupInfoBuilder_ = null; + } + remarkName_ = ""; + mysteryMan_ = 0; + webRid_ = ""; + desensitizedNickname_ = ""; + jAccreditInfo_ = null; + if (jAccreditInfoBuilder_ != null) { + jAccreditInfoBuilder_.dispose(); + jAccreditInfoBuilder_ = null; + } + subscribe_ = null; + if (subscribeBuilder_ != null) { + subscribeBuilder_.dispose(); + subscribeBuilder_ = null; + } + isAnonymous_ = false; + consumeDiamondLevel_ = 0; + webcastUid_ = ""; + profileStyleParams_ = null; + if (profileStyleParamsBuilder_ != null) { + profileStyleParamsBuilder_.dispose(); + profileStyleParamsBuilder_ = null; + } + userDressInfo_ = null; + if (userDressInfoBuilder_ != null) { + userDressInfoBuilder_.dispose(); + userDressInfoBuilder_ = null; + } + allowBeLocated_ = false; + allowFindByContacts_ = false; + allowOthersDownloadVideo_ = false; + allowOthersDownloadWhenSharingVideo_ = false; + allowShareShowProfile_ = false; + allowShowInGossip_ = false; + allowShowMyAction_ = false; + allowStrangeComment_ = false; + allowUnfollowerComment_ = false; + allowUseLinkmic_ = false; + anchorLevel_ = null; + if (anchorLevelBuilder_ != null) { + anchorLevelBuilder_.dispose(); + anchorLevelBuilder_ = null; + } + avatarJpg_ = null; + if (avatarJpgBuilder_ != null) { + avatarJpgBuilder_.dispose(); + avatarJpgBuilder_ = null; + } + bgImgUrl_ = ""; + birthdayDescription_ = ""; + birthdayValid_ = false; + blockStatus_ = 0; + commentRestrict_ = 0; + constellation_ = ""; + disableIchat_ = 0; + enableIchatImg_ = 0L; + exp_ = 0; + fanTicketCount_ = 0L; + foldStrangerChat_ = false; + followStatus_ = 0L; + hotsoonVerified_ = false; + hotsoonVerifiedReason_ = ""; + ichatRestrictType_ = 0; + idStr_ = ""; + isFollower_ = false; + isFollowing_ = false; + needProfileGuide_ = false; + payScores_ = 0L; + pushCommentStatus_ = false; + pushDigg_ = false; + pushFollow_ = false; + pushFriendAction_ = false; + pushIchat_ = false; + pushStatus_ = false; + pushVideoPost_ = false; + pushVideoRecommend_ = false; + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + verifiedMobile_ = false; + verifiedReason_ = ""; + withCarManagementPermission_ = false; + ageRange_ = 0; + watchDurationMonth_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.internal_static_User_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User build() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User buildPartial() { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User result = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { buildPartial1(result); } + if (bitField2_ != 0) { buildPartial2(result); } + if (bitField3_ != 0) { buildPartial3(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User result) { + if (realTimeIconsListBuilder_ == null) { + if (((bitField0_ & 0x10000000) != 0)) { + realTimeIconsList_ = java.util.Collections.unmodifiableList(realTimeIconsList_); + bitField0_ = (bitField0_ & ~0x10000000); + } + result.realTimeIconsList_ = realTimeIconsList_; + } else { + result.realTimeIconsList_ = realTimeIconsListBuilder_.build(); + } + if (newRealTimeIconsListBuilder_ == null) { + if (((bitField0_ & 0x20000000) != 0)) { + newRealTimeIconsList_ = java.util.Collections.unmodifiableList(newRealTimeIconsList_); + bitField0_ = (bitField0_ & ~0x20000000); + } + result.newRealTimeIconsList_ = newRealTimeIconsList_; + } else { + result.newRealTimeIconsList_ = newRealTimeIconsListBuilder_.build(); + } + if (topFansListBuilder_ == null) { + if (((bitField1_ & 0x00001000) != 0)) { + topFansList_ = java.util.Collections.unmodifiableList(topFansList_); + bitField1_ = (bitField1_ & ~0x00001000); + } + result.topFansList_ = topFansList_; + } else { + result.topFansList_ = topFansListBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortId_ = shortId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nickname_ = nickname_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.gender_ = gender_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.signature_ = signature_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.birthday_ = birthday_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.telephone_ = telephone_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.avatarThumb_ = avatarThumbBuilder_ == null + ? avatarThumb_ + : avatarThumbBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.avatarMedium_ = avatarMediumBuilder_ == null + ? avatarMedium_ + : avatarMediumBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.avatarLarge_ = avatarLargeBuilder_ == null + ? avatarLarge_ + : avatarLargeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.verified_ = verified_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.experience_ = experience_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.city_ = city_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.status_ = status_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.createTime_ = createTime_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.modifyTime_ = modifyTime_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.secret_ = secret_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.shareQrcodeUri_ = shareQrcodeUri_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.incomeSharePercent_ = incomeSharePercent_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.badgeImageListList_ = badgeImageListListBuilder_ == null + ? badgeImageListList_ + : badgeImageListListBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.followInfo_ = followInfoBuilder_ == null + ? followInfo_ + : followInfoBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.payGrade_ = payGradeBuilder_ == null + ? payGrade_ + : payGradeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.fansClub_ = fansClubBuilder_ == null + ? fansClub_ + : fansClubBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.border_ = borderBuilder_ == null + ? border_ + : borderBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.specialId_ = specialId_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.avatarBorder_ = avatarBorderBuilder_ == null + ? avatarBorder_ + : avatarBorderBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.medal_ = medalBuilder_ == null + ? medal_ + : medalBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.topVipNo_ = topVipNo_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.userAttr_ = userAttrBuilder_ == null + ? userAttr_ + : userAttrBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField1_ = bitField1_; + int to_bitField0_ = 0; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.ownRoom_ = ownRoomBuilder_ == null + ? ownRoom_ + : ownRoomBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField1_ & 0x00000002) != 0)) { + result.payScore_ = payScore_; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + result.ticketCount_ = ticketCount_; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.anchorInfo_ = anchorInfoBuilder_ == null + ? anchorInfo_ + : anchorInfoBuilder_.build(); + to_bitField0_ |= 0x00001000; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.linkMicStats_ = linkMicStats_; + } + if (((from_bitField1_ & 0x00000020) != 0)) { + result.displayId_ = displayId_; + } + if (((from_bitField1_ & 0x00000040) != 0)) { + result.withCommercePermission_ = withCommercePermission_; + } + if (((from_bitField1_ & 0x00000080) != 0)) { + result.withFusionShopEntry_ = withFusionShopEntry_; + } + if (((from_bitField1_ & 0x00000100) != 0)) { + result.totalRechargeDiamondCount_ = totalRechargeDiamondCount_; + } + if (((from_bitField1_ & 0x00000200) != 0)) { + result.webcastAnchorLevel_ = webcastAnchorLevelBuilder_ == null + ? webcastAnchorLevel_ + : webcastAnchorLevelBuilder_.build(); + to_bitField0_ |= 0x00002000; + } + if (((from_bitField1_ & 0x00000400) != 0)) { + result.verifiedContent_ = verifiedContent_; + } + if (((from_bitField1_ & 0x00000800) != 0)) { + result.authorStats_ = authorStatsBuilder_ == null + ? authorStats_ + : authorStatsBuilder_.build(); + to_bitField0_ |= 0x00004000; + } + if (((from_bitField1_ & 0x00002000) != 0)) { + result.secUid_ = secUid_; + } + if (((from_bitField1_ & 0x00004000) != 0)) { + result.userRole_ = userRole_; + } + if (((from_bitField1_ & 0x00008000) != 0)) { + result.xiguaInfo_ = xiguaInfoBuilder_ == null + ? xiguaInfo_ + : xiguaInfoBuilder_.build(); + to_bitField0_ |= 0x00008000; + } + if (((from_bitField1_ & 0x00010000) != 0)) { + result.activityReward_ = activityRewardBuilder_ == null + ? activityReward_ + : activityRewardBuilder_.build(); + to_bitField0_ |= 0x00010000; + } + if (((from_bitField1_ & 0x00020000) != 0)) { + result.nobleInfo_ = nobleInfoBuilder_ == null + ? nobleInfo_ + : nobleInfoBuilder_.build(); + to_bitField0_ |= 0x00020000; + } + if (((from_bitField1_ & 0x00040000) != 0)) { + result.brotherhoodInfo_ = brotherhoodInfoBuilder_ == null + ? brotherhoodInfo_ + : brotherhoodInfoBuilder_.build(); + to_bitField0_ |= 0x00040000; + } + if (((from_bitField1_ & 0x00080000) != 0)) { + result.personalCard_ = personalCardBuilder_ == null + ? personalCard_ + : personalCardBuilder_.build(); + to_bitField0_ |= 0x00080000; + } + if (((from_bitField1_ & 0x00100000) != 0)) { + result.authenticationInfo_ = authenticationInfoBuilder_ == null + ? authenticationInfo_ + : authenticationInfoBuilder_.build(); + to_bitField0_ |= 0x00100000; + } + if (((from_bitField1_ & 0x00200000) != 0)) { + result.authorizationInfo_ = authorizationInfo_; + } + if (((from_bitField1_ & 0x00400000) != 0)) { + result.adversaryAuthorizationInfo_ = adversaryAuthorizationInfo_; + } + if (((from_bitField1_ & 0x00800000) != 0)) { + result.poiInfo_ = poiInfoBuilder_ == null + ? poiInfo_ + : poiInfoBuilder_.build(); + to_bitField0_ |= 0x00200000; + } + if (((from_bitField1_ & 0x01000000) != 0)) { + result.mediaBadgeImageListList_ = mediaBadgeImageListListBuilder_ == null + ? mediaBadgeImageListList_ + : mediaBadgeImageListListBuilder_.build(); + to_bitField0_ |= 0x00400000; + } + if (((from_bitField1_ & 0x02000000) != 0)) { + result.adversaryUserStatus_ = adversaryUserStatus_; + } + if (((from_bitField1_ & 0x04000000) != 0)) { + result.userVipInfo_ = userVipInfoBuilder_ == null + ? userVipInfo_ + : userVipInfoBuilder_.build(); + to_bitField0_ |= 0x00800000; + } + if (((from_bitField1_ & 0x08000000) != 0)) { + commerceWebcastConfigIdsList_.makeImmutable(); + result.commerceWebcastConfigIdsList_ = commerceWebcastConfigIdsList_; + } + if (((from_bitField1_ & 0x10000000) != 0)) { + result.badgeImageListV2List_ = badgeImageListV2ListBuilder_ == null + ? badgeImageListV2List_ + : badgeImageListV2ListBuilder_.build(); + to_bitField0_ |= 0x01000000; + } + if (((from_bitField1_ & 0x20000000) != 0)) { + result.locationCity_ = locationCity_; + } + if (((from_bitField1_ & 0x40000000) != 0)) { + result.fansGroupInfo_ = fansGroupInfoBuilder_ == null + ? fansGroupInfo_ + : fansGroupInfoBuilder_.build(); + to_bitField0_ |= 0x02000000; + } + if (((from_bitField1_ & 0x80000000) != 0)) { + result.remarkName_ = remarkName_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial2(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField2_ = bitField2_; + if (((from_bitField2_ & 0x00000001) != 0)) { + result.mysteryMan_ = mysteryMan_; + } + if (((from_bitField2_ & 0x00000002) != 0)) { + result.webRid_ = webRid_; + } + if (((from_bitField2_ & 0x00000004) != 0)) { + result.desensitizedNickname_ = desensitizedNickname_; + } + int to_bitField0_ = 0; + if (((from_bitField2_ & 0x00000008) != 0)) { + result.jAccreditInfo_ = jAccreditInfoBuilder_ == null + ? jAccreditInfo_ + : jAccreditInfoBuilder_.build(); + to_bitField0_ |= 0x04000000; + } + if (((from_bitField2_ & 0x00000010) != 0)) { + result.subscribe_ = subscribeBuilder_ == null + ? subscribe_ + : subscribeBuilder_.build(); + to_bitField0_ |= 0x08000000; + } + if (((from_bitField2_ & 0x00000020) != 0)) { + result.isAnonymous_ = isAnonymous_; + } + if (((from_bitField2_ & 0x00000040) != 0)) { + result.consumeDiamondLevel_ = consumeDiamondLevel_; + } + if (((from_bitField2_ & 0x00000080) != 0)) { + result.webcastUid_ = webcastUid_; + } + if (((from_bitField2_ & 0x00000100) != 0)) { + result.profileStyleParams_ = profileStyleParamsBuilder_ == null + ? profileStyleParams_ + : profileStyleParamsBuilder_.build(); + to_bitField0_ |= 0x10000000; + } + if (((from_bitField2_ & 0x00000200) != 0)) { + result.userDressInfo_ = userDressInfoBuilder_ == null + ? userDressInfo_ + : userDressInfoBuilder_.build(); + to_bitField0_ |= 0x20000000; + } + if (((from_bitField2_ & 0x00000400) != 0)) { + result.allowBeLocated_ = allowBeLocated_; + } + if (((from_bitField2_ & 0x00000800) != 0)) { + result.allowFindByContacts_ = allowFindByContacts_; + } + if (((from_bitField2_ & 0x00001000) != 0)) { + result.allowOthersDownloadVideo_ = allowOthersDownloadVideo_; + } + if (((from_bitField2_ & 0x00002000) != 0)) { + result.allowOthersDownloadWhenSharingVideo_ = allowOthersDownloadWhenSharingVideo_; + } + if (((from_bitField2_ & 0x00004000) != 0)) { + result.allowShareShowProfile_ = allowShareShowProfile_; + } + if (((from_bitField2_ & 0x00008000) != 0)) { + result.allowShowInGossip_ = allowShowInGossip_; + } + if (((from_bitField2_ & 0x00010000) != 0)) { + result.allowShowMyAction_ = allowShowMyAction_; + } + if (((from_bitField2_ & 0x00020000) != 0)) { + result.allowStrangeComment_ = allowStrangeComment_; + } + if (((from_bitField2_ & 0x00040000) != 0)) { + result.allowUnfollowerComment_ = allowUnfollowerComment_; + } + if (((from_bitField2_ & 0x00080000) != 0)) { + result.allowUseLinkmic_ = allowUseLinkmic_; + } + if (((from_bitField2_ & 0x00100000) != 0)) { + result.anchorLevel_ = anchorLevelBuilder_ == null + ? anchorLevel_ + : anchorLevelBuilder_.build(); + to_bitField0_ |= 0x40000000; + } + if (((from_bitField2_ & 0x00200000) != 0)) { + result.avatarJpg_ = avatarJpgBuilder_ == null + ? avatarJpg_ + : avatarJpgBuilder_.build(); + to_bitField0_ |= 0x80000000; + } + if (((from_bitField2_ & 0x00400000) != 0)) { + result.bgImgUrl_ = bgImgUrl_; + } + if (((from_bitField2_ & 0x00800000) != 0)) { + result.birthdayDescription_ = birthdayDescription_; + } + if (((from_bitField2_ & 0x01000000) != 0)) { + result.birthdayValid_ = birthdayValid_; + } + if (((from_bitField2_ & 0x02000000) != 0)) { + result.blockStatus_ = blockStatus_; + } + if (((from_bitField2_ & 0x04000000) != 0)) { + result.commentRestrict_ = commentRestrict_; + } + if (((from_bitField2_ & 0x08000000) != 0)) { + result.constellation_ = constellation_; + } + if (((from_bitField2_ & 0x10000000) != 0)) { + result.disableIchat_ = disableIchat_; + } + if (((from_bitField2_ & 0x20000000) != 0)) { + result.enableIchatImg_ = enableIchatImg_; + } + if (((from_bitField2_ & 0x40000000) != 0)) { + result.exp_ = exp_; + } + if (((from_bitField2_ & 0x80000000) != 0)) { + result.fanTicketCount_ = fanTicketCount_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial3(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField3_ = bitField3_; + if (((from_bitField3_ & 0x00000001) != 0)) { + result.foldStrangerChat_ = foldStrangerChat_; + } + if (((from_bitField3_ & 0x00000002) != 0)) { + result.followStatus_ = followStatus_; + } + if (((from_bitField3_ & 0x00000004) != 0)) { + result.hotsoonVerified_ = hotsoonVerified_; + } + if (((from_bitField3_ & 0x00000008) != 0)) { + result.hotsoonVerifiedReason_ = hotsoonVerifiedReason_; + } + if (((from_bitField3_ & 0x00000010) != 0)) { + result.ichatRestrictType_ = ichatRestrictType_; + } + if (((from_bitField3_ & 0x00000020) != 0)) { + result.idStr_ = idStr_; + } + if (((from_bitField3_ & 0x00000040) != 0)) { + result.isFollower_ = isFollower_; + } + if (((from_bitField3_ & 0x00000080) != 0)) { + result.isFollowing_ = isFollowing_; + } + if (((from_bitField3_ & 0x00000100) != 0)) { + result.needProfileGuide_ = needProfileGuide_; + } + if (((from_bitField3_ & 0x00000200) != 0)) { + result.payScores_ = payScores_; + } + if (((from_bitField3_ & 0x00000400) != 0)) { + result.pushCommentStatus_ = pushCommentStatus_; + } + if (((from_bitField3_ & 0x00000800) != 0)) { + result.pushDigg_ = pushDigg_; + } + if (((from_bitField3_ & 0x00001000) != 0)) { + result.pushFollow_ = pushFollow_; + } + if (((from_bitField3_ & 0x00002000) != 0)) { + result.pushFriendAction_ = pushFriendAction_; + } + if (((from_bitField3_ & 0x00004000) != 0)) { + result.pushIchat_ = pushIchat_; + } + if (((from_bitField3_ & 0x00008000) != 0)) { + result.pushStatus_ = pushStatus_; + } + if (((from_bitField3_ & 0x00010000) != 0)) { + result.pushVideoPost_ = pushVideoPost_; + } + if (((from_bitField3_ & 0x00020000) != 0)) { + result.pushVideoRecommend_ = pushVideoRecommend_; + } + int to_bitField1_ = 0; + if (((from_bitField3_ & 0x00040000) != 0)) { + result.stats_ = statsBuilder_ == null + ? stats_ + : statsBuilder_.build(); + to_bitField1_ |= 0x00000001; + } + if (((from_bitField3_ & 0x00080000) != 0)) { + result.verifiedMobile_ = verifiedMobile_; + } + if (((from_bitField3_ & 0x00100000) != 0)) { + result.verifiedReason_ = verifiedReason_; + } + if (((from_bitField3_ & 0x00200000) != 0)) { + result.withCarManagementPermission_ = withCarManagementPermission_; + } + if (((from_bitField3_ & 0x00400000) != 0)) { + result.ageRange_ = ageRange_; + } + if (((from_bitField3_ & 0x00800000) != 0)) { + result.watchDurationMonth_ = watchDurationMonth_; + } + result.bitField1_ |= to_bitField1_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User other) { + if (other == tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) return this; + if (other.getId() != 0L) { + setId(other.getId()); + } + if (other.getShortId() != 0L) { + setShortId(other.getShortId()); + } + if (!other.getNickname().isEmpty()) { + nickname_ = other.nickname_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getGender() != 0) { + setGender(other.getGender()); + } + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getLevel() != 0) { + setLevel(other.getLevel()); + } + if (other.getBirthday() != 0L) { + setBirthday(other.getBirthday()); + } + if (!other.getTelephone().isEmpty()) { + telephone_ = other.telephone_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasAvatarThumb()) { + mergeAvatarThumb(other.getAvatarThumb()); + } + if (other.hasAvatarMedium()) { + mergeAvatarMedium(other.getAvatarMedium()); + } + if (other.hasAvatarLarge()) { + mergeAvatarLarge(other.getAvatarLarge()); + } + if (other.getVerified() != false) { + setVerified(other.getVerified()); + } + if (other.getExperience() != 0) { + setExperience(other.getExperience()); + } + if (!other.getCity().isEmpty()) { + city_ = other.city_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + if (other.getCreateTime() != 0L) { + setCreateTime(other.getCreateTime()); + } + if (other.getModifyTime() != 0L) { + setModifyTime(other.getModifyTime()); + } + if (other.getSecret() != 0) { + setSecret(other.getSecret()); + } + if (!other.getShareQrcodeUri().isEmpty()) { + shareQrcodeUri_ = other.shareQrcodeUri_; + bitField0_ |= 0x00040000; + onChanged(); + } + if (other.getIncomeSharePercent() != 0) { + setIncomeSharePercent(other.getIncomeSharePercent()); + } + if (other.hasBadgeImageListList()) { + mergeBadgeImageListList(other.getBadgeImageListList()); + } + if (other.hasFollowInfo()) { + mergeFollowInfo(other.getFollowInfo()); + } + if (other.hasPayGrade()) { + mergePayGrade(other.getPayGrade()); + } + if (other.hasFansClub()) { + mergeFansClub(other.getFansClub()); + } + if (other.hasBorder()) { + mergeBorder(other.getBorder()); + } + if (!other.getSpecialId().isEmpty()) { + specialId_ = other.specialId_; + bitField0_ |= 0x02000000; + onChanged(); + } + if (other.hasAvatarBorder()) { + mergeAvatarBorder(other.getAvatarBorder()); + } + if (other.hasMedal()) { + mergeMedal(other.getMedal()); + } + if (realTimeIconsListBuilder_ == null) { + if (!other.realTimeIconsList_.isEmpty()) { + if (realTimeIconsList_.isEmpty()) { + realTimeIconsList_ = other.realTimeIconsList_; + bitField0_ = (bitField0_ & ~0x10000000); + } else { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.addAll(other.realTimeIconsList_); + } + onChanged(); + } + } else { + if (!other.realTimeIconsList_.isEmpty()) { + if (realTimeIconsListBuilder_.isEmpty()) { + realTimeIconsListBuilder_.dispose(); + realTimeIconsListBuilder_ = null; + realTimeIconsList_ = other.realTimeIconsList_; + bitField0_ = (bitField0_ & ~0x10000000); + realTimeIconsListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRealTimeIconsListFieldBuilder() : null; + } else { + realTimeIconsListBuilder_.addAllMessages(other.realTimeIconsList_); + } + } + } + if (newRealTimeIconsListBuilder_ == null) { + if (!other.newRealTimeIconsList_.isEmpty()) { + if (newRealTimeIconsList_.isEmpty()) { + newRealTimeIconsList_ = other.newRealTimeIconsList_; + bitField0_ = (bitField0_ & ~0x20000000); + } else { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.addAll(other.newRealTimeIconsList_); + } + onChanged(); + } + } else { + if (!other.newRealTimeIconsList_.isEmpty()) { + if (newRealTimeIconsListBuilder_.isEmpty()) { + newRealTimeIconsListBuilder_.dispose(); + newRealTimeIconsListBuilder_ = null; + newRealTimeIconsList_ = other.newRealTimeIconsList_; + bitField0_ = (bitField0_ & ~0x20000000); + newRealTimeIconsListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNewRealTimeIconsListFieldBuilder() : null; + } else { + newRealTimeIconsListBuilder_.addAllMessages(other.newRealTimeIconsList_); + } + } + } + if (other.getTopVipNo() != 0L) { + setTopVipNo(other.getTopVipNo()); + } + if (other.hasUserAttr()) { + mergeUserAttr(other.getUserAttr()); + } + if (other.hasOwnRoom()) { + mergeOwnRoom(other.getOwnRoom()); + } + if (other.getPayScore() != 0L) { + setPayScore(other.getPayScore()); + } + if (other.getTicketCount() != 0L) { + setTicketCount(other.getTicketCount()); + } + if (other.hasAnchorInfo()) { + mergeAnchorInfo(other.getAnchorInfo()); + } + if (other.getLinkMicStats() != 0) { + setLinkMicStats(other.getLinkMicStats()); + } + if (!other.getDisplayId().isEmpty()) { + displayId_ = other.displayId_; + bitField1_ |= 0x00000020; + onChanged(); + } + if (other.getWithCommercePermission() != false) { + setWithCommercePermission(other.getWithCommercePermission()); + } + if (other.getWithFusionShopEntry() != false) { + setWithFusionShopEntry(other.getWithFusionShopEntry()); + } + if (other.getTotalRechargeDiamondCount() != 0L) { + setTotalRechargeDiamondCount(other.getTotalRechargeDiamondCount()); + } + if (other.hasWebcastAnchorLevel()) { + mergeWebcastAnchorLevel(other.getWebcastAnchorLevel()); + } + if (!other.getVerifiedContent().isEmpty()) { + verifiedContent_ = other.verifiedContent_; + bitField1_ |= 0x00000400; + onChanged(); + } + if (other.hasAuthorStats()) { + mergeAuthorStats(other.getAuthorStats()); + } + if (topFansListBuilder_ == null) { + if (!other.topFansList_.isEmpty()) { + if (topFansList_.isEmpty()) { + topFansList_ = other.topFansList_; + bitField1_ = (bitField1_ & ~0x00001000); + } else { + ensureTopFansListIsMutable(); + topFansList_.addAll(other.topFansList_); + } + onChanged(); + } + } else { + if (!other.topFansList_.isEmpty()) { + if (topFansListBuilder_.isEmpty()) { + topFansListBuilder_.dispose(); + topFansListBuilder_ = null; + topFansList_ = other.topFansList_; + bitField1_ = (bitField1_ & ~0x00001000); + topFansListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTopFansListFieldBuilder() : null; + } else { + topFansListBuilder_.addAllMessages(other.topFansList_); + } + } + } + if (!other.getSecUid().isEmpty()) { + secUid_ = other.secUid_; + bitField1_ |= 0x00002000; + onChanged(); + } + if (other.getUserRole() != 0) { + setUserRole(other.getUserRole()); + } + if (other.hasXiguaInfo()) { + mergeXiguaInfo(other.getXiguaInfo()); + } + if (other.hasActivityReward()) { + mergeActivityReward(other.getActivityReward()); + } + if (other.hasNobleInfo()) { + mergeNobleInfo(other.getNobleInfo()); + } + if (other.hasBrotherhoodInfo()) { + mergeBrotherhoodInfo(other.getBrotherhoodInfo()); + } + if (other.hasPersonalCard()) { + mergePersonalCard(other.getPersonalCard()); + } + if (other.hasAuthenticationInfo()) { + mergeAuthenticationInfo(other.getAuthenticationInfo()); + } + if (other.getAuthorizationInfo() != 0) { + setAuthorizationInfo(other.getAuthorizationInfo()); + } + if (other.getAdversaryAuthorizationInfo() != 0) { + setAdversaryAuthorizationInfo(other.getAdversaryAuthorizationInfo()); + } + if (other.hasPoiInfo()) { + mergePoiInfo(other.getPoiInfo()); + } + if (other.hasMediaBadgeImageListList()) { + mergeMediaBadgeImageListList(other.getMediaBadgeImageListList()); + } + if (other.getAdversaryUserStatus() != 0) { + setAdversaryUserStatus(other.getAdversaryUserStatus()); + } + if (other.hasUserVipInfo()) { + mergeUserVipInfo(other.getUserVipInfo()); + } + if (!other.commerceWebcastConfigIdsList_.isEmpty()) { + if (commerceWebcastConfigIdsList_.isEmpty()) { + commerceWebcastConfigIdsList_ = other.commerceWebcastConfigIdsList_; + commerceWebcastConfigIdsList_.makeImmutable(); + bitField1_ |= 0x08000000; + } else { + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.addAll(other.commerceWebcastConfigIdsList_); + } + onChanged(); + } + if (other.hasBadgeImageListV2List()) { + mergeBadgeImageListV2List(other.getBadgeImageListV2List()); + } + if (!other.getLocationCity().isEmpty()) { + locationCity_ = other.locationCity_; + bitField1_ |= 0x20000000; + onChanged(); + } + if (other.hasFansGroupInfo()) { + mergeFansGroupInfo(other.getFansGroupInfo()); + } + if (!other.getRemarkName().isEmpty()) { + remarkName_ = other.remarkName_; + bitField1_ |= 0x80000000; + onChanged(); + } + if (other.getMysteryMan() != 0) { + setMysteryMan(other.getMysteryMan()); + } + if (!other.getWebRid().isEmpty()) { + webRid_ = other.webRid_; + bitField2_ |= 0x00000002; + onChanged(); + } + if (!other.getDesensitizedNickname().isEmpty()) { + desensitizedNickname_ = other.desensitizedNickname_; + bitField2_ |= 0x00000004; + onChanged(); + } + if (other.hasJAccreditInfo()) { + mergeJAccreditInfo(other.getJAccreditInfo()); + } + if (other.hasSubscribe()) { + mergeSubscribe(other.getSubscribe()); + } + if (other.getIsAnonymous() != false) { + setIsAnonymous(other.getIsAnonymous()); + } + if (other.getConsumeDiamondLevel() != 0) { + setConsumeDiamondLevel(other.getConsumeDiamondLevel()); + } + if (!other.getWebcastUid().isEmpty()) { + webcastUid_ = other.webcastUid_; + bitField2_ |= 0x00000080; + onChanged(); + } + if (other.hasProfileStyleParams()) { + mergeProfileStyleParams(other.getProfileStyleParams()); + } + if (other.hasUserDressInfo()) { + mergeUserDressInfo(other.getUserDressInfo()); + } + if (other.getAllowBeLocated() != false) { + setAllowBeLocated(other.getAllowBeLocated()); + } + if (other.getAllowFindByContacts() != false) { + setAllowFindByContacts(other.getAllowFindByContacts()); + } + if (other.getAllowOthersDownloadVideo() != false) { + setAllowOthersDownloadVideo(other.getAllowOthersDownloadVideo()); + } + if (other.getAllowOthersDownloadWhenSharingVideo() != false) { + setAllowOthersDownloadWhenSharingVideo(other.getAllowOthersDownloadWhenSharingVideo()); + } + if (other.getAllowShareShowProfile() != false) { + setAllowShareShowProfile(other.getAllowShareShowProfile()); + } + if (other.getAllowShowInGossip() != false) { + setAllowShowInGossip(other.getAllowShowInGossip()); + } + if (other.getAllowShowMyAction() != false) { + setAllowShowMyAction(other.getAllowShowMyAction()); + } + if (other.getAllowStrangeComment() != false) { + setAllowStrangeComment(other.getAllowStrangeComment()); + } + if (other.getAllowUnfollowerComment() != false) { + setAllowUnfollowerComment(other.getAllowUnfollowerComment()); + } + if (other.getAllowUseLinkmic() != false) { + setAllowUseLinkmic(other.getAllowUseLinkmic()); + } + if (other.hasAnchorLevel()) { + mergeAnchorLevel(other.getAnchorLevel()); + } + if (other.hasAvatarJpg()) { + mergeAvatarJpg(other.getAvatarJpg()); + } + if (!other.getBgImgUrl().isEmpty()) { + bgImgUrl_ = other.bgImgUrl_; + bitField2_ |= 0x00400000; + onChanged(); + } + if (!other.getBirthdayDescription().isEmpty()) { + birthdayDescription_ = other.birthdayDescription_; + bitField2_ |= 0x00800000; + onChanged(); + } + if (other.getBirthdayValid() != false) { + setBirthdayValid(other.getBirthdayValid()); + } + if (other.getBlockStatus() != 0) { + setBlockStatus(other.getBlockStatus()); + } + if (other.getCommentRestrict() != 0) { + setCommentRestrict(other.getCommentRestrict()); + } + if (!other.getConstellation().isEmpty()) { + constellation_ = other.constellation_; + bitField2_ |= 0x08000000; + onChanged(); + } + if (other.getDisableIchat() != 0) { + setDisableIchat(other.getDisableIchat()); + } + if (other.getEnableIchatImg() != 0L) { + setEnableIchatImg(other.getEnableIchatImg()); + } + if (other.getExp() != 0) { + setExp(other.getExp()); + } + if (other.getFanTicketCount() != 0L) { + setFanTicketCount(other.getFanTicketCount()); + } + if (other.getFoldStrangerChat() != false) { + setFoldStrangerChat(other.getFoldStrangerChat()); + } + if (other.getFollowStatus() != 0L) { + setFollowStatus(other.getFollowStatus()); + } + if (other.getHotsoonVerified() != false) { + setHotsoonVerified(other.getHotsoonVerified()); + } + if (!other.getHotsoonVerifiedReason().isEmpty()) { + hotsoonVerifiedReason_ = other.hotsoonVerifiedReason_; + bitField3_ |= 0x00000008; + onChanged(); + } + if (other.getIchatRestrictType() != 0) { + setIchatRestrictType(other.getIchatRestrictType()); + } + if (!other.getIdStr().isEmpty()) { + idStr_ = other.idStr_; + bitField3_ |= 0x00000020; + onChanged(); + } + if (other.getIsFollower() != false) { + setIsFollower(other.getIsFollower()); + } + if (other.getIsFollowing() != false) { + setIsFollowing(other.getIsFollowing()); + } + if (other.getNeedProfileGuide() != false) { + setNeedProfileGuide(other.getNeedProfileGuide()); + } + if (other.getPayScores() != 0L) { + setPayScores(other.getPayScores()); + } + if (other.getPushCommentStatus() != false) { + setPushCommentStatus(other.getPushCommentStatus()); + } + if (other.getPushDigg() != false) { + setPushDigg(other.getPushDigg()); + } + if (other.getPushFollow() != false) { + setPushFollow(other.getPushFollow()); + } + if (other.getPushFriendAction() != false) { + setPushFriendAction(other.getPushFriendAction()); + } + if (other.getPushIchat() != false) { + setPushIchat(other.getPushIchat()); + } + if (other.getPushStatus() != false) { + setPushStatus(other.getPushStatus()); + } + if (other.getPushVideoPost() != false) { + setPushVideoPost(other.getPushVideoPost()); + } + if (other.getPushVideoRecommend() != false) { + setPushVideoRecommend(other.getPushVideoRecommend()); + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + if (other.getVerifiedMobile() != false) { + setVerifiedMobile(other.getVerifiedMobile()); + } + if (!other.getVerifiedReason().isEmpty()) { + verifiedReason_ = other.verifiedReason_; + bitField3_ |= 0x00100000; + onChanged(); + } + if (other.getWithCarManagementPermission() != false) { + setWithCarManagementPermission(other.getWithCarManagementPermission()); + } + if (other.getAgeRange() != 0) { + setAgeRange(other.getAgeRange()); + } + if (other.getWatchDurationMonth() != 0L) { + setWatchDurationMonth(other.getWatchDurationMonth()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + id_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + shortId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + nickname_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + gender_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + signature_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + level_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + birthday_ = input.readUInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + telephone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + input.readMessage( + getAvatarThumbFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getAvatarMediumFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + input.readMessage( + getAvatarLargeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: { + verified_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + experience_ = input.readInt32(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 114: { + city_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 120: { + status_ = input.readInt32(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 128: { + createTime_ = input.readInt64(); + bitField0_ |= 0x00008000; + break; + } // case 128 + case 136: { + modifyTime_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 144: { + secret_ = input.readInt32(); + bitField0_ |= 0x00020000; + break; + } // case 144 + case 154: { + shareQrcodeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 160: { + incomeSharePercent_ = input.readInt32(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 170: { + input.readMessage( + getBadgeImageListListFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 170 + case 178: { + input.readMessage( + getFollowInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 178 + case 186: { + input.readMessage( + getPayGradeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: { + input.readMessage( + getFansClubFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 202: { + input.readMessage( + getBorderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 202 + case 210: { + specialId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 210 + case 218: { + input.readMessage( + getAvatarBorderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 218 + case 226: { + input.readMessage( + getMedalFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case 226 + case 234: { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.parser(), + extensionRegistry); + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(m); + } else { + realTimeIconsListBuilder_.addMessage(m); + } + break; + } // case 234 + case 242: { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.parser(), + extensionRegistry); + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(m); + } else { + newRealTimeIconsListBuilder_.addMessage(m); + } + break; + } // case 242 + case 248: { + topVipNo_ = input.readInt64(); + bitField0_ |= 0x40000000; + break; + } // case 248 + case 258: { + input.readMessage( + getUserAttrFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case 258 + case 266: { + input.readMessage( + getOwnRoomFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000001; + break; + } // case 266 + case 272: { + payScore_ = input.readInt64(); + bitField1_ |= 0x00000002; + break; + } // case 272 + case 280: { + ticketCount_ = input.readInt64(); + bitField1_ |= 0x00000004; + break; + } // case 280 + case 290: { + input.readMessage( + getAnchorInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000008; + break; + } // case 290 + case 296: { + linkMicStats_ = input.readInt32(); + bitField1_ |= 0x00000010; + break; + } // case 296 + case 306: { + displayId_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000020; + break; + } // case 306 + case 312: { + withCommercePermission_ = input.readBool(); + bitField1_ |= 0x00000040; + break; + } // case 312 + case 320: { + withFusionShopEntry_ = input.readBool(); + bitField1_ |= 0x00000080; + break; + } // case 320 + case 328: { + totalRechargeDiamondCount_ = input.readInt64(); + bitField1_ |= 0x00000100; + break; + } // case 328 + case 338: { + input.readMessage( + getWebcastAnchorLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000200; + break; + } // case 338 + case 346: { + verifiedContent_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000400; + break; + } // case 346 + case 354: { + input.readMessage( + getAuthorStatsFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000800; + break; + } // case 354 + case 362: { + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.parser(), + extensionRegistry); + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.add(m); + } else { + topFansListBuilder_.addMessage(m); + } + break; + } // case 362 + case 370: { + secUid_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00002000; + break; + } // case 370 + case 376: { + userRole_ = input.readInt32(); + bitField1_ |= 0x00004000; + break; + } // case 376 + case 386: { + input.readMessage( + getXiguaInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00008000; + break; + } // case 386 + case 394: { + input.readMessage( + getActivityRewardFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00010000; + break; + } // case 394 + case 402: { + input.readMessage( + getNobleInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00020000; + break; + } // case 402 + case 410: { + input.readMessage( + getBrotherhoodInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00040000; + break; + } // case 410 + case 418: { + input.readMessage( + getPersonalCardFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00080000; + break; + } // case 418 + case 426: { + input.readMessage( + getAuthenticationInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00100000; + break; + } // case 426 + case 432: { + authorizationInfo_ = input.readInt32(); + bitField1_ |= 0x00200000; + break; + } // case 432 + case 440: { + adversaryAuthorizationInfo_ = input.readInt32(); + bitField1_ |= 0x00400000; + break; + } // case 440 + case 450: { + input.readMessage( + getPoiInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00800000; + break; + } // case 450 + case 458: { + input.readMessage( + getMediaBadgeImageListListFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x01000000; + break; + } // case 458 + case 464: { + adversaryUserStatus_ = input.readInt32(); + bitField1_ |= 0x02000000; + break; + } // case 464 + case 474: { + input.readMessage( + getUserVipInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x04000000; + break; + } // case 474 + case 480: { + long v = input.readInt64(); + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.addLong(v); + break; + } // case 480 + case 482: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureCommerceWebcastConfigIdsListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + commerceWebcastConfigIdsList_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 482 + case 490: { + input.readMessage( + getBadgeImageListV2ListFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x10000000; + break; + } // case 490 + case 506: { + locationCity_ = input.readStringRequireUtf8(); + bitField1_ |= 0x20000000; + break; + } // case 506 + case 514: { + input.readMessage( + getFansGroupInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x40000000; + break; + } // case 514 + case 522: { + remarkName_ = input.readStringRequireUtf8(); + bitField1_ |= 0x80000000; + break; + } // case 522 + case 528: { + mysteryMan_ = input.readInt32(); + bitField2_ |= 0x00000001; + break; + } // case 528 + case 538: { + webRid_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00000002; + break; + } // case 538 + case 546: { + desensitizedNickname_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00000004; + break; + } // case 546 + case 554: { + input.readMessage( + getJAccreditInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000008; + break; + } // case 554 + case 562: { + input.readMessage( + getSubscribeFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000010; + break; + } // case 562 + case 568: { + isAnonymous_ = input.readBool(); + bitField2_ |= 0x00000020; + break; + } // case 568 + case 576: { + consumeDiamondLevel_ = input.readInt32(); + bitField2_ |= 0x00000040; + break; + } // case 576 + case 586: { + webcastUid_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00000080; + break; + } // case 586 + case 594: { + input.readMessage( + getProfileStyleParamsFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000100; + break; + } // case 594 + case 602: { + input.readMessage( + getUserDressInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000200; + break; + } // case 602 + case 8008: { + allowBeLocated_ = input.readBool(); + bitField2_ |= 0x00000400; + break; + } // case 8008 + case 8016: { + allowFindByContacts_ = input.readBool(); + bitField2_ |= 0x00000800; + break; + } // case 8016 + case 8024: { + allowOthersDownloadVideo_ = input.readBool(); + bitField2_ |= 0x00001000; + break; + } // case 8024 + case 8032: { + allowOthersDownloadWhenSharingVideo_ = input.readBool(); + bitField2_ |= 0x00002000; + break; + } // case 8032 + case 8040: { + allowShareShowProfile_ = input.readBool(); + bitField2_ |= 0x00004000; + break; + } // case 8040 + case 8048: { + allowShowInGossip_ = input.readBool(); + bitField2_ |= 0x00008000; + break; + } // case 8048 + case 8056: { + allowShowMyAction_ = input.readBool(); + bitField2_ |= 0x00010000; + break; + } // case 8056 + case 8064: { + allowStrangeComment_ = input.readBool(); + bitField2_ |= 0x00020000; + break; + } // case 8064 + case 8072: { + allowUnfollowerComment_ = input.readBool(); + bitField2_ |= 0x00040000; + break; + } // case 8072 + case 8080: { + allowUseLinkmic_ = input.readBool(); + bitField2_ |= 0x00080000; + break; + } // case 8080 + case 8090: { + input.readMessage( + getAnchorLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00100000; + break; + } // case 8090 + case 8098: { + input.readMessage( + getAvatarJpgFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00200000; + break; + } // case 8098 + case 8106: { + bgImgUrl_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00400000; + break; + } // case 8106 + case 8114: { + birthdayDescription_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00800000; + break; + } // case 8114 + case 8120: { + birthdayValid_ = input.readBool(); + bitField2_ |= 0x01000000; + break; + } // case 8120 + case 8128: { + blockStatus_ = input.readInt32(); + bitField2_ |= 0x02000000; + break; + } // case 8128 + case 8136: { + commentRestrict_ = input.readInt32(); + bitField2_ |= 0x04000000; + break; + } // case 8136 + case 8146: { + constellation_ = input.readStringRequireUtf8(); + bitField2_ |= 0x08000000; + break; + } // case 8146 + case 8152: { + disableIchat_ = input.readInt32(); + bitField2_ |= 0x10000000; + break; + } // case 8152 + case 8160: { + enableIchatImg_ = input.readInt64(); + bitField2_ |= 0x20000000; + break; + } // case 8160 + case 8168: { + exp_ = input.readInt32(); + bitField2_ |= 0x40000000; + break; + } // case 8168 + case 8176: { + fanTicketCount_ = input.readInt64(); + bitField2_ |= 0x80000000; + break; + } // case 8176 + case 8184: { + foldStrangerChat_ = input.readBool(); + bitField3_ |= 0x00000001; + break; + } // case 8184 + case 8192: { + followStatus_ = input.readInt64(); + bitField3_ |= 0x00000002; + break; + } // case 8192 + case 8200: { + hotsoonVerified_ = input.readBool(); + bitField3_ |= 0x00000004; + break; + } // case 8200 + case 8210: { + hotsoonVerifiedReason_ = input.readStringRequireUtf8(); + bitField3_ |= 0x00000008; + break; + } // case 8210 + case 8216: { + ichatRestrictType_ = input.readInt32(); + bitField3_ |= 0x00000010; + break; + } // case 8216 + case 8226: { + idStr_ = input.readStringRequireUtf8(); + bitField3_ |= 0x00000020; + break; + } // case 8226 + case 8232: { + isFollower_ = input.readBool(); + bitField3_ |= 0x00000040; + break; + } // case 8232 + case 8240: { + isFollowing_ = input.readBool(); + bitField3_ |= 0x00000080; + break; + } // case 8240 + case 8248: { + needProfileGuide_ = input.readBool(); + bitField3_ |= 0x00000100; + break; + } // case 8248 + case 8256: { + payScores_ = input.readInt64(); + bitField3_ |= 0x00000200; + break; + } // case 8256 + case 8264: { + pushCommentStatus_ = input.readBool(); + bitField3_ |= 0x00000400; + break; + } // case 8264 + case 8272: { + pushDigg_ = input.readBool(); + bitField3_ |= 0x00000800; + break; + } // case 8272 + case 8280: { + pushFollow_ = input.readBool(); + bitField3_ |= 0x00001000; + break; + } // case 8280 + case 8288: { + pushFriendAction_ = input.readBool(); + bitField3_ |= 0x00002000; + break; + } // case 8288 + case 8296: { + pushIchat_ = input.readBool(); + bitField3_ |= 0x00004000; + break; + } // case 8296 + case 8304: { + pushStatus_ = input.readBool(); + bitField3_ |= 0x00008000; + break; + } // case 8304 + case 8312: { + pushVideoPost_ = input.readBool(); + bitField3_ |= 0x00010000; + break; + } // case 8312 + case 8320: { + pushVideoRecommend_ = input.readBool(); + bitField3_ |= 0x00020000; + break; + } // case 8320 + case 8330: { + input.readMessage( + getStatsFieldBuilder().getBuilder(), + extensionRegistry); + bitField3_ |= 0x00040000; + break; + } // case 8330 + case 8336: { + verifiedMobile_ = input.readBool(); + bitField3_ |= 0x00080000; + break; + } // case 8336 + case 8346: { + verifiedReason_ = input.readStringRequireUtf8(); + bitField3_ |= 0x00100000; + break; + } // case 8346 + case 8352: { + withCarManagementPermission_ = input.readBool(); + bitField3_ |= 0x00200000; + break; + } // case 8352 + case 8360: { + ageRange_ = input.readInt32(); + bitField3_ |= 0x00400000; + break; + } // case 8360 + case 8368: { + watchDurationMonth_ = input.readInt64(); + bitField3_ |= 0x00800000; + break; + } // case 8368 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + private int bitField1_; + private int bitField2_; + private int bitField3_; + + private long id_ ; + /** + * uint64 id = 1; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + * uint64 id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000001); + id_ = 0L; + onChanged(); + return this; + } + + private long shortId_ ; + /** + * uint64 shortId = 2; + * @return The shortId. + */ + @java.lang.Override + public long getShortId() { + return shortId_; + } + /** + * uint64 shortId = 2; + * @param value The shortId to set. + * @return This builder for chaining. + */ + public Builder setShortId(long value) { + + shortId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 shortId = 2; + * @return This builder for chaining. + */ + public Builder clearShortId() { + bitField0_ = (bitField0_ & ~0x00000002); + shortId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object nickname_ = ""; + /** + * string nickname = 3; + * @return The nickname. + */ + 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 nickname = 3; + * @return The bytes for nickname. + */ + 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 nickname = 3; + * @param value The nickname to set. + * @return This builder for chaining. + */ + public Builder setNickname( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nickname_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string nickname = 3; + * @return This builder for chaining. + */ + public Builder clearNickname() { + nickname_ = getDefaultInstance().getNickname(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string nickname = 3; + * @param value The bytes for nickname to set. + * @return This builder for chaining. + */ + public Builder setNicknameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nickname_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int gender_ ; + /** + * uint32 gender = 4; + * @return The gender. + */ + @java.lang.Override + public int getGender() { + return gender_; + } + /** + * uint32 gender = 4; + * @param value The gender to set. + * @return This builder for chaining. + */ + public Builder setGender(int value) { + + gender_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 gender = 4; + * @return This builder for chaining. + */ + public Builder clearGender() { + bitField0_ = (bitField0_ & ~0x00000008); + gender_ = 0; + onChanged(); + return this; + } + + private java.lang.Object signature_ = ""; + /** + * string signature = 5; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string signature = 5; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string signature = 5; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + signature_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string signature = 5; + * @return This builder for chaining. + */ + public Builder clearSignature() { + signature_ = getDefaultInstance().getSignature(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string signature = 5; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + signature_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int level_ ; + /** + * uint32 level = 6; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + /** + * uint32 level = 6; + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(int value) { + + level_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint32 level = 6; + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000020); + level_ = 0; + onChanged(); + return this; + } + + private long birthday_ ; + /** + * uint64 birthday = 7; + * @return The birthday. + */ + @java.lang.Override + public long getBirthday() { + return birthday_; + } + /** + * uint64 birthday = 7; + * @param value The birthday to set. + * @return This builder for chaining. + */ + public Builder setBirthday(long value) { + + birthday_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * uint64 birthday = 7; + * @return This builder for chaining. + */ + public Builder clearBirthday() { + bitField0_ = (bitField0_ & ~0x00000040); + birthday_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object telephone_ = ""; + /** + * string telephone = 8; + * @return The telephone. + */ + public java.lang.String getTelephone() { + java.lang.Object ref = telephone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + telephone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string telephone = 8; + * @return The bytes for telephone. + */ + public com.google.protobuf.ByteString + getTelephoneBytes() { + java.lang.Object ref = telephone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + telephone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string telephone = 8; + * @param value The telephone to set. + * @return This builder for chaining. + */ + public Builder setTelephone( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + telephone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * string telephone = 8; + * @return This builder for chaining. + */ + public Builder clearTelephone() { + telephone_ = getDefaultInstance().getTelephone(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * string telephone = 8; + * @param value The bytes for telephone to set. + * @return This builder for chaining. + */ + public Builder setTelephoneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + telephone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarThumb_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarThumbBuilder_; + /** + * .Image avatarThumb = 9; + * @return Whether the avatarThumb field is set. + */ + public boolean hasAvatarThumb() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * .Image avatarThumb = 9; + * @return The avatarThumb. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarThumb() { + if (avatarThumbBuilder_ == null) { + return avatarThumb_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } else { + return avatarThumbBuilder_.getMessage(); + } + } + /** + * .Image avatarThumb = 9; + */ + public Builder setAvatarThumb(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarThumbBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarThumb_ = value; + } else { + avatarThumbBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .Image avatarThumb = 9; + */ + public Builder setAvatarThumb( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarThumbBuilder_ == null) { + avatarThumb_ = builderForValue.build(); + } else { + avatarThumbBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .Image avatarThumb = 9; + */ + public Builder mergeAvatarThumb(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarThumbBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + avatarThumb_ != null && + avatarThumb_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarThumbBuilder().mergeFrom(value); + } else { + avatarThumb_ = value; + } + } else { + avatarThumbBuilder_.mergeFrom(value); + } + if (avatarThumb_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * .Image avatarThumb = 9; + */ + public Builder clearAvatarThumb() { + bitField0_ = (bitField0_ & ~0x00000100); + avatarThumb_ = null; + if (avatarThumbBuilder_ != null) { + avatarThumbBuilder_.dispose(); + avatarThumbBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image avatarThumb = 9; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarThumbBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getAvatarThumbFieldBuilder().getBuilder(); + } + /** + * .Image avatarThumb = 9; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarThumbOrBuilder() { + if (avatarThumbBuilder_ != null) { + return avatarThumbBuilder_.getMessageOrBuilder(); + } else { + return avatarThumb_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } + } + /** + * .Image avatarThumb = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarThumbFieldBuilder() { + if (avatarThumbBuilder_ == null) { + avatarThumbBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarThumb(), + getParentForChildren(), + isClean()); + avatarThumb_ = null; + } + return avatarThumbBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarMedium_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarMediumBuilder_; + /** + * .Image avatarMedium = 10; + * @return Whether the avatarMedium field is set. + */ + public boolean hasAvatarMedium() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * .Image avatarMedium = 10; + * @return The avatarMedium. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarMedium() { + if (avatarMediumBuilder_ == null) { + return avatarMedium_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } else { + return avatarMediumBuilder_.getMessage(); + } + } + /** + * .Image avatarMedium = 10; + */ + public Builder setAvatarMedium(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarMediumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarMedium_ = value; + } else { + avatarMediumBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .Image avatarMedium = 10; + */ + public Builder setAvatarMedium( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarMediumBuilder_ == null) { + avatarMedium_ = builderForValue.build(); + } else { + avatarMediumBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .Image avatarMedium = 10; + */ + public Builder mergeAvatarMedium(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarMediumBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + avatarMedium_ != null && + avatarMedium_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarMediumBuilder().mergeFrom(value); + } else { + avatarMedium_ = value; + } + } else { + avatarMediumBuilder_.mergeFrom(value); + } + if (avatarMedium_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * .Image avatarMedium = 10; + */ + public Builder clearAvatarMedium() { + bitField0_ = (bitField0_ & ~0x00000200); + avatarMedium_ = null; + if (avatarMediumBuilder_ != null) { + avatarMediumBuilder_.dispose(); + avatarMediumBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image avatarMedium = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarMediumBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getAvatarMediumFieldBuilder().getBuilder(); + } + /** + * .Image avatarMedium = 10; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarMediumOrBuilder() { + if (avatarMediumBuilder_ != null) { + return avatarMediumBuilder_.getMessageOrBuilder(); + } else { + return avatarMedium_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } + } + /** + * .Image avatarMedium = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarMediumFieldBuilder() { + if (avatarMediumBuilder_ == null) { + avatarMediumBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarMedium(), + getParentForChildren(), + isClean()); + avatarMedium_ = null; + } + return avatarMediumBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarLarge_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarLargeBuilder_; + /** + * .Image avatarLarge = 11; + * @return Whether the avatarLarge field is set. + */ + public boolean hasAvatarLarge() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * .Image avatarLarge = 11; + * @return The avatarLarge. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarLarge() { + if (avatarLargeBuilder_ == null) { + return avatarLarge_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } else { + return avatarLargeBuilder_.getMessage(); + } + } + /** + * .Image avatarLarge = 11; + */ + public Builder setAvatarLarge(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarLargeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarLarge_ = value; + } else { + avatarLargeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .Image avatarLarge = 11; + */ + public Builder setAvatarLarge( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarLargeBuilder_ == null) { + avatarLarge_ = builderForValue.build(); + } else { + avatarLargeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .Image avatarLarge = 11; + */ + public Builder mergeAvatarLarge(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarLargeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) && + avatarLarge_ != null && + avatarLarge_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarLargeBuilder().mergeFrom(value); + } else { + avatarLarge_ = value; + } + } else { + avatarLargeBuilder_.mergeFrom(value); + } + if (avatarLarge_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * .Image avatarLarge = 11; + */ + public Builder clearAvatarLarge() { + bitField0_ = (bitField0_ & ~0x00000400); + avatarLarge_ = null; + if (avatarLargeBuilder_ != null) { + avatarLargeBuilder_.dispose(); + avatarLargeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image avatarLarge = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarLargeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getAvatarLargeFieldBuilder().getBuilder(); + } + /** + * .Image avatarLarge = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarLargeOrBuilder() { + if (avatarLargeBuilder_ != null) { + return avatarLargeBuilder_.getMessageOrBuilder(); + } else { + return avatarLarge_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } + } + /** + * .Image avatarLarge = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarLargeFieldBuilder() { + if (avatarLargeBuilder_ == null) { + avatarLargeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarLarge(), + getParentForChildren(), + isClean()); + avatarLarge_ = null; + } + return avatarLargeBuilder_; + } + + private boolean verified_ ; + /** + * bool verified = 12; + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + /** + * bool verified = 12; + * @param value The verified to set. + * @return This builder for chaining. + */ + public Builder setVerified(boolean value) { + + verified_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * bool verified = 12; + * @return This builder for chaining. + */ + public Builder clearVerified() { + bitField0_ = (bitField0_ & ~0x00000800); + verified_ = false; + onChanged(); + return this; + } + + private int experience_ ; + /** + * int32 experience = 13; + * @return The experience. + */ + @java.lang.Override + public int getExperience() { + return experience_; + } + /** + * int32 experience = 13; + * @param value The experience to set. + * @return This builder for chaining. + */ + public Builder setExperience(int value) { + + experience_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * int32 experience = 13; + * @return This builder for chaining. + */ + public Builder clearExperience() { + bitField0_ = (bitField0_ & ~0x00001000); + experience_ = 0; + onChanged(); + return this; + } + + private java.lang.Object city_ = ""; + /** + * string city = 14; + * @return The city. + */ + public java.lang.String getCity() { + java.lang.Object ref = city_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + city_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string city = 14; + * @return The bytes for city. + */ + public com.google.protobuf.ByteString + getCityBytes() { + java.lang.Object ref = city_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + city_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string city = 14; + * @param value The city to set. + * @return This builder for chaining. + */ + public Builder setCity( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + city_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * string city = 14; + * @return This builder for chaining. + */ + public Builder clearCity() { + city_ = getDefaultInstance().getCity(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * string city = 14; + * @param value The bytes for city to set. + * @return This builder for chaining. + */ + public Builder setCityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + city_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private int status_ ; + /** + * int32 status = 15; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + /** + * int32 status = 15; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(int value) { + + status_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * int32 status = 15; + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00004000); + status_ = 0; + onChanged(); + return this; + } + + private long createTime_ ; + /** + * int64 createTime = 16; + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + /** + * int64 createTime = 16; + * @param value The createTime to set. + * @return This builder for chaining. + */ + public Builder setCreateTime(long value) { + + createTime_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * int64 createTime = 16; + * @return This builder for chaining. + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00008000); + createTime_ = 0L; + onChanged(); + return this; + } + + private long modifyTime_ ; + /** + * int64 modifyTime = 17; + * @return The modifyTime. + */ + @java.lang.Override + public long getModifyTime() { + return modifyTime_; + } + /** + * int64 modifyTime = 17; + * @param value The modifyTime to set. + * @return This builder for chaining. + */ + public Builder setModifyTime(long value) { + + modifyTime_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * int64 modifyTime = 17; + * @return This builder for chaining. + */ + public Builder clearModifyTime() { + bitField0_ = (bitField0_ & ~0x00010000); + modifyTime_ = 0L; + onChanged(); + return this; + } + + private int secret_ ; + /** + * int32 secret = 18; + * @return The secret. + */ + @java.lang.Override + public int getSecret() { + return secret_; + } + /** + * int32 secret = 18; + * @param value The secret to set. + * @return This builder for chaining. + */ + public Builder setSecret(int value) { + + secret_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * int32 secret = 18; + * @return This builder for chaining. + */ + public Builder clearSecret() { + bitField0_ = (bitField0_ & ~0x00020000); + secret_ = 0; + onChanged(); + return this; + } + + private java.lang.Object shareQrcodeUri_ = ""; + /** + * string shareQrcodeUri = 19; + * @return The shareQrcodeUri. + */ + public java.lang.String getShareQrcodeUri() { + java.lang.Object ref = shareQrcodeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareQrcodeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string shareQrcodeUri = 19; + * @return The bytes for shareQrcodeUri. + */ + public com.google.protobuf.ByteString + getShareQrcodeUriBytes() { + java.lang.Object ref = shareQrcodeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareQrcodeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string shareQrcodeUri = 19; + * @param value The shareQrcodeUri to set. + * @return This builder for chaining. + */ + public Builder setShareQrcodeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shareQrcodeUri_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * string shareQrcodeUri = 19; + * @return This builder for chaining. + */ + public Builder clearShareQrcodeUri() { + shareQrcodeUri_ = getDefaultInstance().getShareQrcodeUri(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + return this; + } + /** + * string shareQrcodeUri = 19; + * @param value The bytes for shareQrcodeUri to set. + * @return This builder for chaining. + */ + public Builder setShareQrcodeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shareQrcodeUri_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + private int incomeSharePercent_ ; + /** + * int32 incomeSharePercent = 20; + * @return The incomeSharePercent. + */ + @java.lang.Override + public int getIncomeSharePercent() { + return incomeSharePercent_; + } + /** + * int32 incomeSharePercent = 20; + * @param value The incomeSharePercent to set. + * @return This builder for chaining. + */ + public Builder setIncomeSharePercent(int value) { + + incomeSharePercent_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * int32 incomeSharePercent = 20; + * @return This builder for chaining. + */ + public Builder clearIncomeSharePercent() { + bitField0_ = (bitField0_ & ~0x00080000); + incomeSharePercent_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListList_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> badgeImageListListBuilder_; + /** + * .Image badgeImageListList = 21; + * @return Whether the badgeImageListList field is set. + */ + public boolean hasBadgeImageListList() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * .Image badgeImageListList = 21; + * @return The badgeImageListList. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListList() { + if (badgeImageListListBuilder_ == null) { + return badgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } else { + return badgeImageListListBuilder_.getMessage(); + } + } + /** + * .Image badgeImageListList = 21; + */ + public Builder setBadgeImageListList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + badgeImageListList_ = value; + } else { + badgeImageListListBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .Image badgeImageListList = 21; + */ + public Builder setBadgeImageListList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (badgeImageListListBuilder_ == null) { + badgeImageListList_ = builderForValue.build(); + } else { + badgeImageListListBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .Image badgeImageListList = 21; + */ + public Builder mergeBadgeImageListList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListListBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + badgeImageListList_ != null && + badgeImageListList_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBadgeImageListListBuilder().mergeFrom(value); + } else { + badgeImageListList_ = value; + } + } else { + badgeImageListListBuilder_.mergeFrom(value); + } + if (badgeImageListList_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * .Image badgeImageListList = 21; + */ + public Builder clearBadgeImageListList() { + bitField0_ = (bitField0_ & ~0x00100000); + badgeImageListList_ = null; + if (badgeImageListListBuilder_ != null) { + badgeImageListListBuilder_.dispose(); + badgeImageListListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image badgeImageListList = 21; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBadgeImageListListBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getBadgeImageListListFieldBuilder().getBuilder(); + } + /** + * .Image badgeImageListList = 21; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListListOrBuilder() { + if (badgeImageListListBuilder_ != null) { + return badgeImageListListBuilder_.getMessageOrBuilder(); + } else { + return badgeImageListList_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } + } + /** + * .Image badgeImageListList = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBadgeImageListListFieldBuilder() { + if (badgeImageListListBuilder_ == null) { + badgeImageListListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBadgeImageListList(), + getParentForChildren(), + isClean()); + badgeImageListList_ = null; + } + return badgeImageListListBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo followInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder> followInfoBuilder_; + /** + * .User.FollowInfo followInfo = 22; + * @return Whether the followInfo field is set. + */ + public boolean hasFollowInfo() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * .User.FollowInfo followInfo = 22; + * @return The followInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getFollowInfo() { + if (followInfoBuilder_ == null) { + return followInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } else { + return followInfoBuilder_.getMessage(); + } + } + /** + * .User.FollowInfo followInfo = 22; + */ + public Builder setFollowInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo value) { + if (followInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + followInfo_ = value; + } else { + followInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .User.FollowInfo followInfo = 22; + */ + public Builder setFollowInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder builderForValue) { + if (followInfoBuilder_ == null) { + followInfo_ = builderForValue.build(); + } else { + followInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .User.FollowInfo followInfo = 22; + */ + public Builder mergeFollowInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo value) { + if (followInfoBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) && + followInfo_ != null && + followInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance()) { + getFollowInfoBuilder().mergeFrom(value); + } else { + followInfo_ = value; + } + } else { + followInfoBuilder_.mergeFrom(value); + } + if (followInfo_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; + } + /** + * .User.FollowInfo followInfo = 22; + */ + public Builder clearFollowInfo() { + bitField0_ = (bitField0_ & ~0x00200000); + followInfo_ = null; + if (followInfoBuilder_ != null) { + followInfoBuilder_.dispose(); + followInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.FollowInfo followInfo = 22; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder getFollowInfoBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getFollowInfoFieldBuilder().getBuilder(); + } + /** + * .User.FollowInfo followInfo = 22; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder getFollowInfoOrBuilder() { + if (followInfoBuilder_ != null) { + return followInfoBuilder_.getMessageOrBuilder(); + } else { + return followInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } + } + /** + * .User.FollowInfo followInfo = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder> + getFollowInfoFieldBuilder() { + if (followInfoBuilder_ == null) { + followInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder>( + getFollowInfo(), + getParentForChildren(), + isClean()); + followInfo_ = null; + } + return followInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade payGrade_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder> payGradeBuilder_; + /** + * .User.PayGrade payGrade = 23; + * @return Whether the payGrade field is set. + */ + public boolean hasPayGrade() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * .User.PayGrade payGrade = 23; + * @return The payGrade. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade getPayGrade() { + if (payGradeBuilder_ == null) { + return payGrade_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } else { + return payGradeBuilder_.getMessage(); + } + } + /** + * .User.PayGrade payGrade = 23; + */ + public Builder setPayGrade(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade value) { + if (payGradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payGrade_ = value; + } else { + payGradeBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .User.PayGrade payGrade = 23; + */ + public Builder setPayGrade( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder builderForValue) { + if (payGradeBuilder_ == null) { + payGrade_ = builderForValue.build(); + } else { + payGradeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .User.PayGrade payGrade = 23; + */ + public Builder mergePayGrade(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade value) { + if (payGradeBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) && + payGrade_ != null && + payGrade_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance()) { + getPayGradeBuilder().mergeFrom(value); + } else { + payGrade_ = value; + } + } else { + payGradeBuilder_.mergeFrom(value); + } + if (payGrade_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + /** + * .User.PayGrade payGrade = 23; + */ + public Builder clearPayGrade() { + bitField0_ = (bitField0_ & ~0x00400000); + payGrade_ = null; + if (payGradeBuilder_ != null) { + payGradeBuilder_.dispose(); + payGradeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.PayGrade payGrade = 23; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder getPayGradeBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getPayGradeFieldBuilder().getBuilder(); + } + /** + * .User.PayGrade payGrade = 23; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder getPayGradeOrBuilder() { + if (payGradeBuilder_ != null) { + return payGradeBuilder_.getMessageOrBuilder(); + } else { + return payGrade_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } + } + /** + * .User.PayGrade payGrade = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder> + getPayGradeFieldBuilder() { + if (payGradeBuilder_ == null) { + payGradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder>( + getPayGrade(), + getParentForChildren(), + isClean()); + payGrade_ = null; + } + return payGradeBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub fansClub_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder> fansClubBuilder_; + /** + * .User.FansClub fansClub = 24; + * @return Whether the fansClub field is set. + */ + public boolean hasFansClub() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * .User.FansClub fansClub = 24; + * @return The fansClub. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub getFansClub() { + if (fansClubBuilder_ == null) { + return fansClub_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } else { + return fansClubBuilder_.getMessage(); + } + } + /** + * .User.FansClub fansClub = 24; + */ + public Builder setFansClub(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub value) { + if (fansClubBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fansClub_ = value; + } else { + fansClubBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .User.FansClub fansClub = 24; + */ + public Builder setFansClub( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder builderForValue) { + if (fansClubBuilder_ == null) { + fansClub_ = builderForValue.build(); + } else { + fansClubBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .User.FansClub fansClub = 24; + */ + public Builder mergeFansClub(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub value) { + if (fansClubBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) && + fansClub_ != null && + fansClub_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance()) { + getFansClubBuilder().mergeFrom(value); + } else { + fansClub_ = value; + } + } else { + fansClubBuilder_.mergeFrom(value); + } + if (fansClub_ != null) { + bitField0_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * .User.FansClub fansClub = 24; + */ + public Builder clearFansClub() { + bitField0_ = (bitField0_ & ~0x00800000); + fansClub_ = null; + if (fansClubBuilder_ != null) { + fansClubBuilder_.dispose(); + fansClubBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.FansClub fansClub = 24; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder getFansClubBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getFansClubFieldBuilder().getBuilder(); + } + /** + * .User.FansClub fansClub = 24; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder getFansClubOrBuilder() { + if (fansClubBuilder_ != null) { + return fansClubBuilder_.getMessageOrBuilder(); + } else { + return fansClub_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } + } + /** + * .User.FansClub fansClub = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder> + getFansClubFieldBuilder() { + if (fansClubBuilder_ == null) { + fansClubBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder>( + getFansClub(), + getParentForChildren(), + isClean()); + fansClub_ = null; + } + return fansClubBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border border_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder> borderBuilder_; + /** + * .User.Border border = 25; + * @return Whether the border field is set. + */ + public boolean hasBorder() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * .User.Border border = 25; + * @return The border. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border getBorder() { + if (borderBuilder_ == null) { + return border_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } else { + return borderBuilder_.getMessage(); + } + } + /** + * .User.Border border = 25; + */ + public Builder setBorder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border value) { + if (borderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + border_ = value; + } else { + borderBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .User.Border border = 25; + */ + public Builder setBorder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.Builder builderForValue) { + if (borderBuilder_ == null) { + border_ = builderForValue.build(); + } else { + borderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .User.Border border = 25; + */ + public Builder mergeBorder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border value) { + if (borderBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) && + border_ != null && + border_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance()) { + getBorderBuilder().mergeFrom(value); + } else { + border_ = value; + } + } else { + borderBuilder_.mergeFrom(value); + } + if (border_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + * .User.Border border = 25; + */ + public Builder clearBorder() { + bitField0_ = (bitField0_ & ~0x01000000); + border_ = null; + if (borderBuilder_ != null) { + borderBuilder_.dispose(); + borderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.Border border = 25; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.Builder getBorderBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getBorderFieldBuilder().getBuilder(); + } + /** + * .User.Border border = 25; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder getBorderOrBuilder() { + if (borderBuilder_ != null) { + return borderBuilder_.getMessageOrBuilder(); + } else { + return border_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } + } + /** + * .User.Border border = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder> + getBorderFieldBuilder() { + if (borderBuilder_ == null) { + borderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Border.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder>( + getBorder(), + getParentForChildren(), + isClean()); + border_ = null; + } + return borderBuilder_; + } + + private java.lang.Object specialId_ = ""; + /** + * string specialId = 26; + * @return The specialId. + */ + public java.lang.String getSpecialId() { + java.lang.Object ref = specialId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + specialId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string specialId = 26; + * @return The bytes for specialId. + */ + public com.google.protobuf.ByteString + getSpecialIdBytes() { + java.lang.Object ref = specialId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + specialId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string specialId = 26; + * @param value The specialId to set. + * @return This builder for chaining. + */ + public Builder setSpecialId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + specialId_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * string specialId = 26; + * @return This builder for chaining. + */ + public Builder clearSpecialId() { + specialId_ = getDefaultInstance().getSpecialId(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + return this; + } + /** + * string specialId = 26; + * @param value The bytes for specialId to set. + * @return This builder for chaining. + */ + public Builder setSpecialIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + specialId_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarBorder_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarBorderBuilder_; + /** + * .Image avatarBorder = 27; + * @return Whether the avatarBorder field is set. + */ + public boolean hasAvatarBorder() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * .Image avatarBorder = 27; + * @return The avatarBorder. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarBorder() { + if (avatarBorderBuilder_ == null) { + return avatarBorder_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } else { + return avatarBorderBuilder_.getMessage(); + } + } + /** + * .Image avatarBorder = 27; + */ + public Builder setAvatarBorder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarBorderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarBorder_ = value; + } else { + avatarBorderBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * .Image avatarBorder = 27; + */ + public Builder setAvatarBorder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarBorderBuilder_ == null) { + avatarBorder_ = builderForValue.build(); + } else { + avatarBorderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * .Image avatarBorder = 27; + */ + public Builder mergeAvatarBorder(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarBorderBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) && + avatarBorder_ != null && + avatarBorder_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarBorderBuilder().mergeFrom(value); + } else { + avatarBorder_ = value; + } + } else { + avatarBorderBuilder_.mergeFrom(value); + } + if (avatarBorder_ != null) { + bitField0_ |= 0x04000000; + onChanged(); + } + return this; + } + /** + * .Image avatarBorder = 27; + */ + public Builder clearAvatarBorder() { + bitField0_ = (bitField0_ & ~0x04000000); + avatarBorder_ = null; + if (avatarBorderBuilder_ != null) { + avatarBorderBuilder_.dispose(); + avatarBorderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image avatarBorder = 27; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarBorderBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getAvatarBorderFieldBuilder().getBuilder(); + } + /** + * .Image avatarBorder = 27; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarBorderOrBuilder() { + if (avatarBorderBuilder_ != null) { + return avatarBorderBuilder_.getMessageOrBuilder(); + } else { + return avatarBorder_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } + } + /** + * .Image avatarBorder = 27; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarBorderFieldBuilder() { + if (avatarBorderBuilder_ == null) { + avatarBorderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarBorder(), + getParentForChildren(), + isClean()); + avatarBorder_ = null; + } + return avatarBorderBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image medal_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> medalBuilder_; + /** + * .Image medal = 28; + * @return Whether the medal field is set. + */ + public boolean hasMedal() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * .Image medal = 28; + * @return The medal. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getMedal() { + if (medalBuilder_ == null) { + return medal_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } else { + return medalBuilder_.getMessage(); + } + } + /** + * .Image medal = 28; + */ + public Builder setMedal(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (medalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + medal_ = value; + } else { + medalBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * .Image medal = 28; + */ + public Builder setMedal( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (medalBuilder_ == null) { + medal_ = builderForValue.build(); + } else { + medalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * .Image medal = 28; + */ + public Builder mergeMedal(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (medalBuilder_ == null) { + if (((bitField0_ & 0x08000000) != 0) && + medal_ != null && + medal_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getMedalBuilder().mergeFrom(value); + } else { + medal_ = value; + } + } else { + medalBuilder_.mergeFrom(value); + } + if (medal_ != null) { + bitField0_ |= 0x08000000; + onChanged(); + } + return this; + } + /** + * .Image medal = 28; + */ + public Builder clearMedal() { + bitField0_ = (bitField0_ & ~0x08000000); + medal_ = null; + if (medalBuilder_ != null) { + medalBuilder_.dispose(); + medalBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image medal = 28; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getMedalBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getMedalFieldBuilder().getBuilder(); + } + /** + * .Image medal = 28; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMedalOrBuilder() { + if (medalBuilder_ != null) { + return medalBuilder_.getMessageOrBuilder(); + } else { + return medal_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } + } + /** + * .Image medal = 28; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getMedalFieldBuilder() { + if (medalBuilder_ == null) { + medalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getMedal(), + getParentForChildren(), + isClean()); + medal_ = null; + } + return medalBuilder_; + } + + private java.util.List realTimeIconsList_ = + java.util.Collections.emptyList(); + private void ensureRealTimeIconsListIsMutable() { + if (!((bitField0_ & 0x10000000) != 0)) { + realTimeIconsList_ = new java.util.ArrayList(realTimeIconsList_); + bitField0_ |= 0x10000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> realTimeIconsListBuilder_; + + /** + * repeated .Image realTimeIconsList = 29; + */ + public java.util.List getRealTimeIconsListList() { + if (realTimeIconsListBuilder_ == null) { + return java.util.Collections.unmodifiableList(realTimeIconsList_); + } else { + return realTimeIconsListBuilder_.getMessageList(); + } + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public int getRealTimeIconsListCount() { + if (realTimeIconsListBuilder_ == null) { + return realTimeIconsList_.size(); + } else { + return realTimeIconsListBuilder_.getCount(); + } + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getRealTimeIconsList(int index) { + if (realTimeIconsListBuilder_ == null) { + return realTimeIconsList_.get(index); + } else { + return realTimeIconsListBuilder_.getMessage(index); + } + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder setRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (realTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.set(index, value); + onChanged(); + } else { + realTimeIconsListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder setRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.set(index, builderForValue.build()); + onChanged(); + } else { + realTimeIconsListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder addRealTimeIconsList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (realTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(value); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder addRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (realTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(index, value); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder addRealTimeIconsList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(builderForValue.build()); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder addRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(index, builderForValue.build()); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder addAllRealTimeIconsList( + java.lang.Iterable values) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, realTimeIconsList_); + onChanged(); + } else { + realTimeIconsListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder clearRealTimeIconsList() { + if (realTimeIconsListBuilder_ == null) { + realTimeIconsList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x10000000); + onChanged(); + } else { + realTimeIconsListBuilder_.clear(); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public Builder removeRealTimeIconsList(int index) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.remove(index); + onChanged(); + } else { + realTimeIconsListBuilder_.remove(index); + } + return this; + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getRealTimeIconsListBuilder( + int index) { + return getRealTimeIconsListFieldBuilder().getBuilder(index); + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getRealTimeIconsListOrBuilder( + int index) { + if (realTimeIconsListBuilder_ == null) { + return realTimeIconsList_.get(index); } else { + return realTimeIconsListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public java.util.List + getRealTimeIconsListOrBuilderList() { + if (realTimeIconsListBuilder_ != null) { + return realTimeIconsListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(realTimeIconsList_); + } + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder addRealTimeIconsListBuilder() { + return getRealTimeIconsListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder addRealTimeIconsListBuilder( + int index) { + return getRealTimeIconsListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * repeated .Image realTimeIconsList = 29; + */ + public java.util.List + getRealTimeIconsListBuilderList() { + return getRealTimeIconsListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getRealTimeIconsListFieldBuilder() { + if (realTimeIconsListBuilder_ == null) { + realTimeIconsListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + realTimeIconsList_, + ((bitField0_ & 0x10000000) != 0), + getParentForChildren(), + isClean()); + realTimeIconsList_ = null; + } + return realTimeIconsListBuilder_; + } + + private java.util.List newRealTimeIconsList_ = + java.util.Collections.emptyList(); + private void ensureNewRealTimeIconsListIsMutable() { + if (!((bitField0_ & 0x20000000) != 0)) { + newRealTimeIconsList_ = new java.util.ArrayList(newRealTimeIconsList_); + bitField0_ |= 0x20000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> newRealTimeIconsListBuilder_; + + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public java.util.List getNewRealTimeIconsListList() { + if (newRealTimeIconsListBuilder_ == null) { + return java.util.Collections.unmodifiableList(newRealTimeIconsList_); + } else { + return newRealTimeIconsListBuilder_.getMessageList(); + } + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public int getNewRealTimeIconsListCount() { + if (newRealTimeIconsListBuilder_ == null) { + return newRealTimeIconsList_.size(); + } else { + return newRealTimeIconsListBuilder_.getCount(); + } + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getNewRealTimeIconsList(int index) { + if (newRealTimeIconsListBuilder_ == null) { + return newRealTimeIconsList_.get(index); + } else { + return newRealTimeIconsListBuilder_.getMessage(index); + } + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder setNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newRealTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.set(index, value); + onChanged(); + } else { + newRealTimeIconsListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder setNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.set(index, builderForValue.build()); + onChanged(); + } else { + newRealTimeIconsListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder addNewRealTimeIconsList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newRealTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(value); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder addNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newRealTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(index, value); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder addNewRealTimeIconsList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(builderForValue.build()); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder addNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(index, builderForValue.build()); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder addAllNewRealTimeIconsList( + java.lang.Iterable values) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, newRealTimeIconsList_); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder clearNewRealTimeIconsList() { + if (newRealTimeIconsListBuilder_ == null) { + newRealTimeIconsList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + } else { + newRealTimeIconsListBuilder_.clear(); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public Builder removeNewRealTimeIconsList(int index) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.remove(index); + onChanged(); + } else { + newRealTimeIconsListBuilder_.remove(index); + } + return this; + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNewRealTimeIconsListBuilder( + int index) { + return getNewRealTimeIconsListFieldBuilder().getBuilder(index); + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewRealTimeIconsListOrBuilder( + int index) { + if (newRealTimeIconsListBuilder_ == null) { + return newRealTimeIconsList_.get(index); } else { + return newRealTimeIconsListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public java.util.List + getNewRealTimeIconsListOrBuilderList() { + if (newRealTimeIconsListBuilder_ != null) { + return newRealTimeIconsListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(newRealTimeIconsList_); + } + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder addNewRealTimeIconsListBuilder() { + return getNewRealTimeIconsListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder addNewRealTimeIconsListBuilder( + int index) { + return getNewRealTimeIconsListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * repeated .Image newRealTimeIconsList = 30; + */ + public java.util.List + getNewRealTimeIconsListBuilderList() { + return getNewRealTimeIconsListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewRealTimeIconsListFieldBuilder() { + if (newRealTimeIconsListBuilder_ == null) { + newRealTimeIconsListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + newRealTimeIconsList_, + ((bitField0_ & 0x20000000) != 0), + getParentForChildren(), + isClean()); + newRealTimeIconsList_ = null; + } + return newRealTimeIconsListBuilder_; + } + + private long topVipNo_ ; + /** + * int64 topVipNo = 31; + * @return The topVipNo. + */ + @java.lang.Override + public long getTopVipNo() { + return topVipNo_; + } + /** + * int64 topVipNo = 31; + * @param value The topVipNo to set. + * @return This builder for chaining. + */ + public Builder setTopVipNo(long value) { + + topVipNo_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * int64 topVipNo = 31; + * @return This builder for chaining. + */ + public Builder clearTopVipNo() { + bitField0_ = (bitField0_ & ~0x40000000); + topVipNo_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr userAttr_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder> userAttrBuilder_; + /** + * .User.UserAttr userAttr = 32; + * @return Whether the userAttr field is set. + */ + public boolean hasUserAttr() { + return ((bitField0_ & 0x80000000) != 0); + } + /** + * .User.UserAttr userAttr = 32; + * @return The userAttr. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr getUserAttr() { + if (userAttrBuilder_ == null) { + return userAttr_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } else { + return userAttrBuilder_.getMessage(); + } + } + /** + * .User.UserAttr userAttr = 32; + */ + public Builder setUserAttr(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr value) { + if (userAttrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userAttr_ = value; + } else { + userAttrBuilder_.setMessage(value); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * .User.UserAttr userAttr = 32; + */ + public Builder setUserAttr( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder builderForValue) { + if (userAttrBuilder_ == null) { + userAttr_ = builderForValue.build(); + } else { + userAttrBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * .User.UserAttr userAttr = 32; + */ + public Builder mergeUserAttr(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr value) { + if (userAttrBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0) && + userAttr_ != null && + userAttr_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance()) { + getUserAttrBuilder().mergeFrom(value); + } else { + userAttr_ = value; + } + } else { + userAttrBuilder_.mergeFrom(value); + } + if (userAttr_ != null) { + bitField0_ |= 0x80000000; + onChanged(); + } + return this; + } + /** + * .User.UserAttr userAttr = 32; + */ + public Builder clearUserAttr() { + bitField0_ = (bitField0_ & ~0x80000000); + userAttr_ = null; + if (userAttrBuilder_ != null) { + userAttrBuilder_.dispose(); + userAttrBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.UserAttr userAttr = 32; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder getUserAttrBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return getUserAttrFieldBuilder().getBuilder(); + } + /** + * .User.UserAttr userAttr = 32; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder getUserAttrOrBuilder() { + if (userAttrBuilder_ != null) { + return userAttrBuilder_.getMessageOrBuilder(); + } else { + return userAttr_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } + } + /** + * .User.UserAttr userAttr = 32; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder> + getUserAttrFieldBuilder() { + if (userAttrBuilder_ == null) { + userAttrBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder>( + getUserAttr(), + getParentForChildren(), + isClean()); + userAttr_ = null; + } + return userAttrBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom ownRoom_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder> ownRoomBuilder_; + /** + * .User.OwnRoom ownRoom = 33; + * @return Whether the ownRoom field is set. + */ + public boolean hasOwnRoom() { + return ((bitField1_ & 0x00000001) != 0); + } + /** + * .User.OwnRoom ownRoom = 33; + * @return The ownRoom. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getOwnRoom() { + if (ownRoomBuilder_ == null) { + return ownRoom_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } else { + return ownRoomBuilder_.getMessage(); + } + } + /** + * .User.OwnRoom ownRoom = 33; + */ + public Builder setOwnRoom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom value) { + if (ownRoomBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ownRoom_ = value; + } else { + ownRoomBuilder_.setMessage(value); + } + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .User.OwnRoom ownRoom = 33; + */ + public Builder setOwnRoom( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder builderForValue) { + if (ownRoomBuilder_ == null) { + ownRoom_ = builderForValue.build(); + } else { + ownRoomBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .User.OwnRoom ownRoom = 33; + */ + public Builder mergeOwnRoom(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom value) { + if (ownRoomBuilder_ == null) { + if (((bitField1_ & 0x00000001) != 0) && + ownRoom_ != null && + ownRoom_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance()) { + getOwnRoomBuilder().mergeFrom(value); + } else { + ownRoom_ = value; + } + } else { + ownRoomBuilder_.mergeFrom(value); + } + if (ownRoom_ != null) { + bitField1_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .User.OwnRoom ownRoom = 33; + */ + public Builder clearOwnRoom() { + bitField1_ = (bitField1_ & ~0x00000001); + ownRoom_ = null; + if (ownRoomBuilder_ != null) { + ownRoomBuilder_.dispose(); + ownRoomBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.OwnRoom ownRoom = 33; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder getOwnRoomBuilder() { + bitField1_ |= 0x00000001; + onChanged(); + return getOwnRoomFieldBuilder().getBuilder(); + } + /** + * .User.OwnRoom ownRoom = 33; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder getOwnRoomOrBuilder() { + if (ownRoomBuilder_ != null) { + return ownRoomBuilder_.getMessageOrBuilder(); + } else { + return ownRoom_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } + } + /** + * .User.OwnRoom ownRoom = 33; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder> + getOwnRoomFieldBuilder() { + if (ownRoomBuilder_ == null) { + ownRoomBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder>( + getOwnRoom(), + getParentForChildren(), + isClean()); + ownRoom_ = null; + } + return ownRoomBuilder_; + } + + private long payScore_ ; + /** + * int64 payScore = 34; + * @return The payScore. + */ + @java.lang.Override + public long getPayScore() { + return payScore_; + } + /** + * int64 payScore = 34; + * @param value The payScore to set. + * @return This builder for chaining. + */ + public Builder setPayScore(long value) { + + payScore_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int64 payScore = 34; + * @return This builder for chaining. + */ + public Builder clearPayScore() { + bitField1_ = (bitField1_ & ~0x00000002); + payScore_ = 0L; + onChanged(); + return this; + } + + private long ticketCount_ ; + /** + * int64 ticketCount = 35; + * @return The ticketCount. + */ + @java.lang.Override + public long getTicketCount() { + return ticketCount_; + } + /** + * int64 ticketCount = 35; + * @param value The ticketCount to set. + * @return This builder for chaining. + */ + public Builder setTicketCount(long value) { + + ticketCount_ = value; + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 ticketCount = 35; + * @return This builder for chaining. + */ + public Builder clearTicketCount() { + bitField1_ = (bitField1_ & ~0x00000004); + ticketCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo anchorInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder> anchorInfoBuilder_; + /** + * .User.AnchorInfo anchorInfo = 36; + * @return Whether the anchorInfo field is set. + */ + public boolean hasAnchorInfo() { + return ((bitField1_ & 0x00000008) != 0); + } + /** + * .User.AnchorInfo anchorInfo = 36; + * @return The anchorInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getAnchorInfo() { + if (anchorInfoBuilder_ == null) { + return anchorInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } else { + return anchorInfoBuilder_.getMessage(); + } + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + public Builder setAnchorInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo value) { + if (anchorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anchorInfo_ = value; + } else { + anchorInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + public Builder setAnchorInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder builderForValue) { + if (anchorInfoBuilder_ == null) { + anchorInfo_ = builderForValue.build(); + } else { + anchorInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + public Builder mergeAnchorInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo value) { + if (anchorInfoBuilder_ == null) { + if (((bitField1_ & 0x00000008) != 0) && + anchorInfo_ != null && + anchorInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance()) { + getAnchorInfoBuilder().mergeFrom(value); + } else { + anchorInfo_ = value; + } + } else { + anchorInfoBuilder_.mergeFrom(value); + } + if (anchorInfo_ != null) { + bitField1_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + public Builder clearAnchorInfo() { + bitField1_ = (bitField1_ & ~0x00000008); + anchorInfo_ = null; + if (anchorInfoBuilder_ != null) { + anchorInfoBuilder_.dispose(); + anchorInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder getAnchorInfoBuilder() { + bitField1_ |= 0x00000008; + onChanged(); + return getAnchorInfoFieldBuilder().getBuilder(); + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder getAnchorInfoOrBuilder() { + if (anchorInfoBuilder_ != null) { + return anchorInfoBuilder_.getMessageOrBuilder(); + } else { + return anchorInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } + } + /** + * .User.AnchorInfo anchorInfo = 36; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder> + getAnchorInfoFieldBuilder() { + if (anchorInfoBuilder_ == null) { + anchorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder>( + getAnchorInfo(), + getParentForChildren(), + isClean()); + anchorInfo_ = null; + } + return anchorInfoBuilder_; + } + + private int linkMicStats_ ; + /** + * int32 linkMicStats = 37; + * @return The linkMicStats. + */ + @java.lang.Override + public int getLinkMicStats() { + return linkMicStats_; + } + /** + * int32 linkMicStats = 37; + * @param value The linkMicStats to set. + * @return This builder for chaining. + */ + public Builder setLinkMicStats(int value) { + + linkMicStats_ = value; + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 linkMicStats = 37; + * @return This builder for chaining. + */ + public Builder clearLinkMicStats() { + bitField1_ = (bitField1_ & ~0x00000010); + linkMicStats_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayId_ = ""; + /** + * string displayId = 38; + * @return The displayId. + */ + public java.lang.String getDisplayId() { + java.lang.Object ref = displayId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayId = 38; + * @return The bytes for displayId. + */ + public com.google.protobuf.ByteString + getDisplayIdBytes() { + java.lang.Object ref = displayId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayId = 38; + * @param value The displayId to set. + * @return This builder for chaining. + */ + public Builder setDisplayId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayId_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string displayId = 38; + * @return This builder for chaining. + */ + public Builder clearDisplayId() { + displayId_ = getDefaultInstance().getDisplayId(); + bitField1_ = (bitField1_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string displayId = 38; + * @param value The bytes for displayId to set. + * @return This builder for chaining. + */ + public Builder setDisplayIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayId_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean withCommercePermission_ ; + /** + * bool withCommercePermission = 39; + * @return The withCommercePermission. + */ + @java.lang.Override + public boolean getWithCommercePermission() { + return withCommercePermission_; + } + /** + * bool withCommercePermission = 39; + * @param value The withCommercePermission to set. + * @return This builder for chaining. + */ + public Builder setWithCommercePermission(boolean value) { + + withCommercePermission_ = value; + bitField1_ |= 0x00000040; + onChanged(); + return this; + } + /** + * bool withCommercePermission = 39; + * @return This builder for chaining. + */ + public Builder clearWithCommercePermission() { + bitField1_ = (bitField1_ & ~0x00000040); + withCommercePermission_ = false; + onChanged(); + return this; + } + + private boolean withFusionShopEntry_ ; + /** + * bool withFusionShopEntry = 40; + * @return The withFusionShopEntry. + */ + @java.lang.Override + public boolean getWithFusionShopEntry() { + return withFusionShopEntry_; + } + /** + * bool withFusionShopEntry = 40; + * @param value The withFusionShopEntry to set. + * @return This builder for chaining. + */ + public Builder setWithFusionShopEntry(boolean value) { + + withFusionShopEntry_ = value; + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bool withFusionShopEntry = 40; + * @return This builder for chaining. + */ + public Builder clearWithFusionShopEntry() { + bitField1_ = (bitField1_ & ~0x00000080); + withFusionShopEntry_ = false; + onChanged(); + return this; + } + + private long totalRechargeDiamondCount_ ; + /** + * int64 totalRechargeDiamondCount = 41; + * @return The totalRechargeDiamondCount. + */ + @java.lang.Override + public long getTotalRechargeDiamondCount() { + return totalRechargeDiamondCount_; + } + /** + * int64 totalRechargeDiamondCount = 41; + * @param value The totalRechargeDiamondCount to set. + * @return This builder for chaining. + */ + public Builder setTotalRechargeDiamondCount(long value) { + + totalRechargeDiamondCount_ = value; + bitField1_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int64 totalRechargeDiamondCount = 41; + * @return This builder for chaining. + */ + public Builder clearTotalRechargeDiamondCount() { + bitField1_ = (bitField1_ & ~0x00000100); + totalRechargeDiamondCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel webcastAnchorLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> webcastAnchorLevelBuilder_; + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + * @return Whether the webcastAnchorLevel field is set. + */ + public boolean hasWebcastAnchorLevel() { + return ((bitField1_ & 0x00000200) != 0); + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + * @return The webcastAnchorLevel. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getWebcastAnchorLevel() { + if (webcastAnchorLevelBuilder_ == null) { + return webcastAnchorLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } else { + return webcastAnchorLevelBuilder_.getMessage(); + } + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + public Builder setWebcastAnchorLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (webcastAnchorLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webcastAnchorLevel_ = value; + } else { + webcastAnchorLevelBuilder_.setMessage(value); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + public Builder setWebcastAnchorLevel( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder builderForValue) { + if (webcastAnchorLevelBuilder_ == null) { + webcastAnchorLevel_ = builderForValue.build(); + } else { + webcastAnchorLevelBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + public Builder mergeWebcastAnchorLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (webcastAnchorLevelBuilder_ == null) { + if (((bitField1_ & 0x00000200) != 0) && + webcastAnchorLevel_ != null && + webcastAnchorLevel_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance()) { + getWebcastAnchorLevelBuilder().mergeFrom(value); + } else { + webcastAnchorLevel_ = value; + } + } else { + webcastAnchorLevelBuilder_.mergeFrom(value); + } + if (webcastAnchorLevel_ != null) { + bitField1_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + public Builder clearWebcastAnchorLevel() { + bitField1_ = (bitField1_ & ~0x00000200); + webcastAnchorLevel_ = null; + if (webcastAnchorLevelBuilder_ != null) { + webcastAnchorLevelBuilder_.dispose(); + webcastAnchorLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder getWebcastAnchorLevelBuilder() { + bitField1_ |= 0x00000200; + onChanged(); + return getWebcastAnchorLevelFieldBuilder().getBuilder(); + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getWebcastAnchorLevelOrBuilder() { + if (webcastAnchorLevelBuilder_ != null) { + return webcastAnchorLevelBuilder_.getMessageOrBuilder(); + } else { + return webcastAnchorLevel_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } + } + /** + * .User.AnchorLevel webcastAnchorLevel = 42; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> + getWebcastAnchorLevelFieldBuilder() { + if (webcastAnchorLevelBuilder_ == null) { + webcastAnchorLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder>( + getWebcastAnchorLevel(), + getParentForChildren(), + isClean()); + webcastAnchorLevel_ = null; + } + return webcastAnchorLevelBuilder_; + } + + private java.lang.Object verifiedContent_ = ""; + /** + * string verifiedContent = 43; + * @return The verifiedContent. + */ + public java.lang.String getVerifiedContent() { + java.lang.Object ref = verifiedContent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedContent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string verifiedContent = 43; + * @return The bytes for verifiedContent. + */ + public com.google.protobuf.ByteString + getVerifiedContentBytes() { + java.lang.Object ref = verifiedContent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedContent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string verifiedContent = 43; + * @param value The verifiedContent to set. + * @return This builder for chaining. + */ + public Builder setVerifiedContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + verifiedContent_ = value; + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + /** + * string verifiedContent = 43; + * @return This builder for chaining. + */ + public Builder clearVerifiedContent() { + verifiedContent_ = getDefaultInstance().getVerifiedContent(); + bitField1_ = (bitField1_ & ~0x00000400); + onChanged(); + return this; + } + /** + * string verifiedContent = 43; + * @param value The bytes for verifiedContent to set. + * @return This builder for chaining. + */ + public Builder setVerifiedContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + verifiedContent_ = value; + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats authorStats_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder> authorStatsBuilder_; + /** + * .User.AuthorStats authorStats = 44; + * @return Whether the authorStats field is set. + */ + public boolean hasAuthorStats() { + return ((bitField1_ & 0x00000800) != 0); + } + /** + * .User.AuthorStats authorStats = 44; + * @return The authorStats. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getAuthorStats() { + if (authorStatsBuilder_ == null) { + return authorStats_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } else { + return authorStatsBuilder_.getMessage(); + } + } + /** + * .User.AuthorStats authorStats = 44; + */ + public Builder setAuthorStats(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats value) { + if (authorStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorStats_ = value; + } else { + authorStatsBuilder_.setMessage(value); + } + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * .User.AuthorStats authorStats = 44; + */ + public Builder setAuthorStats( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder builderForValue) { + if (authorStatsBuilder_ == null) { + authorStats_ = builderForValue.build(); + } else { + authorStatsBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * .User.AuthorStats authorStats = 44; + */ + public Builder mergeAuthorStats(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats value) { + if (authorStatsBuilder_ == null) { + if (((bitField1_ & 0x00000800) != 0) && + authorStats_ != null && + authorStats_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance()) { + getAuthorStatsBuilder().mergeFrom(value); + } else { + authorStats_ = value; + } + } else { + authorStatsBuilder_.mergeFrom(value); + } + if (authorStats_ != null) { + bitField1_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * .User.AuthorStats authorStats = 44; + */ + public Builder clearAuthorStats() { + bitField1_ = (bitField1_ & ~0x00000800); + authorStats_ = null; + if (authorStatsBuilder_ != null) { + authorStatsBuilder_.dispose(); + authorStatsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.AuthorStats authorStats = 44; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder getAuthorStatsBuilder() { + bitField1_ |= 0x00000800; + onChanged(); + return getAuthorStatsFieldBuilder().getBuilder(); + } + /** + * .User.AuthorStats authorStats = 44; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder getAuthorStatsOrBuilder() { + if (authorStatsBuilder_ != null) { + return authorStatsBuilder_.getMessageOrBuilder(); + } else { + return authorStats_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } + } + /** + * .User.AuthorStats authorStats = 44; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder> + getAuthorStatsFieldBuilder() { + if (authorStatsBuilder_ == null) { + authorStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder>( + getAuthorStats(), + getParentForChildren(), + isClean()); + authorStats_ = null; + } + return authorStatsBuilder_; + } + + private java.util.List topFansList_ = + java.util.Collections.emptyList(); + private void ensureTopFansListIsMutable() { + if (!((bitField1_ & 0x00001000) != 0)) { + topFansList_ = new java.util.ArrayList(topFansList_); + bitField1_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> topFansListBuilder_; + + /** + * repeated .User topFansList = 45; + */ + public java.util.List getTopFansListList() { + if (topFansListBuilder_ == null) { + return java.util.Collections.unmodifiableList(topFansList_); + } else { + return topFansListBuilder_.getMessageList(); + } + } + /** + * repeated .User topFansList = 45; + */ + public int getTopFansListCount() { + if (topFansListBuilder_ == null) { + return topFansList_.size(); + } else { + return topFansListBuilder_.getCount(); + } + } + /** + * repeated .User topFansList = 45; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getTopFansList(int index) { + if (topFansListBuilder_ == null) { + return topFansList_.get(index); + } else { + return topFansListBuilder_.getMessage(index); + } + } + /** + * repeated .User topFansList = 45; + */ + public Builder setTopFansList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (topFansListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopFansListIsMutable(); + topFansList_.set(index, value); + onChanged(); + } else { + topFansListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder setTopFansList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.set(index, builderForValue.build()); + onChanged(); + } else { + topFansListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder addTopFansList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (topFansListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopFansListIsMutable(); + topFansList_.add(value); + onChanged(); + } else { + topFansListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder addTopFansList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User value) { + if (topFansListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopFansListIsMutable(); + topFansList_.add(index, value); + onChanged(); + } else { + topFansListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder addTopFansList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.add(builderForValue.build()); + onChanged(); + } else { + topFansListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder addTopFansList( + int index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.add(index, builderForValue.build()); + onChanged(); + } else { + topFansListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder addAllTopFansList( + java.lang.Iterable values) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, topFansList_); + onChanged(); + } else { + topFansListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder clearTopFansList() { + if (topFansListBuilder_ == null) { + topFansList_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00001000); + onChanged(); + } else { + topFansListBuilder_.clear(); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public Builder removeTopFansList(int index) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.remove(index); + onChanged(); + } else { + topFansListBuilder_.remove(index); + } + return this; + } + /** + * repeated .User topFansList = 45; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder getTopFansListBuilder( + int index) { + return getTopFansListFieldBuilder().getBuilder(index); + } + /** + * repeated .User topFansList = 45; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getTopFansListOrBuilder( + int index) { + if (topFansListBuilder_ == null) { + return topFansList_.get(index); } else { + return topFansListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .User topFansList = 45; + */ + public java.util.List + getTopFansListOrBuilderList() { + if (topFansListBuilder_ != null) { + return topFansListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topFansList_); + } + } + /** + * repeated .User topFansList = 45; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder addTopFansListBuilder() { + return getTopFansListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()); + } + /** + * repeated .User topFansList = 45; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder addTopFansListBuilder( + int index) { + return getTopFansListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()); + } + /** + * repeated .User topFansList = 45; + */ + public java.util.List + getTopFansListBuilderList() { + return getTopFansListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getTopFansListFieldBuilder() { + if (topFansListBuilder_ == null) { + topFansListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + topFansList_, + ((bitField1_ & 0x00001000) != 0), + getParentForChildren(), + isClean()); + topFansList_ = null; + } + return topFansListBuilder_; + } + + private java.lang.Object secUid_ = ""; + /** + * string secUid = 46; + * @return The secUid. + */ + public java.lang.String getSecUid() { + java.lang.Object ref = secUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string secUid = 46; + * @return The bytes for secUid. + */ + public com.google.protobuf.ByteString + getSecUidBytes() { + java.lang.Object ref = secUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + secUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string secUid = 46; + * @param value The secUid to set. + * @return This builder for chaining. + */ + public Builder setSecUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + secUid_ = value; + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * string secUid = 46; + * @return This builder for chaining. + */ + public Builder clearSecUid() { + secUid_ = getDefaultInstance().getSecUid(); + bitField1_ = (bitField1_ & ~0x00002000); + onChanged(); + return this; + } + /** + * string secUid = 46; + * @param value The bytes for secUid to set. + * @return This builder for chaining. + */ + public Builder setSecUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + secUid_ = value; + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + + private int userRole_ ; + /** + * int32 userRole = 47; + * @return The userRole. + */ + @java.lang.Override + public int getUserRole() { + return userRole_; + } + /** + * int32 userRole = 47; + * @param value The userRole to set. + * @return This builder for chaining. + */ + public Builder setUserRole(int value) { + + userRole_ = value; + bitField1_ |= 0x00004000; + onChanged(); + return this; + } + /** + * int32 userRole = 47; + * @return This builder for chaining. + */ + public Builder clearUserRole() { + bitField1_ = (bitField1_ & ~0x00004000); + userRole_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams xiguaInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder> xiguaInfoBuilder_; + /** + * .User.XiguaParams xiguaInfo = 48; + * @return Whether the xiguaInfo field is set. + */ + public boolean hasXiguaInfo() { + return ((bitField1_ & 0x00008000) != 0); + } + /** + * .User.XiguaParams xiguaInfo = 48; + * @return The xiguaInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getXiguaInfo() { + if (xiguaInfoBuilder_ == null) { + return xiguaInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } else { + return xiguaInfoBuilder_.getMessage(); + } + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + public Builder setXiguaInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams value) { + if (xiguaInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + xiguaInfo_ = value; + } else { + xiguaInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + public Builder setXiguaInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder builderForValue) { + if (xiguaInfoBuilder_ == null) { + xiguaInfo_ = builderForValue.build(); + } else { + xiguaInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + public Builder mergeXiguaInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams value) { + if (xiguaInfoBuilder_ == null) { + if (((bitField1_ & 0x00008000) != 0) && + xiguaInfo_ != null && + xiguaInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance()) { + getXiguaInfoBuilder().mergeFrom(value); + } else { + xiguaInfo_ = value; + } + } else { + xiguaInfoBuilder_.mergeFrom(value); + } + if (xiguaInfo_ != null) { + bitField1_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + public Builder clearXiguaInfo() { + bitField1_ = (bitField1_ & ~0x00008000); + xiguaInfo_ = null; + if (xiguaInfoBuilder_ != null) { + xiguaInfoBuilder_.dispose(); + xiguaInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder getXiguaInfoBuilder() { + bitField1_ |= 0x00008000; + onChanged(); + return getXiguaInfoFieldBuilder().getBuilder(); + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder getXiguaInfoOrBuilder() { + if (xiguaInfoBuilder_ != null) { + return xiguaInfoBuilder_.getMessageOrBuilder(); + } else { + return xiguaInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } + } + /** + * .User.XiguaParams xiguaInfo = 48; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder> + getXiguaInfoFieldBuilder() { + if (xiguaInfoBuilder_ == null) { + xiguaInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder>( + getXiguaInfo(), + getParentForChildren(), + isClean()); + xiguaInfo_ = null; + } + return xiguaInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo activityReward_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder> activityRewardBuilder_; + /** + * .User.ActivityInfo activityReward = 49; + * @return Whether the activityReward field is set. + */ + public boolean hasActivityReward() { + return ((bitField1_ & 0x00010000) != 0); + } + /** + * .User.ActivityInfo activityReward = 49; + * @return The activityReward. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getActivityReward() { + if (activityRewardBuilder_ == null) { + return activityReward_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } else { + return activityRewardBuilder_.getMessage(); + } + } + /** + * .User.ActivityInfo activityReward = 49; + */ + public Builder setActivityReward(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo value) { + if (activityRewardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + activityReward_ = value; + } else { + activityRewardBuilder_.setMessage(value); + } + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * .User.ActivityInfo activityReward = 49; + */ + public Builder setActivityReward( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder builderForValue) { + if (activityRewardBuilder_ == null) { + activityReward_ = builderForValue.build(); + } else { + activityRewardBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * .User.ActivityInfo activityReward = 49; + */ + public Builder mergeActivityReward(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo value) { + if (activityRewardBuilder_ == null) { + if (((bitField1_ & 0x00010000) != 0) && + activityReward_ != null && + activityReward_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance()) { + getActivityRewardBuilder().mergeFrom(value); + } else { + activityReward_ = value; + } + } else { + activityRewardBuilder_.mergeFrom(value); + } + if (activityReward_ != null) { + bitField1_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * .User.ActivityInfo activityReward = 49; + */ + public Builder clearActivityReward() { + bitField1_ = (bitField1_ & ~0x00010000); + activityReward_ = null; + if (activityRewardBuilder_ != null) { + activityRewardBuilder_.dispose(); + activityRewardBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.ActivityInfo activityReward = 49; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder getActivityRewardBuilder() { + bitField1_ |= 0x00010000; + onChanged(); + return getActivityRewardFieldBuilder().getBuilder(); + } + /** + * .User.ActivityInfo activityReward = 49; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder getActivityRewardOrBuilder() { + if (activityRewardBuilder_ != null) { + return activityRewardBuilder_.getMessageOrBuilder(); + } else { + return activityReward_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } + } + /** + * .User.ActivityInfo activityReward = 49; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder> + getActivityRewardFieldBuilder() { + if (activityRewardBuilder_ == null) { + activityRewardBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder>( + getActivityReward(), + getParentForChildren(), + isClean()); + activityReward_ = null; + } + return activityRewardBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo nobleInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder> nobleInfoBuilder_; + /** + * .User.NobleLevelInfo nobleInfo = 50; + * @return Whether the nobleInfo field is set. + */ + public boolean hasNobleInfo() { + return ((bitField1_ & 0x00020000) != 0); + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + * @return The nobleInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getNobleInfo() { + if (nobleInfoBuilder_ == null) { + return nobleInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } else { + return nobleInfoBuilder_.getMessage(); + } + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + public Builder setNobleInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo value) { + if (nobleInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nobleInfo_ = value; + } else { + nobleInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + public Builder setNobleInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder builderForValue) { + if (nobleInfoBuilder_ == null) { + nobleInfo_ = builderForValue.build(); + } else { + nobleInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + public Builder mergeNobleInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo value) { + if (nobleInfoBuilder_ == null) { + if (((bitField1_ & 0x00020000) != 0) && + nobleInfo_ != null && + nobleInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance()) { + getNobleInfoBuilder().mergeFrom(value); + } else { + nobleInfo_ = value; + } + } else { + nobleInfoBuilder_.mergeFrom(value); + } + if (nobleInfo_ != null) { + bitField1_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + public Builder clearNobleInfo() { + bitField1_ = (bitField1_ & ~0x00020000); + nobleInfo_ = null; + if (nobleInfoBuilder_ != null) { + nobleInfoBuilder_.dispose(); + nobleInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder getNobleInfoBuilder() { + bitField1_ |= 0x00020000; + onChanged(); + return getNobleInfoFieldBuilder().getBuilder(); + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder getNobleInfoOrBuilder() { + if (nobleInfoBuilder_ != null) { + return nobleInfoBuilder_.getMessageOrBuilder(); + } else { + return nobleInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } + } + /** + * .User.NobleLevelInfo nobleInfo = 50; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder> + getNobleInfoFieldBuilder() { + if (nobleInfoBuilder_ == null) { + nobleInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder>( + getNobleInfo(), + getParentForChildren(), + isClean()); + nobleInfo_ = null; + } + return nobleInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo brotherhoodInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder> brotherhoodInfoBuilder_; + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + * @return Whether the brotherhoodInfo field is set. + */ + public boolean hasBrotherhoodInfo() { + return ((bitField1_ & 0x00040000) != 0); + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + * @return The brotherhoodInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getBrotherhoodInfo() { + if (brotherhoodInfoBuilder_ == null) { + return brotherhoodInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } else { + return brotherhoodInfoBuilder_.getMessage(); + } + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + public Builder setBrotherhoodInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo value) { + if (brotherhoodInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + brotherhoodInfo_ = value; + } else { + brotherhoodInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + public Builder setBrotherhoodInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder builderForValue) { + if (brotherhoodInfoBuilder_ == null) { + brotherhoodInfo_ = builderForValue.build(); + } else { + brotherhoodInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + public Builder mergeBrotherhoodInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo value) { + if (brotherhoodInfoBuilder_ == null) { + if (((bitField1_ & 0x00040000) != 0) && + brotherhoodInfo_ != null && + brotherhoodInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance()) { + getBrotherhoodInfoBuilder().mergeFrom(value); + } else { + brotherhoodInfo_ = value; + } + } else { + brotherhoodInfoBuilder_.mergeFrom(value); + } + if (brotherhoodInfo_ != null) { + bitField1_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + public Builder clearBrotherhoodInfo() { + bitField1_ = (bitField1_ & ~0x00040000); + brotherhoodInfo_ = null; + if (brotherhoodInfoBuilder_ != null) { + brotherhoodInfoBuilder_.dispose(); + brotherhoodInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder getBrotherhoodInfoBuilder() { + bitField1_ |= 0x00040000; + onChanged(); + return getBrotherhoodInfoFieldBuilder().getBuilder(); + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder getBrotherhoodInfoOrBuilder() { + if (brotherhoodInfoBuilder_ != null) { + return brotherhoodInfoBuilder_.getMessageOrBuilder(); + } else { + return brotherhoodInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } + } + /** + * .User.BrotherhoodInfo brotherhoodInfo = 51; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder> + getBrotherhoodInfoFieldBuilder() { + if (brotherhoodInfoBuilder_ == null) { + brotherhoodInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder>( + getBrotherhoodInfo(), + getParentForChildren(), + isClean()); + brotherhoodInfo_ = null; + } + return brotherhoodInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image personalCard_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> personalCardBuilder_; + /** + * .Image personalCard = 52; + * @return Whether the personalCard field is set. + */ + public boolean hasPersonalCard() { + return ((bitField1_ & 0x00080000) != 0); + } + /** + * .Image personalCard = 52; + * @return The personalCard. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getPersonalCard() { + if (personalCardBuilder_ == null) { + return personalCard_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } else { + return personalCardBuilder_.getMessage(); + } + } + /** + * .Image personalCard = 52; + */ + public Builder setPersonalCard(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (personalCardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + personalCard_ = value; + } else { + personalCardBuilder_.setMessage(value); + } + bitField1_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .Image personalCard = 52; + */ + public Builder setPersonalCard( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (personalCardBuilder_ == null) { + personalCard_ = builderForValue.build(); + } else { + personalCardBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .Image personalCard = 52; + */ + public Builder mergePersonalCard(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (personalCardBuilder_ == null) { + if (((bitField1_ & 0x00080000) != 0) && + personalCard_ != null && + personalCard_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getPersonalCardBuilder().mergeFrom(value); + } else { + personalCard_ = value; + } + } else { + personalCardBuilder_.mergeFrom(value); + } + if (personalCard_ != null) { + bitField1_ |= 0x00080000; + onChanged(); + } + return this; + } + /** + * .Image personalCard = 52; + */ + public Builder clearPersonalCard() { + bitField1_ = (bitField1_ & ~0x00080000); + personalCard_ = null; + if (personalCardBuilder_ != null) { + personalCardBuilder_.dispose(); + personalCardBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image personalCard = 52; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getPersonalCardBuilder() { + bitField1_ |= 0x00080000; + onChanged(); + return getPersonalCardFieldBuilder().getBuilder(); + } + /** + * .Image personalCard = 52; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getPersonalCardOrBuilder() { + if (personalCardBuilder_ != null) { + return personalCardBuilder_.getMessageOrBuilder(); + } else { + return personalCard_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } + } + /** + * .Image personalCard = 52; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getPersonalCardFieldBuilder() { + if (personalCardBuilder_ == null) { + personalCardBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getPersonalCard(), + getParentForChildren(), + isClean()); + personalCard_ = null; + } + return personalCardBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo authenticationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder> authenticationInfoBuilder_; + /** + * .User.AuthenticationInfo authenticationInfo = 53; + * @return Whether the authenticationInfo field is set. + */ + public boolean hasAuthenticationInfo() { + return ((bitField1_ & 0x00100000) != 0); + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + * @return The authenticationInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getAuthenticationInfo() { + if (authenticationInfoBuilder_ == null) { + return authenticationInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } else { + return authenticationInfoBuilder_.getMessage(); + } + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + public Builder setAuthenticationInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authenticationInfo_ = value; + } else { + authenticationInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + public Builder setAuthenticationInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder builderForValue) { + if (authenticationInfoBuilder_ == null) { + authenticationInfo_ = builderForValue.build(); + } else { + authenticationInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + public Builder mergeAuthenticationInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (((bitField1_ & 0x00100000) != 0) && + authenticationInfo_ != null && + authenticationInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance()) { + getAuthenticationInfoBuilder().mergeFrom(value); + } else { + authenticationInfo_ = value; + } + } else { + authenticationInfoBuilder_.mergeFrom(value); + } + if (authenticationInfo_ != null) { + bitField1_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + public Builder clearAuthenticationInfo() { + bitField1_ = (bitField1_ & ~0x00100000); + authenticationInfo_ = null; + if (authenticationInfoBuilder_ != null) { + authenticationInfoBuilder_.dispose(); + authenticationInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder getAuthenticationInfoBuilder() { + bitField1_ |= 0x00100000; + onChanged(); + return getAuthenticationInfoFieldBuilder().getBuilder(); + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { + if (authenticationInfoBuilder_ != null) { + return authenticationInfoBuilder_.getMessageOrBuilder(); + } else { + return authenticationInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + } + /** + * .User.AuthenticationInfo authenticationInfo = 53; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder> + getAuthenticationInfoFieldBuilder() { + if (authenticationInfoBuilder_ == null) { + authenticationInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder>( + getAuthenticationInfo(), + getParentForChildren(), + isClean()); + authenticationInfo_ = null; + } + return authenticationInfoBuilder_; + } + + private int authorizationInfo_ ; + /** + * int32 authorizationInfo = 54; + * @return The authorizationInfo. + */ + @java.lang.Override + public int getAuthorizationInfo() { + return authorizationInfo_; + } + /** + * int32 authorizationInfo = 54; + * @param value The authorizationInfo to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationInfo(int value) { + + authorizationInfo_ = value; + bitField1_ |= 0x00200000; + onChanged(); + return this; + } + /** + * int32 authorizationInfo = 54; + * @return This builder for chaining. + */ + public Builder clearAuthorizationInfo() { + bitField1_ = (bitField1_ & ~0x00200000); + authorizationInfo_ = 0; + onChanged(); + return this; + } + + private int adversaryAuthorizationInfo_ ; + /** + * int32 adversaryAuthorizationInfo = 55; + * @return The adversaryAuthorizationInfo. + */ + @java.lang.Override + public int getAdversaryAuthorizationInfo() { + return adversaryAuthorizationInfo_; + } + /** + * int32 adversaryAuthorizationInfo = 55; + * @param value The adversaryAuthorizationInfo to set. + * @return This builder for chaining. + */ + public Builder setAdversaryAuthorizationInfo(int value) { + + adversaryAuthorizationInfo_ = value; + bitField1_ |= 0x00400000; + onChanged(); + return this; + } + /** + * int32 adversaryAuthorizationInfo = 55; + * @return This builder for chaining. + */ + public Builder clearAdversaryAuthorizationInfo() { + bitField1_ = (bitField1_ & ~0x00400000); + adversaryAuthorizationInfo_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo poiInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder> poiInfoBuilder_; + /** + * .User.PoiInfo poiInfo = 56; + * @return Whether the poiInfo field is set. + */ + public boolean hasPoiInfo() { + return ((bitField1_ & 0x00800000) != 0); + } + /** + * .User.PoiInfo poiInfo = 56; + * @return The poiInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getPoiInfo() { + if (poiInfoBuilder_ == null) { + return poiInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } else { + return poiInfoBuilder_.getMessage(); + } + } + /** + * .User.PoiInfo poiInfo = 56; + */ + public Builder setPoiInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo value) { + if (poiInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + poiInfo_ = value; + } else { + poiInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .User.PoiInfo poiInfo = 56; + */ + public Builder setPoiInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder builderForValue) { + if (poiInfoBuilder_ == null) { + poiInfo_ = builderForValue.build(); + } else { + poiInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .User.PoiInfo poiInfo = 56; + */ + public Builder mergePoiInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo value) { + if (poiInfoBuilder_ == null) { + if (((bitField1_ & 0x00800000) != 0) && + poiInfo_ != null && + poiInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance()) { + getPoiInfoBuilder().mergeFrom(value); + } else { + poiInfo_ = value; + } + } else { + poiInfoBuilder_.mergeFrom(value); + } + if (poiInfo_ != null) { + bitField1_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * .User.PoiInfo poiInfo = 56; + */ + public Builder clearPoiInfo() { + bitField1_ = (bitField1_ & ~0x00800000); + poiInfo_ = null; + if (poiInfoBuilder_ != null) { + poiInfoBuilder_.dispose(); + poiInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.PoiInfo poiInfo = 56; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder getPoiInfoBuilder() { + bitField1_ |= 0x00800000; + onChanged(); + return getPoiInfoFieldBuilder().getBuilder(); + } + /** + * .User.PoiInfo poiInfo = 56; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder getPoiInfoOrBuilder() { + if (poiInfoBuilder_ != null) { + return poiInfoBuilder_.getMessageOrBuilder(); + } else { + return poiInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } + } + /** + * .User.PoiInfo poiInfo = 56; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder> + getPoiInfoFieldBuilder() { + if (poiInfoBuilder_ == null) { + poiInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder>( + getPoiInfo(), + getParentForChildren(), + isClean()); + poiInfo_ = null; + } + return poiInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image mediaBadgeImageListList_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> mediaBadgeImageListListBuilder_; + /** + * .Image mediaBadgeImageListList = 57; + * @return Whether the mediaBadgeImageListList field is set. + */ + public boolean hasMediaBadgeImageListList() { + return ((bitField1_ & 0x01000000) != 0); + } + /** + * .Image mediaBadgeImageListList = 57; + * @return The mediaBadgeImageListList. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getMediaBadgeImageListList() { + if (mediaBadgeImageListListBuilder_ == null) { + return mediaBadgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } else { + return mediaBadgeImageListListBuilder_.getMessage(); + } + } + /** + * .Image mediaBadgeImageListList = 57; + */ + public Builder setMediaBadgeImageListList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (mediaBadgeImageListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaBadgeImageListList_ = value; + } else { + mediaBadgeImageListListBuilder_.setMessage(value); + } + bitField1_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .Image mediaBadgeImageListList = 57; + */ + public Builder setMediaBadgeImageListList( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (mediaBadgeImageListListBuilder_ == null) { + mediaBadgeImageListList_ = builderForValue.build(); + } else { + mediaBadgeImageListListBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .Image mediaBadgeImageListList = 57; + */ + public Builder mergeMediaBadgeImageListList(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (mediaBadgeImageListListBuilder_ == null) { + if (((bitField1_ & 0x01000000) != 0) && + mediaBadgeImageListList_ != null && + mediaBadgeImageListList_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getMediaBadgeImageListListBuilder().mergeFrom(value); + } else { + mediaBadgeImageListList_ = value; + } + } else { + mediaBadgeImageListListBuilder_.mergeFrom(value); + } + if (mediaBadgeImageListList_ != null) { + bitField1_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + * .Image mediaBadgeImageListList = 57; + */ + public Builder clearMediaBadgeImageListList() { + bitField1_ = (bitField1_ & ~0x01000000); + mediaBadgeImageListList_ = null; + if (mediaBadgeImageListListBuilder_ != null) { + mediaBadgeImageListListBuilder_.dispose(); + mediaBadgeImageListListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image mediaBadgeImageListList = 57; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getMediaBadgeImageListListBuilder() { + bitField1_ |= 0x01000000; + onChanged(); + return getMediaBadgeImageListListFieldBuilder().getBuilder(); + } + /** + * .Image mediaBadgeImageListList = 57; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMediaBadgeImageListListOrBuilder() { + if (mediaBadgeImageListListBuilder_ != null) { + return mediaBadgeImageListListBuilder_.getMessageOrBuilder(); + } else { + return mediaBadgeImageListList_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } + } + /** + * .Image mediaBadgeImageListList = 57; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getMediaBadgeImageListListFieldBuilder() { + if (mediaBadgeImageListListBuilder_ == null) { + mediaBadgeImageListListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getMediaBadgeImageListList(), + getParentForChildren(), + isClean()); + mediaBadgeImageListList_ = null; + } + return mediaBadgeImageListListBuilder_; + } + + private int adversaryUserStatus_ ; + /** + * int32 adversaryUserStatus = 58; + * @return The adversaryUserStatus. + */ + @java.lang.Override + public int getAdversaryUserStatus() { + return adversaryUserStatus_; + } + /** + * int32 adversaryUserStatus = 58; + * @param value The adversaryUserStatus to set. + * @return This builder for chaining. + */ + public Builder setAdversaryUserStatus(int value) { + + adversaryUserStatus_ = value; + bitField1_ |= 0x02000000; + onChanged(); + return this; + } + /** + * int32 adversaryUserStatus = 58; + * @return This builder for chaining. + */ + public Builder clearAdversaryUserStatus() { + bitField1_ = (bitField1_ & ~0x02000000); + adversaryUserStatus_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo userVipInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder> userVipInfoBuilder_; + /** + * .User.UserVIPInfo userVipInfo = 59; + * @return Whether the userVipInfo field is set. + */ + public boolean hasUserVipInfo() { + return ((bitField1_ & 0x04000000) != 0); + } + /** + * .User.UserVIPInfo userVipInfo = 59; + * @return The userVipInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getUserVipInfo() { + if (userVipInfoBuilder_ == null) { + return userVipInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } else { + return userVipInfoBuilder_.getMessage(); + } + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + public Builder setUserVipInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo value) { + if (userVipInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userVipInfo_ = value; + } else { + userVipInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x04000000; + onChanged(); + return this; + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + public Builder setUserVipInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder builderForValue) { + if (userVipInfoBuilder_ == null) { + userVipInfo_ = builderForValue.build(); + } else { + userVipInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x04000000; + onChanged(); + return this; + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + public Builder mergeUserVipInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo value) { + if (userVipInfoBuilder_ == null) { + if (((bitField1_ & 0x04000000) != 0) && + userVipInfo_ != null && + userVipInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance()) { + getUserVipInfoBuilder().mergeFrom(value); + } else { + userVipInfo_ = value; + } + } else { + userVipInfoBuilder_.mergeFrom(value); + } + if (userVipInfo_ != null) { + bitField1_ |= 0x04000000; + onChanged(); + } + return this; + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + public Builder clearUserVipInfo() { + bitField1_ = (bitField1_ & ~0x04000000); + userVipInfo_ = null; + if (userVipInfoBuilder_ != null) { + userVipInfoBuilder_.dispose(); + userVipInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder getUserVipInfoBuilder() { + bitField1_ |= 0x04000000; + onChanged(); + return getUserVipInfoFieldBuilder().getBuilder(); + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder getUserVipInfoOrBuilder() { + if (userVipInfoBuilder_ != null) { + return userVipInfoBuilder_.getMessageOrBuilder(); + } else { + return userVipInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } + } + /** + * .User.UserVIPInfo userVipInfo = 59; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder> + getUserVipInfoFieldBuilder() { + if (userVipInfoBuilder_ == null) { + userVipInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder>( + getUserVipInfo(), + getParentForChildren(), + isClean()); + userVipInfo_ = null; + } + return userVipInfoBuilder_; + } + + private com.google.protobuf.Internal.LongList commerceWebcastConfigIdsList_ = emptyLongList(); + private void ensureCommerceWebcastConfigIdsListIsMutable() { + if (!commerceWebcastConfigIdsList_.isModifiable()) { + commerceWebcastConfigIdsList_ = makeMutableCopy(commerceWebcastConfigIdsList_); + } + bitField1_ |= 0x08000000; + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @return A list containing the commerceWebcastConfigIdsList. + */ + public java.util.List + getCommerceWebcastConfigIdsListList() { + commerceWebcastConfigIdsList_.makeImmutable(); + return commerceWebcastConfigIdsList_; + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @return The count of commerceWebcastConfigIdsList. + */ + public int getCommerceWebcastConfigIdsListCount() { + return commerceWebcastConfigIdsList_.size(); + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @param index The index of the element to return. + * @return The commerceWebcastConfigIdsList at the given index. + */ + public long getCommerceWebcastConfigIdsList(int index) { + return commerceWebcastConfigIdsList_.getLong(index); + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @param index The index to set the value at. + * @param value The commerceWebcastConfigIdsList to set. + * @return This builder for chaining. + */ + public Builder setCommerceWebcastConfigIdsList( + int index, long value) { + + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.setLong(index, value); + bitField1_ |= 0x08000000; + onChanged(); + return this; + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @param value The commerceWebcastConfigIdsList to add. + * @return This builder for chaining. + */ + public Builder addCommerceWebcastConfigIdsList(long value) { + + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.addLong(value); + bitField1_ |= 0x08000000; + onChanged(); + return this; + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @param values The commerceWebcastConfigIdsList to add. + * @return This builder for chaining. + */ + public Builder addAllCommerceWebcastConfigIdsList( + java.lang.Iterable values) { + ensureCommerceWebcastConfigIdsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, commerceWebcastConfigIdsList_); + bitField1_ |= 0x08000000; + onChanged(); + return this; + } + /** + * repeated int64 commerceWebcastConfigIdsList = 60; + * @return This builder for chaining. + */ + public Builder clearCommerceWebcastConfigIdsList() { + commerceWebcastConfigIdsList_ = emptyLongList(); + bitField1_ = (bitField1_ & ~0x08000000); + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListV2List_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> badgeImageListV2ListBuilder_; + /** + * .Image badgeImageListV2List = 61; + * @return Whether the badgeImageListV2List field is set. + */ + public boolean hasBadgeImageListV2List() { + return ((bitField1_ & 0x10000000) != 0); + } + /** + * .Image badgeImageListV2List = 61; + * @return The badgeImageListV2List. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListV2List() { + if (badgeImageListV2ListBuilder_ == null) { + return badgeImageListV2List_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } else { + return badgeImageListV2ListBuilder_.getMessage(); + } + } + /** + * .Image badgeImageListV2List = 61; + */ + public Builder setBadgeImageListV2List(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListV2ListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + badgeImageListV2List_ = value; + } else { + badgeImageListV2ListBuilder_.setMessage(value); + } + bitField1_ |= 0x10000000; + onChanged(); + return this; + } + /** + * .Image badgeImageListV2List = 61; + */ + public Builder setBadgeImageListV2List( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (badgeImageListV2ListBuilder_ == null) { + badgeImageListV2List_ = builderForValue.build(); + } else { + badgeImageListV2ListBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x10000000; + onChanged(); + return this; + } + /** + * .Image badgeImageListV2List = 61; + */ + public Builder mergeBadgeImageListV2List(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListV2ListBuilder_ == null) { + if (((bitField1_ & 0x10000000) != 0) && + badgeImageListV2List_ != null && + badgeImageListV2List_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBadgeImageListV2ListBuilder().mergeFrom(value); + } else { + badgeImageListV2List_ = value; + } + } else { + badgeImageListV2ListBuilder_.mergeFrom(value); + } + if (badgeImageListV2List_ != null) { + bitField1_ |= 0x10000000; + onChanged(); + } + return this; + } + /** + * .Image badgeImageListV2List = 61; + */ + public Builder clearBadgeImageListV2List() { + bitField1_ = (bitField1_ & ~0x10000000); + badgeImageListV2List_ = null; + if (badgeImageListV2ListBuilder_ != null) { + badgeImageListV2ListBuilder_.dispose(); + badgeImageListV2ListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image badgeImageListV2List = 61; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBadgeImageListV2ListBuilder() { + bitField1_ |= 0x10000000; + onChanged(); + return getBadgeImageListV2ListFieldBuilder().getBuilder(); + } + /** + * .Image badgeImageListV2List = 61; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListV2ListOrBuilder() { + if (badgeImageListV2ListBuilder_ != null) { + return badgeImageListV2ListBuilder_.getMessageOrBuilder(); + } else { + return badgeImageListV2List_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } + } + /** + * .Image badgeImageListV2List = 61; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBadgeImageListV2ListFieldBuilder() { + if (badgeImageListV2ListBuilder_ == null) { + badgeImageListV2ListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBadgeImageListV2List(), + getParentForChildren(), + isClean()); + badgeImageListV2List_ = null; + } + return badgeImageListV2ListBuilder_; + } + + private java.lang.Object locationCity_ = ""; + /** + *
+       * IndustryCertification  industryCertification = 62;
+       * 
+ * + * string locationCity = 63; + * @return The locationCity. + */ + public java.lang.String getLocationCity() { + java.lang.Object ref = locationCity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationCity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * IndustryCertification  industryCertification = 62;
+       * 
+ * + * string locationCity = 63; + * @return The bytes for locationCity. + */ + public com.google.protobuf.ByteString + getLocationCityBytes() { + java.lang.Object ref = locationCity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationCity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * IndustryCertification  industryCertification = 62;
+       * 
+ * + * string locationCity = 63; + * @param value The locationCity to set. + * @return This builder for chaining. + */ + public Builder setLocationCity( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + locationCity_ = value; + bitField1_ |= 0x20000000; + onChanged(); + return this; + } + /** + *
+       * IndustryCertification  industryCertification = 62;
+       * 
+ * + * string locationCity = 63; + * @return This builder for chaining. + */ + public Builder clearLocationCity() { + locationCity_ = getDefaultInstance().getLocationCity(); + bitField1_ = (bitField1_ & ~0x20000000); + onChanged(); + return this; + } + /** + *
+       * IndustryCertification  industryCertification = 62;
+       * 
+ * + * string locationCity = 63; + * @param value The bytes for locationCity to set. + * @return This builder for chaining. + */ + public Builder setLocationCityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + locationCity_ = value; + bitField1_ |= 0x20000000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo fansGroupInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder> fansGroupInfoBuilder_; + /** + * .User.FansGroupInfo fansGroupInfo = 64; + * @return Whether the fansGroupInfo field is set. + */ + public boolean hasFansGroupInfo() { + return ((bitField1_ & 0x40000000) != 0); + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + * @return The fansGroupInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getFansGroupInfo() { + if (fansGroupInfoBuilder_ == null) { + return fansGroupInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } else { + return fansGroupInfoBuilder_.getMessage(); + } + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + public Builder setFansGroupInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo value) { + if (fansGroupInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fansGroupInfo_ = value; + } else { + fansGroupInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x40000000; + onChanged(); + return this; + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + public Builder setFansGroupInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder builderForValue) { + if (fansGroupInfoBuilder_ == null) { + fansGroupInfo_ = builderForValue.build(); + } else { + fansGroupInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x40000000; + onChanged(); + return this; + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + public Builder mergeFansGroupInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo value) { + if (fansGroupInfoBuilder_ == null) { + if (((bitField1_ & 0x40000000) != 0) && + fansGroupInfo_ != null && + fansGroupInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance()) { + getFansGroupInfoBuilder().mergeFrom(value); + } else { + fansGroupInfo_ = value; + } + } else { + fansGroupInfoBuilder_.mergeFrom(value); + } + if (fansGroupInfo_ != null) { + bitField1_ |= 0x40000000; + onChanged(); + } + return this; + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + public Builder clearFansGroupInfo() { + bitField1_ = (bitField1_ & ~0x40000000); + fansGroupInfo_ = null; + if (fansGroupInfoBuilder_ != null) { + fansGroupInfoBuilder_.dispose(); + fansGroupInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder getFansGroupInfoBuilder() { + bitField1_ |= 0x40000000; + onChanged(); + return getFansGroupInfoFieldBuilder().getBuilder(); + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder getFansGroupInfoOrBuilder() { + if (fansGroupInfoBuilder_ != null) { + return fansGroupInfoBuilder_.getMessageOrBuilder(); + } else { + return fansGroupInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } + } + /** + * .User.FansGroupInfo fansGroupInfo = 64; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder> + getFansGroupInfoFieldBuilder() { + if (fansGroupInfoBuilder_ == null) { + fansGroupInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder>( + getFansGroupInfo(), + getParentForChildren(), + isClean()); + fansGroupInfo_ = null; + } + return fansGroupInfoBuilder_; + } + + private java.lang.Object remarkName_ = ""; + /** + * string remarkName = 65; + * @return The remarkName. + */ + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string remarkName = 65; + * @return The bytes for remarkName. + */ + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string remarkName = 65; + * @param value The remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remarkName_ = value; + bitField1_ |= 0x80000000; + onChanged(); + return this; + } + /** + * string remarkName = 65; + * @return This builder for chaining. + */ + public Builder clearRemarkName() { + remarkName_ = getDefaultInstance().getRemarkName(); + bitField1_ = (bitField1_ & ~0x80000000); + onChanged(); + return this; + } + /** + * string remarkName = 65; + * @param value The bytes for remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remarkName_ = value; + bitField1_ |= 0x80000000; + onChanged(); + return this; + } + + private int mysteryMan_ ; + /** + * int32 mysteryMan = 66; + * @return The mysteryMan. + */ + @java.lang.Override + public int getMysteryMan() { + return mysteryMan_; + } + /** + * int32 mysteryMan = 66; + * @param value The mysteryMan to set. + * @return This builder for chaining. + */ + public Builder setMysteryMan(int value) { + + mysteryMan_ = value; + bitField2_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 mysteryMan = 66; + * @return This builder for chaining. + */ + public Builder clearMysteryMan() { + bitField2_ = (bitField2_ & ~0x00000001); + mysteryMan_ = 0; + onChanged(); + return this; + } + + private java.lang.Object webRid_ = ""; + /** + * string webRid = 67; + * @return The webRid. + */ + public java.lang.String getWebRid() { + java.lang.Object ref = webRid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webRid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string webRid = 67; + * @return The bytes for webRid. + */ + public com.google.protobuf.ByteString + getWebRidBytes() { + java.lang.Object ref = webRid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webRid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string webRid = 67; + * @param value The webRid to set. + * @return This builder for chaining. + */ + public Builder setWebRid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + webRid_ = value; + bitField2_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string webRid = 67; + * @return This builder for chaining. + */ + public Builder clearWebRid() { + webRid_ = getDefaultInstance().getWebRid(); + bitField2_ = (bitField2_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string webRid = 67; + * @param value The bytes for webRid to set. + * @return This builder for chaining. + */ + public Builder setWebRidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + webRid_ = value; + bitField2_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object desensitizedNickname_ = ""; + /** + * string desensitizedNickname = 68; + * @return The desensitizedNickname. + */ + public java.lang.String getDesensitizedNickname() { + java.lang.Object ref = desensitizedNickname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + desensitizedNickname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string desensitizedNickname = 68; + * @return The bytes for desensitizedNickname. + */ + public com.google.protobuf.ByteString + getDesensitizedNicknameBytes() { + java.lang.Object ref = desensitizedNickname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + desensitizedNickname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string desensitizedNickname = 68; + * @param value The desensitizedNickname to set. + * @return This builder for chaining. + */ + public Builder setDesensitizedNickname( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + desensitizedNickname_ = value; + bitField2_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string desensitizedNickname = 68; + * @return This builder for chaining. + */ + public Builder clearDesensitizedNickname() { + desensitizedNickname_ = getDefaultInstance().getDesensitizedNickname(); + bitField2_ = (bitField2_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string desensitizedNickname = 68; + * @param value The bytes for desensitizedNickname to set. + * @return This builder for chaining. + */ + public Builder setDesensitizedNicknameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + desensitizedNickname_ = value; + bitField2_ |= 0x00000004; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo jAccreditInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder> jAccreditInfoBuilder_; + /** + * .User.JAccreditInfo jAccreditInfo = 69; + * @return Whether the jAccreditInfo field is set. + */ + public boolean hasJAccreditInfo() { + return ((bitField2_ & 0x00000008) != 0); + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + * @return The jAccreditInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getJAccreditInfo() { + if (jAccreditInfoBuilder_ == null) { + return jAccreditInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } else { + return jAccreditInfoBuilder_.getMessage(); + } + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + public Builder setJAccreditInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo value) { + if (jAccreditInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jAccreditInfo_ = value; + } else { + jAccreditInfoBuilder_.setMessage(value); + } + bitField2_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + public Builder setJAccreditInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder builderForValue) { + if (jAccreditInfoBuilder_ == null) { + jAccreditInfo_ = builderForValue.build(); + } else { + jAccreditInfoBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + public Builder mergeJAccreditInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo value) { + if (jAccreditInfoBuilder_ == null) { + if (((bitField2_ & 0x00000008) != 0) && + jAccreditInfo_ != null && + jAccreditInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance()) { + getJAccreditInfoBuilder().mergeFrom(value); + } else { + jAccreditInfo_ = value; + } + } else { + jAccreditInfoBuilder_.mergeFrom(value); + } + if (jAccreditInfo_ != null) { + bitField2_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + public Builder clearJAccreditInfo() { + bitField2_ = (bitField2_ & ~0x00000008); + jAccreditInfo_ = null; + if (jAccreditInfoBuilder_ != null) { + jAccreditInfoBuilder_.dispose(); + jAccreditInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder getJAccreditInfoBuilder() { + bitField2_ |= 0x00000008; + onChanged(); + return getJAccreditInfoFieldBuilder().getBuilder(); + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder getJAccreditInfoOrBuilder() { + if (jAccreditInfoBuilder_ != null) { + return jAccreditInfoBuilder_.getMessageOrBuilder(); + } else { + return jAccreditInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } + } + /** + * .User.JAccreditInfo jAccreditInfo = 69; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder> + getJAccreditInfoFieldBuilder() { + if (jAccreditInfoBuilder_ == null) { + jAccreditInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder>( + getJAccreditInfo(), + getParentForChildren(), + isClean()); + jAccreditInfo_ = null; + } + return jAccreditInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe subscribe_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder> subscribeBuilder_; + /** + * .User.Subscribe subscribe = 70; + * @return Whether the subscribe field is set. + */ + public boolean hasSubscribe() { + return ((bitField2_ & 0x00000010) != 0); + } + /** + * .User.Subscribe subscribe = 70; + * @return The subscribe. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe getSubscribe() { + if (subscribeBuilder_ == null) { + return subscribe_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } else { + return subscribeBuilder_.getMessage(); + } + } + /** + * .User.Subscribe subscribe = 70; + */ + public Builder setSubscribe(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe value) { + if (subscribeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subscribe_ = value; + } else { + subscribeBuilder_.setMessage(value); + } + bitField2_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .User.Subscribe subscribe = 70; + */ + public Builder setSubscribe( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder builderForValue) { + if (subscribeBuilder_ == null) { + subscribe_ = builderForValue.build(); + } else { + subscribeBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .User.Subscribe subscribe = 70; + */ + public Builder mergeSubscribe(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe value) { + if (subscribeBuilder_ == null) { + if (((bitField2_ & 0x00000010) != 0) && + subscribe_ != null && + subscribe_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance()) { + getSubscribeBuilder().mergeFrom(value); + } else { + subscribe_ = value; + } + } else { + subscribeBuilder_.mergeFrom(value); + } + if (subscribe_ != null) { + bitField2_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .User.Subscribe subscribe = 70; + */ + public Builder clearSubscribe() { + bitField2_ = (bitField2_ & ~0x00000010); + subscribe_ = null; + if (subscribeBuilder_ != null) { + subscribeBuilder_.dispose(); + subscribeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.Subscribe subscribe = 70; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder getSubscribeBuilder() { + bitField2_ |= 0x00000010; + onChanged(); + return getSubscribeFieldBuilder().getBuilder(); + } + /** + * .User.Subscribe subscribe = 70; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder getSubscribeOrBuilder() { + if (subscribeBuilder_ != null) { + return subscribeBuilder_.getMessageOrBuilder(); + } else { + return subscribe_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } + } + /** + * .User.Subscribe subscribe = 70; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder> + getSubscribeFieldBuilder() { + if (subscribeBuilder_ == null) { + subscribeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder>( + getSubscribe(), + getParentForChildren(), + isClean()); + subscribe_ = null; + } + return subscribeBuilder_; + } + + private boolean isAnonymous_ ; + /** + * bool isAnonymous = 71; + * @return The isAnonymous. + */ + @java.lang.Override + public boolean getIsAnonymous() { + return isAnonymous_; + } + /** + * bool isAnonymous = 71; + * @param value The isAnonymous to set. + * @return This builder for chaining. + */ + public Builder setIsAnonymous(boolean value) { + + isAnonymous_ = value; + bitField2_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bool isAnonymous = 71; + * @return This builder for chaining. + */ + public Builder clearIsAnonymous() { + bitField2_ = (bitField2_ & ~0x00000020); + isAnonymous_ = false; + onChanged(); + return this; + } + + private int consumeDiamondLevel_ ; + /** + * int32 consumeDiamondLevel = 72; + * @return The consumeDiamondLevel. + */ + @java.lang.Override + public int getConsumeDiamondLevel() { + return consumeDiamondLevel_; + } + /** + * int32 consumeDiamondLevel = 72; + * @param value The consumeDiamondLevel to set. + * @return This builder for chaining. + */ + public Builder setConsumeDiamondLevel(int value) { + + consumeDiamondLevel_ = value; + bitField2_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int32 consumeDiamondLevel = 72; + * @return This builder for chaining. + */ + public Builder clearConsumeDiamondLevel() { + bitField2_ = (bitField2_ & ~0x00000040); + consumeDiamondLevel_ = 0; + onChanged(); + return this; + } + + private java.lang.Object webcastUid_ = ""; + /** + * string webcastUid = 73; + * @return The webcastUid. + */ + public java.lang.String getWebcastUid() { + java.lang.Object ref = webcastUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webcastUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string webcastUid = 73; + * @return The bytes for webcastUid. + */ + public com.google.protobuf.ByteString + getWebcastUidBytes() { + java.lang.Object ref = webcastUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webcastUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string webcastUid = 73; + * @param value The webcastUid to set. + * @return This builder for chaining. + */ + public Builder setWebcastUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + webcastUid_ = value; + bitField2_ |= 0x00000080; + onChanged(); + return this; + } + /** + * string webcastUid = 73; + * @return This builder for chaining. + */ + public Builder clearWebcastUid() { + webcastUid_ = getDefaultInstance().getWebcastUid(); + bitField2_ = (bitField2_ & ~0x00000080); + onChanged(); + return this; + } + /** + * string webcastUid = 73; + * @param value The bytes for webcastUid to set. + * @return This builder for chaining. + */ + public Builder setWebcastUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + webcastUid_ = value; + bitField2_ |= 0x00000080; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams profileStyleParams_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder> profileStyleParamsBuilder_; + /** + * .User.ProfileStyleParams profileStyleParams = 74; + * @return Whether the profileStyleParams field is set. + */ + public boolean hasProfileStyleParams() { + return ((bitField2_ & 0x00000100) != 0); + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + * @return The profileStyleParams. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getProfileStyleParams() { + if (profileStyleParamsBuilder_ == null) { + return profileStyleParams_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } else { + return profileStyleParamsBuilder_.getMessage(); + } + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + public Builder setProfileStyleParams(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams value) { + if (profileStyleParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileStyleParams_ = value; + } else { + profileStyleParamsBuilder_.setMessage(value); + } + bitField2_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + public Builder setProfileStyleParams( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder builderForValue) { + if (profileStyleParamsBuilder_ == null) { + profileStyleParams_ = builderForValue.build(); + } else { + profileStyleParamsBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000100; + onChanged(); + return this; + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + public Builder mergeProfileStyleParams(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams value) { + if (profileStyleParamsBuilder_ == null) { + if (((bitField2_ & 0x00000100) != 0) && + profileStyleParams_ != null && + profileStyleParams_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance()) { + getProfileStyleParamsBuilder().mergeFrom(value); + } else { + profileStyleParams_ = value; + } + } else { + profileStyleParamsBuilder_.mergeFrom(value); + } + if (profileStyleParams_ != null) { + bitField2_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + public Builder clearProfileStyleParams() { + bitField2_ = (bitField2_ & ~0x00000100); + profileStyleParams_ = null; + if (profileStyleParamsBuilder_ != null) { + profileStyleParamsBuilder_.dispose(); + profileStyleParamsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder getProfileStyleParamsBuilder() { + bitField2_ |= 0x00000100; + onChanged(); + return getProfileStyleParamsFieldBuilder().getBuilder(); + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder getProfileStyleParamsOrBuilder() { + if (profileStyleParamsBuilder_ != null) { + return profileStyleParamsBuilder_.getMessageOrBuilder(); + } else { + return profileStyleParams_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } + } + /** + * .User.ProfileStyleParams profileStyleParams = 74; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder> + getProfileStyleParamsFieldBuilder() { + if (profileStyleParamsBuilder_ == null) { + profileStyleParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder>( + getProfileStyleParams(), + getParentForChildren(), + isClean()); + profileStyleParams_ = null; + } + return profileStyleParamsBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo userDressInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder> userDressInfoBuilder_; + /** + * .User.UserDressInfo userDressInfo = 75; + * @return Whether the userDressInfo field is set. + */ + public boolean hasUserDressInfo() { + return ((bitField2_ & 0x00000200) != 0); + } + /** + * .User.UserDressInfo userDressInfo = 75; + * @return The userDressInfo. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getUserDressInfo() { + if (userDressInfoBuilder_ == null) { + return userDressInfo_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } else { + return userDressInfoBuilder_.getMessage(); + } + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + public Builder setUserDressInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo value) { + if (userDressInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userDressInfo_ = value; + } else { + userDressInfoBuilder_.setMessage(value); + } + bitField2_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + public Builder setUserDressInfo( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder builderForValue) { + if (userDressInfoBuilder_ == null) { + userDressInfo_ = builderForValue.build(); + } else { + userDressInfoBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + public Builder mergeUserDressInfo(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo value) { + if (userDressInfoBuilder_ == null) { + if (((bitField2_ & 0x00000200) != 0) && + userDressInfo_ != null && + userDressInfo_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance()) { + getUserDressInfoBuilder().mergeFrom(value); + } else { + userDressInfo_ = value; + } + } else { + userDressInfoBuilder_.mergeFrom(value); + } + if (userDressInfo_ != null) { + bitField2_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + public Builder clearUserDressInfo() { + bitField2_ = (bitField2_ & ~0x00000200); + userDressInfo_ = null; + if (userDressInfoBuilder_ != null) { + userDressInfoBuilder_.dispose(); + userDressInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder getUserDressInfoBuilder() { + bitField2_ |= 0x00000200; + onChanged(); + return getUserDressInfoFieldBuilder().getBuilder(); + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder getUserDressInfoOrBuilder() { + if (userDressInfoBuilder_ != null) { + return userDressInfoBuilder_.getMessageOrBuilder(); + } else { + return userDressInfo_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } + } + /** + * .User.UserDressInfo userDressInfo = 75; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder> + getUserDressInfoFieldBuilder() { + if (userDressInfoBuilder_ == null) { + userDressInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder>( + getUserDressInfo(), + getParentForChildren(), + isClean()); + userDressInfo_ = null; + } + return userDressInfoBuilder_; + } + + private boolean allowBeLocated_ ; + /** + * bool allowBeLocated = 1001; + * @return The allowBeLocated. + */ + @java.lang.Override + public boolean getAllowBeLocated() { + return allowBeLocated_; + } + /** + * bool allowBeLocated = 1001; + * @param value The allowBeLocated to set. + * @return This builder for chaining. + */ + public Builder setAllowBeLocated(boolean value) { + + allowBeLocated_ = value; + bitField2_ |= 0x00000400; + onChanged(); + return this; + } + /** + * bool allowBeLocated = 1001; + * @return This builder for chaining. + */ + public Builder clearAllowBeLocated() { + bitField2_ = (bitField2_ & ~0x00000400); + allowBeLocated_ = false; + onChanged(); + return this; + } + + private boolean allowFindByContacts_ ; + /** + * bool allowFindByContacts = 1002; + * @return The allowFindByContacts. + */ + @java.lang.Override + public boolean getAllowFindByContacts() { + return allowFindByContacts_; + } + /** + * bool allowFindByContacts = 1002; + * @param value The allowFindByContacts to set. + * @return This builder for chaining. + */ + public Builder setAllowFindByContacts(boolean value) { + + allowFindByContacts_ = value; + bitField2_ |= 0x00000800; + onChanged(); + return this; + } + /** + * bool allowFindByContacts = 1002; + * @return This builder for chaining. + */ + public Builder clearAllowFindByContacts() { + bitField2_ = (bitField2_ & ~0x00000800); + allowFindByContacts_ = false; + onChanged(); + return this; + } + + private boolean allowOthersDownloadVideo_ ; + /** + * bool allowOthersDownloadVideo = 1003; + * @return The allowOthersDownloadVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadVideo() { + return allowOthersDownloadVideo_; + } + /** + * bool allowOthersDownloadVideo = 1003; + * @param value The allowOthersDownloadVideo to set. + * @return This builder for chaining. + */ + public Builder setAllowOthersDownloadVideo(boolean value) { + + allowOthersDownloadVideo_ = value; + bitField2_ |= 0x00001000; + onChanged(); + return this; + } + /** + * bool allowOthersDownloadVideo = 1003; + * @return This builder for chaining. + */ + public Builder clearAllowOthersDownloadVideo() { + bitField2_ = (bitField2_ & ~0x00001000); + allowOthersDownloadVideo_ = false; + onChanged(); + return this; + } + + private boolean allowOthersDownloadWhenSharingVideo_ ; + /** + * bool allowOthersDownloadWhenSharingVideo = 1004; + * @return The allowOthersDownloadWhenSharingVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadWhenSharingVideo() { + return allowOthersDownloadWhenSharingVideo_; + } + /** + * bool allowOthersDownloadWhenSharingVideo = 1004; + * @param value The allowOthersDownloadWhenSharingVideo to set. + * @return This builder for chaining. + */ + public Builder setAllowOthersDownloadWhenSharingVideo(boolean value) { + + allowOthersDownloadWhenSharingVideo_ = value; + bitField2_ |= 0x00002000; + onChanged(); + return this; + } + /** + * bool allowOthersDownloadWhenSharingVideo = 1004; + * @return This builder for chaining. + */ + public Builder clearAllowOthersDownloadWhenSharingVideo() { + bitField2_ = (bitField2_ & ~0x00002000); + allowOthersDownloadWhenSharingVideo_ = false; + onChanged(); + return this; + } + + private boolean allowShareShowProfile_ ; + /** + * bool allowShareShowProfile = 1005; + * @return The allowShareShowProfile. + */ + @java.lang.Override + public boolean getAllowShareShowProfile() { + return allowShareShowProfile_; + } + /** + * bool allowShareShowProfile = 1005; + * @param value The allowShareShowProfile to set. + * @return This builder for chaining. + */ + public Builder setAllowShareShowProfile(boolean value) { + + allowShareShowProfile_ = value; + bitField2_ |= 0x00004000; + onChanged(); + return this; + } + /** + * bool allowShareShowProfile = 1005; + * @return This builder for chaining. + */ + public Builder clearAllowShareShowProfile() { + bitField2_ = (bitField2_ & ~0x00004000); + allowShareShowProfile_ = false; + onChanged(); + return this; + } + + private boolean allowShowInGossip_ ; + /** + * bool allowShowInGossip = 1006; + * @return The allowShowInGossip. + */ + @java.lang.Override + public boolean getAllowShowInGossip() { + return allowShowInGossip_; + } + /** + * bool allowShowInGossip = 1006; + * @param value The allowShowInGossip to set. + * @return This builder for chaining. + */ + public Builder setAllowShowInGossip(boolean value) { + + allowShowInGossip_ = value; + bitField2_ |= 0x00008000; + onChanged(); + return this; + } + /** + * bool allowShowInGossip = 1006; + * @return This builder for chaining. + */ + public Builder clearAllowShowInGossip() { + bitField2_ = (bitField2_ & ~0x00008000); + allowShowInGossip_ = false; + onChanged(); + return this; + } + + private boolean allowShowMyAction_ ; + /** + * bool allowShowMyAction = 1007; + * @return The allowShowMyAction. + */ + @java.lang.Override + public boolean getAllowShowMyAction() { + return allowShowMyAction_; + } + /** + * bool allowShowMyAction = 1007; + * @param value The allowShowMyAction to set. + * @return This builder for chaining. + */ + public Builder setAllowShowMyAction(boolean value) { + + allowShowMyAction_ = value; + bitField2_ |= 0x00010000; + onChanged(); + return this; + } + /** + * bool allowShowMyAction = 1007; + * @return This builder for chaining. + */ + public Builder clearAllowShowMyAction() { + bitField2_ = (bitField2_ & ~0x00010000); + allowShowMyAction_ = false; + onChanged(); + return this; + } + + private boolean allowStrangeComment_ ; + /** + * bool allowStrangeComment = 1008; + * @return The allowStrangeComment. + */ + @java.lang.Override + public boolean getAllowStrangeComment() { + return allowStrangeComment_; + } + /** + * bool allowStrangeComment = 1008; + * @param value The allowStrangeComment to set. + * @return This builder for chaining. + */ + public Builder setAllowStrangeComment(boolean value) { + + allowStrangeComment_ = value; + bitField2_ |= 0x00020000; + onChanged(); + return this; + } + /** + * bool allowStrangeComment = 1008; + * @return This builder for chaining. + */ + public Builder clearAllowStrangeComment() { + bitField2_ = (bitField2_ & ~0x00020000); + allowStrangeComment_ = false; + onChanged(); + return this; + } + + private boolean allowUnfollowerComment_ ; + /** + * bool allowUnfollowerComment = 1009; + * @return The allowUnfollowerComment. + */ + @java.lang.Override + public boolean getAllowUnfollowerComment() { + return allowUnfollowerComment_; + } + /** + * bool allowUnfollowerComment = 1009; + * @param value The allowUnfollowerComment to set. + * @return This builder for chaining. + */ + public Builder setAllowUnfollowerComment(boolean value) { + + allowUnfollowerComment_ = value; + bitField2_ |= 0x00040000; + onChanged(); + return this; + } + /** + * bool allowUnfollowerComment = 1009; + * @return This builder for chaining. + */ + public Builder clearAllowUnfollowerComment() { + bitField2_ = (bitField2_ & ~0x00040000); + allowUnfollowerComment_ = false; + onChanged(); + return this; + } + + private boolean allowUseLinkmic_ ; + /** + * bool allowUseLinkmic = 1010; + * @return The allowUseLinkmic. + */ + @java.lang.Override + public boolean getAllowUseLinkmic() { + return allowUseLinkmic_; + } + /** + * bool allowUseLinkmic = 1010; + * @param value The allowUseLinkmic to set. + * @return This builder for chaining. + */ + public Builder setAllowUseLinkmic(boolean value) { + + allowUseLinkmic_ = value; + bitField2_ |= 0x00080000; + onChanged(); + return this; + } + /** + * bool allowUseLinkmic = 1010; + * @return This builder for chaining. + */ + public Builder clearAllowUseLinkmic() { + bitField2_ = (bitField2_ & ~0x00080000); + allowUseLinkmic_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel anchorLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> anchorLevelBuilder_; + /** + * .User.AnchorLevel anchorLevel = 1011; + * @return Whether the anchorLevel field is set. + */ + public boolean hasAnchorLevel() { + return ((bitField2_ & 0x00100000) != 0); + } + /** + * .User.AnchorLevel anchorLevel = 1011; + * @return The anchorLevel. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getAnchorLevel() { + if (anchorLevelBuilder_ == null) { + return anchorLevel_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } else { + return anchorLevelBuilder_.getMessage(); + } + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + public Builder setAnchorLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (anchorLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anchorLevel_ = value; + } else { + anchorLevelBuilder_.setMessage(value); + } + bitField2_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + public Builder setAnchorLevel( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder builderForValue) { + if (anchorLevelBuilder_ == null) { + anchorLevel_ = builderForValue.build(); + } else { + anchorLevelBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + public Builder mergeAnchorLevel(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (anchorLevelBuilder_ == null) { + if (((bitField2_ & 0x00100000) != 0) && + anchorLevel_ != null && + anchorLevel_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance()) { + getAnchorLevelBuilder().mergeFrom(value); + } else { + anchorLevel_ = value; + } + } else { + anchorLevelBuilder_.mergeFrom(value); + } + if (anchorLevel_ != null) { + bitField2_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + public Builder clearAnchorLevel() { + bitField2_ = (bitField2_ & ~0x00100000); + anchorLevel_ = null; + if (anchorLevelBuilder_ != null) { + anchorLevelBuilder_.dispose(); + anchorLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder getAnchorLevelBuilder() { + bitField2_ |= 0x00100000; + onChanged(); + return getAnchorLevelFieldBuilder().getBuilder(); + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getAnchorLevelOrBuilder() { + if (anchorLevelBuilder_ != null) { + return anchorLevelBuilder_.getMessageOrBuilder(); + } else { + return anchorLevel_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } + } + /** + * .User.AnchorLevel anchorLevel = 1011; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> + getAnchorLevelFieldBuilder() { + if (anchorLevelBuilder_ == null) { + anchorLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder>( + getAnchorLevel(), + getParentForChildren(), + isClean()); + anchorLevel_ = null; + } + return anchorLevelBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image avatarJpg_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarJpgBuilder_; + /** + * .Image avatarJpg = 1012; + * @return Whether the avatarJpg field is set. + */ + public boolean hasAvatarJpg() { + return ((bitField2_ & 0x00200000) != 0); + } + /** + * .Image avatarJpg = 1012; + * @return The avatarJpg. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image getAvatarJpg() { + if (avatarJpgBuilder_ == null) { + return avatarJpg_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } else { + return avatarJpgBuilder_.getMessage(); + } + } + /** + * .Image avatarJpg = 1012; + */ + public Builder setAvatarJpg(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarJpgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarJpg_ = value; + } else { + avatarJpgBuilder_.setMessage(value); + } + bitField2_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .Image avatarJpg = 1012; + */ + public Builder setAvatarJpg( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarJpgBuilder_ == null) { + avatarJpg_ = builderForValue.build(); + } else { + avatarJpgBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .Image avatarJpg = 1012; + */ + public Builder mergeAvatarJpg(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarJpgBuilder_ == null) { + if (((bitField2_ & 0x00200000) != 0) && + avatarJpg_ != null && + avatarJpg_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarJpgBuilder().mergeFrom(value); + } else { + avatarJpg_ = value; + } + } else { + avatarJpgBuilder_.mergeFrom(value); + } + if (avatarJpg_ != null) { + bitField2_ |= 0x00200000; + onChanged(); + } + return this; + } + /** + * .Image avatarJpg = 1012; + */ + public Builder clearAvatarJpg() { + bitField2_ = (bitField2_ & ~0x00200000); + avatarJpg_ = null; + if (avatarJpgBuilder_ != null) { + avatarJpgBuilder_.dispose(); + avatarJpgBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Image avatarJpg = 1012; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarJpgBuilder() { + bitField2_ |= 0x00200000; + onChanged(); + return getAvatarJpgFieldBuilder().getBuilder(); + } + /** + * .Image avatarJpg = 1012; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarJpgOrBuilder() { + if (avatarJpgBuilder_ != null) { + return avatarJpgBuilder_.getMessageOrBuilder(); + } else { + return avatarJpg_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } + } + /** + * .Image avatarJpg = 1012; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarJpgFieldBuilder() { + if (avatarJpgBuilder_ == null) { + avatarJpgBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarJpg(), + getParentForChildren(), + isClean()); + avatarJpg_ = null; + } + return avatarJpgBuilder_; + } + + private java.lang.Object bgImgUrl_ = ""; + /** + * string bgImgUrl = 1013; + * @return The bgImgUrl. + */ + public java.lang.String getBgImgUrl() { + java.lang.Object ref = bgImgUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bgImgUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string bgImgUrl = 1013; + * @return The bytes for bgImgUrl. + */ + public com.google.protobuf.ByteString + getBgImgUrlBytes() { + java.lang.Object ref = bgImgUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bgImgUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string bgImgUrl = 1013; + * @param value The bgImgUrl to set. + * @return This builder for chaining. + */ + public Builder setBgImgUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + bgImgUrl_ = value; + bitField2_ |= 0x00400000; + onChanged(); + return this; + } + /** + * string bgImgUrl = 1013; + * @return This builder for chaining. + */ + public Builder clearBgImgUrl() { + bgImgUrl_ = getDefaultInstance().getBgImgUrl(); + bitField2_ = (bitField2_ & ~0x00400000); + onChanged(); + return this; + } + /** + * string bgImgUrl = 1013; + * @param value The bytes for bgImgUrl to set. + * @return This builder for chaining. + */ + public Builder setBgImgUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + bgImgUrl_ = value; + bitField2_ |= 0x00400000; + onChanged(); + return this; + } + + private java.lang.Object birthdayDescription_ = ""; + /** + * string birthdayDescription = 1014; + * @return The birthdayDescription. + */ + public java.lang.String getBirthdayDescription() { + java.lang.Object ref = birthdayDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + birthdayDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string birthdayDescription = 1014; + * @return The bytes for birthdayDescription. + */ + public com.google.protobuf.ByteString + getBirthdayDescriptionBytes() { + java.lang.Object ref = birthdayDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + birthdayDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string birthdayDescription = 1014; + * @param value The birthdayDescription to set. + * @return This builder for chaining. + */ + public Builder setBirthdayDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + birthdayDescription_ = value; + bitField2_ |= 0x00800000; + onChanged(); + return this; + } + /** + * string birthdayDescription = 1014; + * @return This builder for chaining. + */ + public Builder clearBirthdayDescription() { + birthdayDescription_ = getDefaultInstance().getBirthdayDescription(); + bitField2_ = (bitField2_ & ~0x00800000); + onChanged(); + return this; + } + /** + * string birthdayDescription = 1014; + * @param value The bytes for birthdayDescription to set. + * @return This builder for chaining. + */ + public Builder setBirthdayDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + birthdayDescription_ = value; + bitField2_ |= 0x00800000; + onChanged(); + return this; + } + + private boolean birthdayValid_ ; + /** + * bool birthdayValid = 1015; + * @return The birthdayValid. + */ + @java.lang.Override + public boolean getBirthdayValid() { + return birthdayValid_; + } + /** + * bool birthdayValid = 1015; + * @param value The birthdayValid to set. + * @return This builder for chaining. + */ + public Builder setBirthdayValid(boolean value) { + + birthdayValid_ = value; + bitField2_ |= 0x01000000; + onChanged(); + return this; + } + /** + * bool birthdayValid = 1015; + * @return This builder for chaining. + */ + public Builder clearBirthdayValid() { + bitField2_ = (bitField2_ & ~0x01000000); + birthdayValid_ = false; + onChanged(); + return this; + } + + private int blockStatus_ ; + /** + * int32 blockStatus = 1016; + * @return The blockStatus. + */ + @java.lang.Override + public int getBlockStatus() { + return blockStatus_; + } + /** + * int32 blockStatus = 1016; + * @param value The blockStatus to set. + * @return This builder for chaining. + */ + public Builder setBlockStatus(int value) { + + blockStatus_ = value; + bitField2_ |= 0x02000000; + onChanged(); + return this; + } + /** + * int32 blockStatus = 1016; + * @return This builder for chaining. + */ + public Builder clearBlockStatus() { + bitField2_ = (bitField2_ & ~0x02000000); + blockStatus_ = 0; + onChanged(); + return this; + } + + private int commentRestrict_ ; + /** + * int32 commentRestrict = 1017; + * @return The commentRestrict. + */ + @java.lang.Override + public int getCommentRestrict() { + return commentRestrict_; + } + /** + * int32 commentRestrict = 1017; + * @param value The commentRestrict to set. + * @return This builder for chaining. + */ + public Builder setCommentRestrict(int value) { + + commentRestrict_ = value; + bitField2_ |= 0x04000000; + onChanged(); + return this; + } + /** + * int32 commentRestrict = 1017; + * @return This builder for chaining. + */ + public Builder clearCommentRestrict() { + bitField2_ = (bitField2_ & ~0x04000000); + commentRestrict_ = 0; + onChanged(); + return this; + } + + private java.lang.Object constellation_ = ""; + /** + * string constellation = 1018; + * @return The constellation. + */ + public java.lang.String getConstellation() { + java.lang.Object ref = constellation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constellation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string constellation = 1018; + * @return The bytes for constellation. + */ + public com.google.protobuf.ByteString + getConstellationBytes() { + java.lang.Object ref = constellation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + constellation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string constellation = 1018; + * @param value The constellation to set. + * @return This builder for chaining. + */ + public Builder setConstellation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + constellation_ = value; + bitField2_ |= 0x08000000; + onChanged(); + return this; + } + /** + * string constellation = 1018; + * @return This builder for chaining. + */ + public Builder clearConstellation() { + constellation_ = getDefaultInstance().getConstellation(); + bitField2_ = (bitField2_ & ~0x08000000); + onChanged(); + return this; + } + /** + * string constellation = 1018; + * @param value The bytes for constellation to set. + * @return This builder for chaining. + */ + public Builder setConstellationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + constellation_ = value; + bitField2_ |= 0x08000000; + onChanged(); + return this; + } + + private int disableIchat_ ; + /** + * int32 disableIchat = 1019; + * @return The disableIchat. + */ + @java.lang.Override + public int getDisableIchat() { + return disableIchat_; + } + /** + * int32 disableIchat = 1019; + * @param value The disableIchat to set. + * @return This builder for chaining. + */ + public Builder setDisableIchat(int value) { + + disableIchat_ = value; + bitField2_ |= 0x10000000; + onChanged(); + return this; + } + /** + * int32 disableIchat = 1019; + * @return This builder for chaining. + */ + public Builder clearDisableIchat() { + bitField2_ = (bitField2_ & ~0x10000000); + disableIchat_ = 0; + onChanged(); + return this; + } + + private long enableIchatImg_ ; + /** + * int64 enableIchatImg = 1020; + * @return The enableIchatImg. + */ + @java.lang.Override + public long getEnableIchatImg() { + return enableIchatImg_; + } + /** + * int64 enableIchatImg = 1020; + * @param value The enableIchatImg to set. + * @return This builder for chaining. + */ + public Builder setEnableIchatImg(long value) { + + enableIchatImg_ = value; + bitField2_ |= 0x20000000; + onChanged(); + return this; + } + /** + * int64 enableIchatImg = 1020; + * @return This builder for chaining. + */ + public Builder clearEnableIchatImg() { + bitField2_ = (bitField2_ & ~0x20000000); + enableIchatImg_ = 0L; + onChanged(); + return this; + } + + private int exp_ ; + /** + * int32 exp = 1021; + * @return The exp. + */ + @java.lang.Override + public int getExp() { + return exp_; + } + /** + * int32 exp = 1021; + * @param value The exp to set. + * @return This builder for chaining. + */ + public Builder setExp(int value) { + + exp_ = value; + bitField2_ |= 0x40000000; + onChanged(); + return this; + } + /** + * int32 exp = 1021; + * @return This builder for chaining. + */ + public Builder clearExp() { + bitField2_ = (bitField2_ & ~0x40000000); + exp_ = 0; + onChanged(); + return this; + } + + private long fanTicketCount_ ; + /** + * int64 fanTicketCount = 1022; + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + /** + * int64 fanTicketCount = 1022; + * @param value The fanTicketCount to set. + * @return This builder for chaining. + */ + public Builder setFanTicketCount(long value) { + + fanTicketCount_ = value; + bitField2_ |= 0x80000000; + onChanged(); + return this; + } + /** + * int64 fanTicketCount = 1022; + * @return This builder for chaining. + */ + public Builder clearFanTicketCount() { + bitField2_ = (bitField2_ & ~0x80000000); + fanTicketCount_ = 0L; + onChanged(); + return this; + } + + private boolean foldStrangerChat_ ; + /** + * bool foldStrangerChat = 1023; + * @return The foldStrangerChat. + */ + @java.lang.Override + public boolean getFoldStrangerChat() { + return foldStrangerChat_; + } + /** + * bool foldStrangerChat = 1023; + * @param value The foldStrangerChat to set. + * @return This builder for chaining. + */ + public Builder setFoldStrangerChat(boolean value) { + + foldStrangerChat_ = value; + bitField3_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool foldStrangerChat = 1023; + * @return This builder for chaining. + */ + public Builder clearFoldStrangerChat() { + bitField3_ = (bitField3_ & ~0x00000001); + foldStrangerChat_ = false; + onChanged(); + return this; + } + + private long followStatus_ ; + /** + * int64 followStatus = 1024; + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + /** + * int64 followStatus = 1024; + * @param value The followStatus to set. + * @return This builder for chaining. + */ + public Builder setFollowStatus(long value) { + + followStatus_ = value; + bitField3_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int64 followStatus = 1024; + * @return This builder for chaining. + */ + public Builder clearFollowStatus() { + bitField3_ = (bitField3_ & ~0x00000002); + followStatus_ = 0L; + onChanged(); + return this; + } + + private boolean hotsoonVerified_ ; + /** + * bool hotsoonVerified = 1025; + * @return The hotsoonVerified. + */ + @java.lang.Override + public boolean getHotsoonVerified() { + return hotsoonVerified_; + } + /** + * bool hotsoonVerified = 1025; + * @param value The hotsoonVerified to set. + * @return This builder for chaining. + */ + public Builder setHotsoonVerified(boolean value) { + + hotsoonVerified_ = value; + bitField3_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool hotsoonVerified = 1025; + * @return This builder for chaining. + */ + public Builder clearHotsoonVerified() { + bitField3_ = (bitField3_ & ~0x00000004); + hotsoonVerified_ = false; + onChanged(); + return this; + } + + private java.lang.Object hotsoonVerifiedReason_ = ""; + /** + * string hotsoonVerifiedReason = 1026; + * @return The hotsoonVerifiedReason. + */ + public java.lang.String getHotsoonVerifiedReason() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hotsoonVerifiedReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string hotsoonVerifiedReason = 1026; + * @return The bytes for hotsoonVerifiedReason. + */ + public com.google.protobuf.ByteString + getHotsoonVerifiedReasonBytes() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hotsoonVerifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string hotsoonVerifiedReason = 1026; + * @param value The hotsoonVerifiedReason to set. + * @return This builder for chaining. + */ + public Builder setHotsoonVerifiedReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + hotsoonVerifiedReason_ = value; + bitField3_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string hotsoonVerifiedReason = 1026; + * @return This builder for chaining. + */ + public Builder clearHotsoonVerifiedReason() { + hotsoonVerifiedReason_ = getDefaultInstance().getHotsoonVerifiedReason(); + bitField3_ = (bitField3_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string hotsoonVerifiedReason = 1026; + * @param value The bytes for hotsoonVerifiedReason to set. + * @return This builder for chaining. + */ + public Builder setHotsoonVerifiedReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + hotsoonVerifiedReason_ = value; + bitField3_ |= 0x00000008; + onChanged(); + return this; + } + + private int ichatRestrictType_ ; + /** + * int32 ichatRestrictType = 1027; + * @return The ichatRestrictType. + */ + @java.lang.Override + public int getIchatRestrictType() { + return ichatRestrictType_; + } + /** + * int32 ichatRestrictType = 1027; + * @param value The ichatRestrictType to set. + * @return This builder for chaining. + */ + public Builder setIchatRestrictType(int value) { + + ichatRestrictType_ = value; + bitField3_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 ichatRestrictType = 1027; + * @return This builder for chaining. + */ + public Builder clearIchatRestrictType() { + bitField3_ = (bitField3_ & ~0x00000010); + ichatRestrictType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object idStr_ = ""; + /** + * string idStr = 1028; + * @return The idStr. + */ + public java.lang.String getIdStr() { + java.lang.Object ref = idStr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idStr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string idStr = 1028; + * @return The bytes for idStr. + */ + public com.google.protobuf.ByteString + getIdStrBytes() { + java.lang.Object ref = idStr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string idStr = 1028; + * @param value The idStr to set. + * @return This builder for chaining. + */ + public Builder setIdStr( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idStr_ = value; + bitField3_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string idStr = 1028; + * @return This builder for chaining. + */ + public Builder clearIdStr() { + idStr_ = getDefaultInstance().getIdStr(); + bitField3_ = (bitField3_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string idStr = 1028; + * @param value The bytes for idStr to set. + * @return This builder for chaining. + */ + public Builder setIdStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idStr_ = value; + bitField3_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean isFollower_ ; + /** + * bool isFollower = 1029; + * @return The isFollower. + */ + @java.lang.Override + public boolean getIsFollower() { + return isFollower_; + } + /** + * bool isFollower = 1029; + * @param value The isFollower to set. + * @return This builder for chaining. + */ + public Builder setIsFollower(boolean value) { + + isFollower_ = value; + bitField3_ |= 0x00000040; + onChanged(); + return this; + } + /** + * bool isFollower = 1029; + * @return This builder for chaining. + */ + public Builder clearIsFollower() { + bitField3_ = (bitField3_ & ~0x00000040); + isFollower_ = false; + onChanged(); + return this; + } + + private boolean isFollowing_ ; + /** + * bool isFollowing = 1030; + * @return The isFollowing. + */ + @java.lang.Override + public boolean getIsFollowing() { + return isFollowing_; + } + /** + * bool isFollowing = 1030; + * @param value The isFollowing to set. + * @return This builder for chaining. + */ + public Builder setIsFollowing(boolean value) { + + isFollowing_ = value; + bitField3_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bool isFollowing = 1030; + * @return This builder for chaining. + */ + public Builder clearIsFollowing() { + bitField3_ = (bitField3_ & ~0x00000080); + isFollowing_ = false; + onChanged(); + return this; + } + + private boolean needProfileGuide_ ; + /** + * bool needProfileGuide = 1031; + * @return The needProfileGuide. + */ + @java.lang.Override + public boolean getNeedProfileGuide() { + return needProfileGuide_; + } + /** + * bool needProfileGuide = 1031; + * @param value The needProfileGuide to set. + * @return This builder for chaining. + */ + public Builder setNeedProfileGuide(boolean value) { + + needProfileGuide_ = value; + bitField3_ |= 0x00000100; + onChanged(); + return this; + } + /** + * bool needProfileGuide = 1031; + * @return This builder for chaining. + */ + public Builder clearNeedProfileGuide() { + bitField3_ = (bitField3_ & ~0x00000100); + needProfileGuide_ = false; + onChanged(); + return this; + } + + private long payScores_ ; + /** + * int64 payScores = 1032; + * @return The payScores. + */ + @java.lang.Override + public long getPayScores() { + return payScores_; + } + /** + * int64 payScores = 1032; + * @param value The payScores to set. + * @return This builder for chaining. + */ + public Builder setPayScores(long value) { + + payScores_ = value; + bitField3_ |= 0x00000200; + onChanged(); + return this; + } + /** + * int64 payScores = 1032; + * @return This builder for chaining. + */ + public Builder clearPayScores() { + bitField3_ = (bitField3_ & ~0x00000200); + payScores_ = 0L; + onChanged(); + return this; + } + + private boolean pushCommentStatus_ ; + /** + * bool pushCommentStatus = 1033; + * @return The pushCommentStatus. + */ + @java.lang.Override + public boolean getPushCommentStatus() { + return pushCommentStatus_; + } + /** + * bool pushCommentStatus = 1033; + * @param value The pushCommentStatus to set. + * @return This builder for chaining. + */ + public Builder setPushCommentStatus(boolean value) { + + pushCommentStatus_ = value; + bitField3_ |= 0x00000400; + onChanged(); + return this; + } + /** + * bool pushCommentStatus = 1033; + * @return This builder for chaining. + */ + public Builder clearPushCommentStatus() { + bitField3_ = (bitField3_ & ~0x00000400); + pushCommentStatus_ = false; + onChanged(); + return this; + } + + private boolean pushDigg_ ; + /** + * bool pushDigg = 1034; + * @return The pushDigg. + */ + @java.lang.Override + public boolean getPushDigg() { + return pushDigg_; + } + /** + * bool pushDigg = 1034; + * @param value The pushDigg to set. + * @return This builder for chaining. + */ + public Builder setPushDigg(boolean value) { + + pushDigg_ = value; + bitField3_ |= 0x00000800; + onChanged(); + return this; + } + /** + * bool pushDigg = 1034; + * @return This builder for chaining. + */ + public Builder clearPushDigg() { + bitField3_ = (bitField3_ & ~0x00000800); + pushDigg_ = false; + onChanged(); + return this; + } + + private boolean pushFollow_ ; + /** + * bool pushFollow = 1035; + * @return The pushFollow. + */ + @java.lang.Override + public boolean getPushFollow() { + return pushFollow_; + } + /** + * bool pushFollow = 1035; + * @param value The pushFollow to set. + * @return This builder for chaining. + */ + public Builder setPushFollow(boolean value) { + + pushFollow_ = value; + bitField3_ |= 0x00001000; + onChanged(); + return this; + } + /** + * bool pushFollow = 1035; + * @return This builder for chaining. + */ + public Builder clearPushFollow() { + bitField3_ = (bitField3_ & ~0x00001000); + pushFollow_ = false; + onChanged(); + return this; + } + + private boolean pushFriendAction_ ; + /** + * bool pushFriendAction = 1036; + * @return The pushFriendAction. + */ + @java.lang.Override + public boolean getPushFriendAction() { + return pushFriendAction_; + } + /** + * bool pushFriendAction = 1036; + * @param value The pushFriendAction to set. + * @return This builder for chaining. + */ + public Builder setPushFriendAction(boolean value) { + + pushFriendAction_ = value; + bitField3_ |= 0x00002000; + onChanged(); + return this; + } + /** + * bool pushFriendAction = 1036; + * @return This builder for chaining. + */ + public Builder clearPushFriendAction() { + bitField3_ = (bitField3_ & ~0x00002000); + pushFriendAction_ = false; + onChanged(); + return this; + } + + private boolean pushIchat_ ; + /** + * bool pushIchat = 1037; + * @return The pushIchat. + */ + @java.lang.Override + public boolean getPushIchat() { + return pushIchat_; + } + /** + * bool pushIchat = 1037; + * @param value The pushIchat to set. + * @return This builder for chaining. + */ + public Builder setPushIchat(boolean value) { + + pushIchat_ = value; + bitField3_ |= 0x00004000; + onChanged(); + return this; + } + /** + * bool pushIchat = 1037; + * @return This builder for chaining. + */ + public Builder clearPushIchat() { + bitField3_ = (bitField3_ & ~0x00004000); + pushIchat_ = false; + onChanged(); + return this; + } + + private boolean pushStatus_ ; + /** + * bool pushStatus = 1038; + * @return The pushStatus. + */ + @java.lang.Override + public boolean getPushStatus() { + return pushStatus_; + } + /** + * bool pushStatus = 1038; + * @param value The pushStatus to set. + * @return This builder for chaining. + */ + public Builder setPushStatus(boolean value) { + + pushStatus_ = value; + bitField3_ |= 0x00008000; + onChanged(); + return this; + } + /** + * bool pushStatus = 1038; + * @return This builder for chaining. + */ + public Builder clearPushStatus() { + bitField3_ = (bitField3_ & ~0x00008000); + pushStatus_ = false; + onChanged(); + return this; + } + + private boolean pushVideoPost_ ; + /** + * bool pushVideoPost = 1039; + * @return The pushVideoPost. + */ + @java.lang.Override + public boolean getPushVideoPost() { + return pushVideoPost_; + } + /** + * bool pushVideoPost = 1039; + * @param value The pushVideoPost to set. + * @return This builder for chaining. + */ + public Builder setPushVideoPost(boolean value) { + + pushVideoPost_ = value; + bitField3_ |= 0x00010000; + onChanged(); + return this; + } + /** + * bool pushVideoPost = 1039; + * @return This builder for chaining. + */ + public Builder clearPushVideoPost() { + bitField3_ = (bitField3_ & ~0x00010000); + pushVideoPost_ = false; + onChanged(); + return this; + } + + private boolean pushVideoRecommend_ ; + /** + * bool pushVideoRecommend = 1040; + * @return The pushVideoRecommend. + */ + @java.lang.Override + public boolean getPushVideoRecommend() { + return pushVideoRecommend_; + } + /** + * bool pushVideoRecommend = 1040; + * @param value The pushVideoRecommend to set. + * @return This builder for chaining. + */ + public Builder setPushVideoRecommend(boolean value) { + + pushVideoRecommend_ = value; + bitField3_ |= 0x00020000; + onChanged(); + return this; + } + /** + * bool pushVideoRecommend = 1040; + * @return This builder for chaining. + */ + public Builder clearPushVideoRecommend() { + bitField3_ = (bitField3_ & ~0x00020000); + pushVideoRecommend_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder> statsBuilder_; + /** + * .User.UserStats stats = 1041; + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return ((bitField3_ & 0x00040000) != 0); + } + /** + * .User.UserStats stats = 1041; + * @return The stats. + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + * .User.UserStats stats = 1041; + */ + public Builder setStats(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + } else { + statsBuilder_.setMessage(value); + } + bitField3_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .User.UserStats stats = 1041; + */ + public Builder setStats( + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + bitField3_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .User.UserStats stats = 1041; + */ + public Builder mergeStats(tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats value) { + if (statsBuilder_ == null) { + if (((bitField3_ & 0x00040000) != 0) && + stats_ != null && + stats_ != tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance()) { + getStatsBuilder().mergeFrom(value); + } else { + stats_ = value; + } + } else { + statsBuilder_.mergeFrom(value); + } + if (stats_ != null) { + bitField3_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * .User.UserStats stats = 1041; + */ + public Builder clearStats() { + bitField3_ = (bitField3_ & ~0x00040000); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .User.UserStats stats = 1041; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder getStatsBuilder() { + bitField3_ |= 0x00040000; + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + * .User.UserStats stats = 1041; + */ + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } + } + /** + * .User.UserStats stats = 1041; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder, tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder>( + getStats(), + getParentForChildren(), + isClean()); + stats_ = null; + } + return statsBuilder_; + } + + private boolean verifiedMobile_ ; + /** + * bool verifiedMobile = 1042; + * @return The verifiedMobile. + */ + @java.lang.Override + public boolean getVerifiedMobile() { + return verifiedMobile_; + } + /** + * bool verifiedMobile = 1042; + * @param value The verifiedMobile to set. + * @return This builder for chaining. + */ + public Builder setVerifiedMobile(boolean value) { + + verifiedMobile_ = value; + bitField3_ |= 0x00080000; + onChanged(); + return this; + } + /** + * bool verifiedMobile = 1042; + * @return This builder for chaining. + */ + public Builder clearVerifiedMobile() { + bitField3_ = (bitField3_ & ~0x00080000); + verifiedMobile_ = false; + onChanged(); + return this; + } + + private java.lang.Object verifiedReason_ = ""; + /** + * string verifiedReason = 1043; + * @return The verifiedReason. + */ + public java.lang.String getVerifiedReason() { + java.lang.Object ref = verifiedReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string verifiedReason = 1043; + * @return The bytes for verifiedReason. + */ + public com.google.protobuf.ByteString + getVerifiedReasonBytes() { + java.lang.Object ref = verifiedReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string verifiedReason = 1043; + * @param value The verifiedReason to set. + * @return This builder for chaining. + */ + public Builder setVerifiedReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + verifiedReason_ = value; + bitField3_ |= 0x00100000; + onChanged(); + return this; + } + /** + * string verifiedReason = 1043; + * @return This builder for chaining. + */ + public Builder clearVerifiedReason() { + verifiedReason_ = getDefaultInstance().getVerifiedReason(); + bitField3_ = (bitField3_ & ~0x00100000); + onChanged(); + return this; + } + /** + * string verifiedReason = 1043; + * @param value The bytes for verifiedReason to set. + * @return This builder for chaining. + */ + public Builder setVerifiedReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + verifiedReason_ = value; + bitField3_ |= 0x00100000; + onChanged(); + return this; + } + + private boolean withCarManagementPermission_ ; + /** + * bool withCarManagementPermission = 1044; + * @return The withCarManagementPermission. + */ + @java.lang.Override + public boolean getWithCarManagementPermission() { + return withCarManagementPermission_; + } + /** + * bool withCarManagementPermission = 1044; + * @param value The withCarManagementPermission to set. + * @return This builder for chaining. + */ + public Builder setWithCarManagementPermission(boolean value) { + + withCarManagementPermission_ = value; + bitField3_ |= 0x00200000; + onChanged(); + return this; + } + /** + * bool withCarManagementPermission = 1044; + * @return This builder for chaining. + */ + public Builder clearWithCarManagementPermission() { + bitField3_ = (bitField3_ & ~0x00200000); + withCarManagementPermission_ = false; + onChanged(); + return this; + } + + private int ageRange_ ; + /** + * int32 ageRange = 1045; + * @return The ageRange. + */ + @java.lang.Override + public int getAgeRange() { + return ageRange_; + } + /** + * int32 ageRange = 1045; + * @param value The ageRange to set. + * @return This builder for chaining. + */ + public Builder setAgeRange(int value) { + + ageRange_ = value; + bitField3_ |= 0x00400000; + onChanged(); + return this; + } + /** + * int32 ageRange = 1045; + * @return This builder for chaining. + */ + public Builder clearAgeRange() { + bitField3_ = (bitField3_ & ~0x00400000); + ageRange_ = 0; + onChanged(); + return this; + } + + private long watchDurationMonth_ ; + /** + * int64 watchDurationMonth = 1046; + * @return The watchDurationMonth. + */ + @java.lang.Override + public long getWatchDurationMonth() { + return watchDurationMonth_; + } + /** + * int64 watchDurationMonth = 1046; + * @param value The watchDurationMonth to set. + * @return This builder for chaining. + */ + public Builder setWatchDurationMonth(long value) { + + watchDurationMonth_ = value; + bitField3_ |= 0x00800000; + onChanged(); + return this; + } + /** + * int64 watchDurationMonth = 1046; + * @return This builder for chaining. + */ + public Builder clearWatchDurationMonth() { + bitField3_ = (bitField3_ & ~0x00800000); + watchDurationMonth_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User) + } + + // @@protoc_insertion_point(class_scope:User) + private static final tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User(); + } + + public static tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto.UserOuterClass.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_ActivityInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_ActivityInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AnchorInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AnchorInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AnchorLevel_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AnchorLevel_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AuthenticationInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AuthenticationInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AuthorStats_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AuthorStats_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_Border_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_Border_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_BrotherhoodInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_BrotherhoodInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_PreferDataEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_PreferDataEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_FansClubData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_FansClubData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_FansClubData_UserBadge_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansGroupInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansGroupInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FollowInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FollowInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_JAccreditInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_JAccreditInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_NobleLevelInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_NobleLevelInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_OwnRoom_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_OwnRoom_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_PayGrade_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_PayGrade_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_PayGrade_GradeIcon_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_PayGrade_GradeIcon_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_PoiInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_PoiInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_ProfileStyleParams_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_ProfileStyleParams_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_Subscribe_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_Subscribe_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserAttr_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserAttr_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserDressInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserDressInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserVIPInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserVIPInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserStats_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserStats_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_XiguaParams_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_XiguaParams_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\nUser.proto\032\013Image.proto\"\366\'\n\004User\022\n\n\002id" + + "\030\001 \001(\004\022\017\n\007shortId\030\002 \001(\004\022\020\n\010nickname\030\003 \001(" + + "\t\022\016\n\006gender\030\004 \001(\r\022\021\n\tsignature\030\005 \001(\t\022\r\n\005" + + "level\030\006 \001(\r\022\020\n\010birthday\030\007 \001(\004\022\021\n\ttelepho" + + "ne\030\010 \001(\t\022\033\n\013avatarThumb\030\t \001(\0132\006.Image\022\034\n" + + "\014avatarMedium\030\n \001(\0132\006.Image\022\033\n\013avatarLar" + + "ge\030\013 \001(\0132\006.Image\022\020\n\010verified\030\014 \001(\010\022\022\n\nex" + + "perience\030\r \001(\005\022\014\n\004city\030\016 \001(\t\022\016\n\006status\030\017" + + " \001(\005\022\022\n\ncreateTime\030\020 \001(\003\022\022\n\nmodifyTime\030\021" + + " \001(\003\022\016\n\006secret\030\022 \001(\005\022\026\n\016shareQrcodeUri\030\023" + + " \001(\t\022\032\n\022incomeSharePercent\030\024 \001(\005\022\"\n\022badg" + + "eImageListList\030\025 \001(\0132\006.Image\022$\n\nfollowIn" + + "fo\030\026 \001(\0132\020.User.FollowInfo\022 \n\010payGrade\030\027" + + " \001(\0132\016.User.PayGrade\022 \n\010fansClub\030\030 \001(\0132\016" + + ".User.FansClub\022\034\n\006border\030\031 \001(\0132\014.User.Bo" + + "rder\022\021\n\tspecialId\030\032 \001(\t\022\034\n\014avatarBorder\030" + + "\033 \001(\0132\006.Image\022\025\n\005medal\030\034 \001(\0132\006.Image\022!\n\021" + + "realTimeIconsList\030\035 \003(\0132\006.Image\022$\n\024newRe" + + "alTimeIconsList\030\036 \003(\0132\006.Image\022\020\n\010topVipN" + + "o\030\037 \001(\003\022 \n\010userAttr\030 \001(\0132\016.User.UserAtt" + + "r\022\036\n\007ownRoom\030! \001(\0132\r.User.OwnRoom\022\020\n\010pay" + + "Score\030\" \001(\003\022\023\n\013ticketCount\030# \001(\003\022$\n\nanch" + + "orInfo\030$ \001(\0132\020.User.AnchorInfo\022\024\n\014linkMi" + + "cStats\030% \001(\005\022\021\n\tdisplayId\030& \001(\t\022\036\n\026withC" + + "ommercePermission\030\' \001(\010\022\033\n\023withFusionSho" + + "pEntry\030( \001(\010\022!\n\031totalRechargeDiamondCoun" + + "t\030) \001(\003\022-\n\022webcastAnchorLevel\030* \001(\0132\021.Us" + + "er.AnchorLevel\022\027\n\017verifiedContent\030+ \001(\t\022" + + "&\n\013authorStats\030, \001(\0132\021.User.AuthorStats\022" + + "\032\n\013topFansList\030- \003(\0132\005.User\022\016\n\006secUid\030. " + + "\001(\t\022\020\n\010userRole\030/ \001(\005\022$\n\txiguaInfo\0300 \001(\013" + + "2\021.User.XiguaParams\022*\n\016activityReward\0301 " + + "\001(\0132\022.User.ActivityInfo\022\'\n\tnobleInfo\0302 \001" + + "(\0132\024.User.NobleLevelInfo\022.\n\017brotherhoodI" + + "nfo\0303 \001(\0132\025.User.BrotherhoodInfo\022\034\n\014pers" + + "onalCard\0304 \001(\0132\006.Image\0224\n\022authentication" + + "Info\0305 \001(\0132\030.User.AuthenticationInfo\022\031\n\021" + + "authorizationInfo\0306 \001(\005\022\"\n\032adversaryAuth" + + "orizationInfo\0307 \001(\005\022\036\n\007poiInfo\0308 \001(\0132\r.U" + + "ser.PoiInfo\022\'\n\027mediaBadgeImageListList\0309" + + " \001(\0132\006.Image\022\033\n\023adversaryUserStatus\030: \001(" + + "\005\022&\n\013userVipInfo\030; \001(\0132\021.User.UserVIPInf" + + "o\022$\n\034commerceWebcastConfigIdsList\030< \003(\003\022" + + "$\n\024badgeImageListV2List\030= \001(\0132\006.Image\022\024\n" + + "\014locationCity\030? \001(\t\022*\n\rfansGroupInfo\030@ \001" + + "(\0132\023.User.FansGroupInfo\022\022\n\nremarkName\030A " + + "\001(\t\022\022\n\nmysteryMan\030B \001(\005\022\016\n\006webRid\030C \001(\t\022" + + "\034\n\024desensitizedNickname\030D \001(\t\022*\n\rjAccred" + + "itInfo\030E \001(\0132\023.User.JAccreditInfo\022\"\n\tsub" + + "scribe\030F \001(\0132\017.User.Subscribe\022\023\n\013isAnony" + + "mous\030G \001(\010\022\033\n\023consumeDiamondLevel\030H \001(\005\022" + + "\022\n\nwebcastUid\030I \001(\t\0224\n\022profileStyleParam" + + "s\030J \001(\0132\030.User.ProfileStyleParams\022*\n\ruse" + + "rDressInfo\030K \001(\0132\023.User.UserDressInfo\022\027\n" + + "\016allowBeLocated\030\351\007 \001(\010\022\034\n\023allowFindByCon" + + "tacts\030\352\007 \001(\010\022!\n\030allowOthersDownloadVideo" + + "\030\353\007 \001(\010\022,\n#allowOthersDownloadWhenSharin" + + "gVideo\030\354\007 \001(\010\022\036\n\025allowShareShowProfile\030\355" + + "\007 \001(\010\022\032\n\021allowShowInGossip\030\356\007 \001(\010\022\032\n\021all" + + "owShowMyAction\030\357\007 \001(\010\022\034\n\023allowStrangeCom" + + "ment\030\360\007 \001(\010\022\037\n\026allowUnfollowerComment\030\361\007" + + " \001(\010\022\030\n\017allowUseLinkmic\030\362\007 \001(\010\022\'\n\013anchor" + + "Level\030\363\007 \001(\0132\021.User.AnchorLevel\022\032\n\tavata" + + "rJpg\030\364\007 \001(\0132\006.Image\022\021\n\010bgImgUrl\030\365\007 \001(\t\022\034" + + "\n\023birthdayDescription\030\366\007 \001(\t\022\026\n\rbirthday" + + "Valid\030\367\007 \001(\010\022\024\n\013blockStatus\030\370\007 \001(\005\022\030\n\017co" + + "mmentRestrict\030\371\007 \001(\005\022\026\n\rconstellation\030\372\007" + + " \001(\t\022\025\n\014disableIchat\030\373\007 \001(\005\022\027\n\016enableIch" + + "atImg\030\374\007 \001(\003\022\014\n\003exp\030\375\007 \001(\005\022\027\n\016fanTicketC" + + "ount\030\376\007 \001(\003\022\031\n\020foldStrangerChat\030\377\007 \001(\010\022\025" + + "\n\014followStatus\030\200\010 \001(\003\022\030\n\017hotsoonVerified" + + "\030\201\010 \001(\010\022\036\n\025hotsoonVerifiedReason\030\202\010 \001(\t\022" + + "\032\n\021ichatRestrictType\030\203\010 \001(\005\022\016\n\005idStr\030\204\010 " + + "\001(\t\022\023\n\nisFollower\030\205\010 \001(\010\022\024\n\013isFollowing\030" + + "\206\010 \001(\010\022\031\n\020needProfileGuide\030\207\010 \001(\010\022\022\n\tpay" + + "Scores\030\210\010 \001(\003\022\032\n\021pushCommentStatus\030\211\010 \001(" + + "\010\022\021\n\010pushDigg\030\212\010 \001(\010\022\023\n\npushFollow\030\213\010 \001(" + + "\010\022\031\n\020pushFriendAction\030\214\010 \001(\010\022\022\n\tpushIcha" + + "t\030\215\010 \001(\010\022\023\n\npushStatus\030\216\010 \001(\010\022\026\n\rpushVid" + + "eoPost\030\217\010 \001(\010\022\033\n\022pushVideoRecommend\030\220\010 \001" + + "(\010\022\037\n\005stats\030\221\010 \001(\0132\017.User.UserStats\022\027\n\016v" + + "erifiedMobile\030\222\010 \001(\010\022\027\n\016verifiedReason\030\223" + + "\010 \001(\t\022$\n\033withCarManagementPermission\030\224\010 " + + "\001(\010\022\021\n\010ageRange\030\225\010 \001(\005\022\033\n\022watchDurationM" + + "onth\030\226\010 \001(\003\032\016\n\014ActivityInfo\032\014\n\nAnchorInf" + + "o\032\r\n\013AnchorLevel\032\024\n\022AuthenticationInfo\032\r" + + "\n\013AuthorStats\032\010\n\006Border\032\021\n\017BrotherhoodIn" + + "fo\032\375\003\n\010FansClub\022)\n\004data\030\001 \001(\0132\033.User.Fan" + + "sClub.FansClubData\0222\n\npreferData\030\002 \003(\0132\036" + + ".User.FansClub.PreferDataEntry\032N\n\017Prefer" + + "DataEntry\022\013\n\003key\030\001 \001(\005\022*\n\005value\030\002 \001(\0132\033." + + "User.FansClub.FansClubData:\0028\001\032\301\002\n\014FansC" + + "lubData\022\020\n\010clubName\030\001 \001(\t\022\r\n\005level\030\002 \001(\005" + + "\022\032\n\022userFansClubStatus\030\003 \001(\005\0224\n\005badge\030\004 " + + "\001(\0132%.User.FansClub.FansClubData.UserBad" + + "ge\022\030\n\020availableGiftIds\030\005 \003(\003\022\020\n\010anchorId" + + "\030\006 \001(\003\032\221\001\n\tUserBadge\022?\n\005icons\030\001 \003(\01320.Us" + + "er.FansClub.FansClubData.UserBadge.Icons" + + "Entry\022\r\n\005title\030\002 \001(\t\0324\n\nIconsEntry\022\013\n\003ke" + + "y\030\001 \001(\005\022\025\n\005value\030\002 \001(\0132\006.Image:\0028\001\032\017\n\rFa" + + "nsGroupInfo\032y\n\nFollowInfo\022\026\n\016followingCo" + + "unt\030\001 \001(\003\022\025\n\rfollowerCount\030\002 \001(\003\022\024\n\014foll" + + "owStatus\030\003 \001(\003\022\022\n\npushStatus\030\004 \001(\003\022\022\n\nre" + + "markName\030\005 \001(\t\032\017\n\rJAccreditInfo\032\020\n\016Noble" + + "LevelInfo\032\t\n\007OwnRoom\032\305\006\n\010PayGrade\022\031\n\021tot" + + "alDiamondCount\030\001 \001(\003\022\033\n\013diamondIcon\030\002 \001(" + + "\0132\006.Image\022\014\n\004name\030\003 \001(\t\022\024\n\004icon\030\004 \001(\0132\006." + + "Image\022\020\n\010nextName\030\005 \001(\t\022\r\n\005level\030\006 \001(\003\022\030" + + "\n\010nextIcon\030\007 \001(\0132\006.Image\022\023\n\013nextDiamond\030" + + "\010 \001(\003\022\022\n\nnowDiamond\030\t \001(\003\022\033\n\023thisGradeMi" + + "nDiamond\030\n \001(\003\022\033\n\023thisGradeMaxDiamond\030\013 " + + "\001(\003\022\025\n\rpayDiamondBak\030\014 \001(\003\022\025\n\rgradeDescr" + + "ibe\030\r \001(\t\022/\n\rgradeIconList\030\016 \003(\0132\030.User." + + "PayGrade.GradeIcon\022\026\n\016screenChatType\030\017 \001" + + "(\003\022\026\n\006imIcon\030\020 \001(\0132\006.Image\022\037\n\017imIconWith" + + "Level\030\021 \001(\0132\006.Image\022\030\n\010liveIcon\030\022 \001(\0132\006." + + "Image\022\"\n\022newImIconWithLevel\030\023 \001(\0132\006.Imag" + + "e\022\033\n\013newLiveIcon\030\024 \001(\0132\006.Image\022\032\n\022upgrad" + + "eNeedConsume\030\025 \001(\003\022\026\n\016nextPrivileges\030\026 \001" + + "(\t\022\032\n\nbackground\030\027 \001(\0132\006.Image\022\036\n\016backgr" + + "oundBack\030\030 \001(\0132\006.Image\022\r\n\005score\030\031 \001(\003\022\024\n" + + "\013gradeBanner\030\351\007 \001(\t\022 \n\017profileDialogBg\030\352" + + "\007 \001(\0132\006.Image\022$\n\023profileDialogBgBack\030\353\007 " + + "\001(\0132\006.Image\032W\n\tGradeIcon\022\024\n\004icon\030\001 \001(\0132\006" + + ".Image\022\023\n\013iconDiamond\030\002 \001(\003\022\r\n\005level\030\003 \001" + + "(\003\022\020\n\010levelStr\030\004 \001(\t\032\t\n\007PoiInfo\032\024\n\022Profi" + + "leStyleParams\032\013\n\tSubscribe\032\n\n\010UserAttr\032\017" + + "\n\rUserDressInfo\032\r\n\013UserVIPInfo\032\013\n\tUserSt" + + "ats\032\r\n\013XiguaParamsB>\n= 64;) this._compress(this.chunk), i < o.length ? this.chunk = o.slice(i, Math.min(i + 64, o.length)) : this.chunk = [], i += 64; + }, + "sum": function (r, n) { + r && (this.reset(), this.write(r)), this._fill(); + for (var a = 0; a < this.chunk.length; a += 64) this._compress(this.chunk.slice(a, a + 64)); + var c = null; + if (n == "hex") { + c = ""; + for (a = 0; a < 8; a++) c += gt(this.reg[a].toString(16), 8, "0"); + } else for (c = new Array(32), a = 0; a < 8; a++) { + var f = this.reg[a]; + c[4 * a + 3] = (255 & f) >>> 0, f >>>= 8, c[4 * a + 2] = (255 & f) >>> 0, f >>>= 8, c[4 * a + 1] = (255 & f) >>> 0, f >>>= 8, c[4 * a] = (255 & f) >>> 0; + } + return this.reset(), c; + }, + "_compress": function (r) { + if (r < 64) console.error("compress error: not enough data"); else { + for (var o = function (e) { + for (var t = new Array(132), r = 0; r < 16; r++) t[r] = e[4 * r] << 24, t[r] |= e[4 * r + 1] << 16, t[r] |= e[4 * r + 2] << 8, t[r] |= e[4 * r + 3], t[r] >>>= 0; + for (var n = 16; n < 68; n++) { + var o = t[n - 16] ^ t[n - 9] ^ Ct(t[n - 3], 15); + o = o ^ Ct(o, 15) ^ Ct(o, 23), t[n] = (o ^ Ct(t[n - 13], 7) ^ t[n - 6]) >>> 0; + } + for (n = 0; n < 64; n++) t[n + 68] = (t[n] ^ t[n + 4]) >>> 0; + return t; + }(r), i = this.reg.slice(0), a = 0; a < 64; a++) { + var c = Ct(i[0], 12) + i[4] + Ct(St(a), a), + f = ((c = Ct(c = (4294967295 & c) >>> 0, 7)) ^ Ct(i[0], 12)) >>> 0, + u = kt(a, i[0], i[1], i[2]); + u = (4294967295 & (u = u + i[3] + f + o[a + 68])) >>> 0; + var s = xt(a, i[4], i[5], i[6]); + s = (4294967295 & (s = s + i[7] + c + o[a])) >>> 0, i[3] = i[2], i[2] = Ct(i[1], 9), i[1] = i[0], i[0] = u, i[7] = i[6], i[6] = Ct(i[5], 19), i[5] = i[4], i[4] = (s ^ Ct(s, 9) ^ Ct(s, 17)) >>> 0; + } + for (var l = 0; l < 8; l++) this.reg[l] = (this.reg[l] ^ i[l]) >>> 0; + } + }, + "_fill": function () { + var o = 8 * this.size, + i = this.chunk.push(128) % 64; + for (64 - i < 8 && (i -= 64); i < 56; i++) this.chunk.push(0); + for (var a = 0; a < 4; a++) { + var c = Math.floor(o / 4294967296); + this.chunk.push(c >>> 8 * (3 - a) & 255); + } + for (a = 0; a < 4; a++) this.chunk.push(o >>> 8 * (3 - a) & 255); + } + } + + reg.write(t) + reg._fill(); + + function Ct(e, t) { + return (e << (t %= 32) | e >>> 32 - t) >>> 0; + } + + function St(e) { + return 0 <= e && e < 16 ? 2043430169 : 16 <= e && e < 64 ? 2055708042 : void console.error("invalid j for constant Tj"); + } + + function kt(e, t, r, n) { + return 0 <= e && e < 16 ? (t ^ r ^ n) >>> 0 : 16 <= e && e < 64 ? (t & r | t & n | r & n) >>> 0 : (console.error("invalid j for bool function FF"), 0); + } + + function xt(e, t, r, n) { + return 0 <= e && e < 16 ? (t ^ r ^ n) >>> 0 : 16 <= e && e < 64 ? (t & r | ~t & n) >>> 0 : (console.error("invalid j for bool function GG"), 0); + } + + for (var i = 0; i < reg["chunk"]["length"]; i += 64) { + reg["_compress"](reg["chunk"]["slice"](i, i + 64)); + } + + var o = null; + if (a == "hex") { + o = ""; + for (i = 0; i < 8; i++) + o += oe(reg["reg"][i]["toString"](16), 8, "0") + } else { + for (o = new Array(32), + i = 0; i < 8; i++) { + var c = reg.reg[i]; + o[4 * i + 3] = (255 & c) >>> 0, + c >>>= 8, + o[4 * i + 2] = (255 & c) >>> 0, + c >>>= 8, + o[4 * i + 1] = (255 & c) >>> 0, + c >>>= 8, + o[4 * i] = (255 & c) >>> 0 + } + } + return o; +} + +function getABogus(url,data,userAgent){ + // 生成乱码字符串 + var params = url.slice(url.indexOf("?") + 1) + "cus"; + data += "cus"; + var garbledString = getGarbledString(params,data,userAgent); + var short_str = "Dkdpgh2ZmsQB80/MfvV36XI1R45-WUAlEixNLwoqYTOPuzKFjJnry79HbGcaStCe" + var ABogus = ""; + // 依次生成七组字符串 + let j = 0 + for (var i = 0; i <= garbledString.length;i += 3) { + if (i + 3 < garbledString.length) { + var charCodeAtNum0 = garbledString.charCodeAt(i); + var charCodeAtNum1 = garbledString.charCodeAt(i + 1); + var charCodeAtNum2 = garbledString.charCodeAt(i + 2); + var baseNum = charCodeAtNum2 | charCodeAtNum1 << 8 | charCodeAtNum0 << 16; + + var str1 = short_str[(baseNum & 16515072) >> 18]; + var str2 = short_str[(baseNum & 258048) >> 12]; + var str3 = short_str[(baseNum & 4032) >> 6]; + var str4 = short_str[baseNum & 63]; + ABogus += str1 + str2 + str3 + str4; + } + if (i + 3 > garbledString.length){ + let u = garbledString.length - j + if (u === 2){ + var charCodeAtNum0 = garbledString.charCodeAt(j); + var charCodeAtNum1 = garbledString.charCodeAt(j + 1); + var baseNum = charCodeAtNum1 << 8 | charCodeAtNum0 << 16; + var str1 = short_str[(baseNum & 16515072) >> 18]; + var str2 = short_str[(baseNum & 258048) >> 12]; + var str3 = short_str[(baseNum & 4032) >> 6]; + ABogus += str1 + str2 + str3 + '='; + } + if (u === 1){ + var charCodeAtNum0 = garbledString.charCodeAt(j); + var baseNum = 0 | charCodeAtNum0 << 16; + var str1 = short_str[(baseNum & 16515072) >> 18]; + var str2 = short_str[(baseNum & 258048) >> 12]; + ABogus += str1 + str2 + '=' + '='; + } + + } + j +=3 + } + return ABogus; +} + + +function getGarbledString(params,data,userAgent) { + let timestamp1 = Date.now(),timestamp2 = timestamp1 - Math.floor(Math.random() * 1000); + let arr_29 = get_arr29(timestamp1,timestamp2,params,data,userAgent) + let a = randomGarbledCharactersArrayList(); + let b = abGarbledCharacters(String.fromCharCode.apply(null,arr_29)) + return a + b; +} + +function abGarbledCharacters(userAgent) { + let arr_256 = ab_arr_256(); + let n4 = 0; + let ans = ""; + for (let i = 0; i < userAgent.length; i++) { + let n2 = i + 1; + let n3 = n4 + arr_256[n2] + n4 = n3 % 256 + let old_arr_n2 = arr_256[n2] + arr_256[n2] = arr_256[n4] + arr_256[n4] = old_arr_n2 + let n5 = userAgent.charCodeAt(i); + let n6 = arr_256[n2] + old_arr_n2; + let n7 = n6 % 256 + let n8 = n5 ^ arr_256[n7] + ans += String.fromCharCode(n8) + } + return ans; +} + +function ab_arr_256() { + let nums = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255] + let previousValue = 0; + let lm = String.fromCharCode(121); + for (let i = 0; i < nums.length; i++) { + previousValue = (previousValue+nums[i]+lm.charCodeAt(0)) % 256 + let tmp = nums[i]; + nums[i] = nums[previousValue] + nums[previousValue] = tmp + } + return nums; +} + +function get_arr29(dateTime1,dateTime2,params,data,userAgent) { + let parArr = get_arr(get_arr(params)) + let dataArr = get_arr(get_arr(data)) + let ua_salt = userAgent.includes('Win') ? 0 : 12; + var browser_arr = get_arr(encryptionUa(uaGarbledCharacters(userAgent,ua_salt))); + let num = [50,48,53,54,124,49,48,56,55,124,50,48,53,54,124,49,50,48,56,124,48,124,52,52,124,48,124,48,124,50,48,53,54,124,49,50,48,57,124,50,48,53,54,124,49,51,50,57,124,50,48,53,54,124,49,48,56,55,124,51,48,124,51,48,124,77,97,99,73,110,116,101,108]; + let arr2 = [44, dateTime1 >> 24 & 255, 0, 0, 0, 0 & 255, 10, parArr[21], dataArr[21], 0, browser_arr[23], dateTime1 >> 16 & 255, 0, 0, 0, 1, 0 & 255, 71, parArr[22], dataArr[22], browser_arr[24], dateTime1 >> 8 & 255, 0, 0, 0, 0 & 255, dateTime1 >> 0 & 255, 0, 0, ua_salt & 255, dateTime2 >> 24 & 255, dateTime2 >> 16 & 255, 0, dateTime2 >> 8 & 255, dateTime2 >> 0 & 255, 3, 397, 1, 397, 1, num.length, 0, 0, 0]; + let newArr = [...arr2,...num] + newArr.push(44^(dateTime1>>24&255)^parArr[21]^dataArr[21]^browser_arr[23]^(dateTime1>>16&255)^1^parArr[22]^dataArr[22]^browser_arr[24]^(dateTime1>>8&255)^(dateTime1>>0&255)^ua_salt^(dateTime2>>24&255)^(dateTime2>>16&255)^(dateTime2>>8&255)^(dateTime2>>0&255)^3^397^1^397^1^71^10^num.length) + return newArr; +} +function randomGarbledCharactersArrayList() { + function randomGarbledCharactersArray1() { + let arr = [] + random = Math.random() * 10000 + num1 = random & 255 + num2 = random >> 8 & 255 + arr.push((num1 & 170) | (3 & 85)) + arr.push((num1 & 85) | (3 & 170)) + arr.push((num2 & 170) | (45 & 85)) + arr.push((num2 & 85) | (45 & 170)) + return String.fromCharCode.apply(null,arr); + } + function randomGarbledCharactersArray2() { + let arr = [] + random = Math.random() * 10000 + num1 = random & 255 + num2 = random >> 8 & 255 + arr.push((num1 & 170) | (1 & 85)) + arr.push((num1 & 85) | (1 & 170)) + arr.push((num2 & 170) | (0 & 85)) + arr.push((num2 & 85) | (0 & 170)) + return String.fromCharCode.apply(null,arr); + } + + function randomGarbledCharactersArray3() { + let arr = [] + random = Math.random() * 10000 + num1 = random & 255 + num2 = random >> 8 & 255 + arr.push((num1 & 170) | (1 & 85)) + arr.push((num1 & 85) | (1 & 170)) + arr.push((num2 & 170) | (1 & 85)) + arr.push((num2 & 85) | (1 & 170)) + return String.fromCharCode.apply(null,arr); + } + return randomGarbledCharactersArray1()+randomGarbledCharactersArray2()+randomGarbledCharactersArray3() +} + +function encryptionUa(ss) { + let str = "ckdp1h4ZKsUB80/Mfvw36XIgR25+WQAlEi7NLboqYTOPuzmFjJnryx9HVGDaStCe"; + let uaEncryption = ""; + let j = 0 + for (let i = 0; i < ss.length; i+=3) { + if (i + 3 <= ss.length) { + let number = (((ss.charCodeAt(i) & 255) << 16) | ((ss.charCodeAt(i+1) & 255) << 8)) | ((ss.charCodeAt(i+2) & 255) << 0); + uaEncryption += str.charAt((number & 16515072) >> 18); + uaEncryption += str.charAt((number & 258048) >> 12); + uaEncryption += str.charAt((number & 4032) >> 6); + uaEncryption += str.charAt((number & 63) >> 0); + } + if (i + 3 > ss.length){ + let u = ss.length - j + if (u === 2){ + var charCodeAtNum0 = ss.charCodeAt(j); + var charCodeAtNum1 = ss.charCodeAt(j + 1); + var baseNum = charCodeAtNum1 << 8 | charCodeAtNum0 << 16; + var str1 = str[(baseNum & 16515072) >> 18]; + var str2 = str[(baseNum & 258048) >> 12]; + var str3 = str[(baseNum & 4032) >> 6]; + uaEncryption += str1 + str2 + str3 + '='; + } + if (u === 1){ + var charCodeAtNum0 = ss.charCodeAt(j); + var baseNum = 0 | charCodeAtNum0 << 16; + var str1 = str[(baseNum & 16515072) >> 18]; + var str2 = str[(baseNum & 258048) >> 12]; + uaEncryption += str1 + str2 + '=' + '='; + } + + } + j +=3 + } + return uaEncryption +} + +function uaGarbledCharacters(userAgent,ua_salt) { + let arr_256 = ua_arr_256(userAgent,ua_salt); + let n4 = 0; + let ans = ""; + for (let i = 0; i < userAgent.length; i++) { + let n2 = (i + 1) % 256; + let n3 = n4 + arr_256[n2] + n4 = n3 % 256 + let old_arr_n2 = arr_256[n2] + arr_256[n2] = arr_256[n4] + arr_256[n4] = old_arr_n2 + let n5 = userAgent.charCodeAt(i); + let n6 = arr_256[n2] + old_arr_n2; + let n7 = n6 % 256 + let n8 = n5 ^ arr_256[n7] + ans += String.fromCharCode(n8) + } + return ans; +} + + +function ua_arr_256(userAgent,ua_salt) { + let nums = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255] + let previousValue = 0; + let lm = String.fromCharCode(0.00390625,1,ua_salt); + for (let i = 0; i < nums.length; i++) { + previousValue = (previousValue+nums[i]+lm.charCodeAt(i % 3)) % 256 + let tmp = nums[i]; + nums[i] = nums[previousValue] + nums[previousValue] = tmp + } + return nums; +} + +// url = "verifyFp=verify_lpz97yt4_MDJFZ4sp_0U0q_4Edn_9dmS_8qk9Xgz5IYNJ&fp=verify_lpz97yt4_MDJFZ4sp_0U0q_4Edn_9dmS_8qk9Xgz5IYNJ&msToken=7nhPTiAgSOMgSHalkSMCExWwOO8v4F3pK4zfs71Tz5dgUsDl93VoqK--P7EVZHJnRkZon8FDlBR4s6rmfOqDaR-6yJnLsEFEP9RidsI3bNxNCDFjLzuGP3tXkxzeY-pu&msToken=7nhPTiAgSOMgSHalkSMCExWwOO8v4F3pK4zfs71Tz5dgUsDl93VoqK--P7EVZHJnRkZon8FDlBR4s6rmfOqDaR-6yJnLsEFEP9RidsI3bNxNCDFjLzuGP3tXkxzeY-pucus" +// data = "{\"page_type\":0,\"page\":1,\"page_size\":60,\"rec_page\":1,\"rec_page_size\":60,\"search_text\":\"充电宝\",\"search_id\":\"\",\"input_query\":\"车厘子\",\"is_product_distribution\":false,\"is_delivery_guarantee\":false,\"is_ladder_cos\":false,\"common_filter\":null}cus" +// userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' +// console.log(getABogus(url, data, userAgent)) +// console.log([50,48,53,54,124,54,53,48,124,50,48,53,54,124,49,50,48,56,124,48,124,52,52,124,48,124,48,124,50,48,53,54,124,49,50,48,57,124,50,48,53,54,124,49,51,50,57,124,50,48,53,54,124,54,53,48,124,51,48,124,51,48,124,87,105,110,54,52].length) diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/a-bogus1.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/a-bogus1.js new file mode 100644 index 0000000..7ca031e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/a-bogus1.js @@ -0,0 +1,11123 @@ +const _navigator = { + webdriver: false, + userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", + // // geolocation: {}, + mimeTypes: { + "0": { + description: "Portable Document Format" + }, + "1": { + description: "Portable Document Format" + } + + }, + cookieEnabled: true, + appVersion: "5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36", + appCodeName: "Mozilla", + appName: "Netscape", + language: 'zh-CN', + languages: ['zh-CN', 'zh'], + // bluetooth: { + // [Symbol.toStringTag]: "Bluetooth" + // }, + credentials: {}, + deviceMemory: 8, + // keyboard: {}, + // locks: {} + platform: "MacIntel", + product: "Gecko", + productSub: "20030107", + maxTouchPoints: 0, + storage: {}, + requestMediaKeySystemAccess: function requestMediaKeySystemAccess() { }, + getBattery: function getBattery() { return { isCharging: true } }, + vibrate: function vibrate() { + + }, + connection: {}, + plugins: { + length: 3, + item: function item() { }, + }, + hardwareConcurrency: 12, + webkitPersistentStorage: {}, + webkitTemporaryStorage: {}, + pdfViewerEnabled: true, + geolocation: { + "toString": function () { + return "[object Geolocation]" + } + }, + doNotTrack: null, + userActivation: { + hasBeenActive: true, + isActive: true + }, + scheduling: {}, + vendorSub: "", + vendor: "Google Inc.", +} +if (typeof performance === 'undefined') { + performance = { + now: function() { + return Date.now(); + } + }; +} + +const _localStorage = {} +_localStorage.getItem = function getItem() { + console.log("localstorage getItem --- ", arguments) + if (arguments[0] === "xmst") { + return "R57LHQY4V2N66nbe3oTiiwCb3mr1lpaOc8m5fuc823gxqfhT7FYLSfXFHaf5l5hyC6rZnYNGPYyhcgh1pM8A0InHasK16KlCLBQWLo4YD2EKoPamzDqi" + } +} +_localStorage.getItem.toString = function toString() { + return "function getItem() { [native code] }" +} + + +const _sessionStorage = {} + + +const _location = { + href: "https://www.xiaohongshu.com/explore", + pathname: "/explore" +}; + +function XMLHttpRequest() { +} + +XMLHttpRequest.prototype = { + value: undefined, + toJSON: undefined, + withCredentials: true +} +const _screen = { + availWidth: 1680, + availHeight: 1050, + width: 1680, + height: 1050, + colorDepth: 24, + pixelDepth: 24, + orientation: { + type: "landscape-primary", + angle: 0 + }, +}; + +function CanvasRenderingContext2D() { } +CanvasRenderingContext2D.toString = function () { return "function CanvasRenderingContext2D() { [native code] }" } +function HTMLCanvasElement() { } +HTMLCanvasElement.toString = function () { return "function HTMLCanvasElement() { [native code] }" } + + +function openDatabase() { } +openDatabase.toString = function () { return "function openDatabase() { [native code] }" } + + +function AudioContext() { } +AudioContext.toString = function () { return "function AudioContext() { [native code] }" } + + +function setInterval() { } +setInterval.toString = function () { return "function setInterval() { [native code] }" } + + +function requestAnimationFrame() { } +requestAnimationFrame.toString = function () { return "function requestAnimationFrame() { [native code] }" } +const navigator={ + userAgent: 'node.js', +}; +const document={ + +} +function fetch() { } +fetch.toString = function () { return "function fetch() { [native code] }" } +// console.log(CanvasRenderingContext2D.toString()) +const _window = { + _sdkGlueVersionMap: {}, + XMLHttpRequest: XMLHttpRequest, + // sessionStorage: function () { + // }, + localStorage: _localStorage, + screen: _screen, + navigator: _navigator, + location: _location, + devicePixelRatio: 1.25, + setInterval: setInterval, + requestAnimationFrame: requestAnimationFrame, + external: {}, + fetch: fetch, + addEventListener: function addEventListener() { }, + innerWidth: 452, + innerHeight: 963, + outerWidth: 1680, + outerHeight: 1650, + screenX: 0, + screenY: 0, + pageYOffset: 0 +}; +window=_window + +window.bdms || function() { + var e = { + 312: function(e, r, t) { + var n = t(7235) + , a = t(2734) + , f = TypeError; + e.exports = function(e) { + if (n(e)) + return e; + throw f(a(e) + " is not a function") + } + }, + 6160: function(e, r, t) { + var n = t(9106) + , a = t(2734) + , f = TypeError; + e.exports = function(e) { + if (n(e)) + return e; + throw f(a(e) + " is not a constructor") + } + }, + 7725: function(e, r, t) { + var n = t(7235) + , a = String + , f = TypeError; + e.exports = function(e) { + if ("object" == typeof e || n(e)) + return e; + throw f("Can't set " + a(e) + " as a prototype") + } + }, + 4102: function(e, r, t) { + var n = t(3967) + , a = t(6101) + , f = t(9051).f + , i = n("unscopables") + , o = Array.prototype; + null == o[i] && f(o, i, { + configurable: !0, + value: a(null) + }), + e.exports = function(e) { + o[i][e] = !0 + } + }, + 1507: function(e, r, t) { + var n = t(6471) + , a = TypeError; + e.exports = function(e, r) { + if (n(r, e)) + return e; + throw a("Incorrect invocation") + } + }, + 6347: function(e, r, t) { + var n = t(2951) + , a = String + , f = TypeError; + e.exports = function(e) { + if (n(e)) + return e; + throw f(a(e) + " is not an object") + } + }, + 5335: function(e, r, t) { + "use strict"; + var n = t(8495) + , a = t(1970) + , f = t(2296) + , i = t(6429) + , o = t(8861) + , c = t(9106) + , s = t(2312) + , u = t(3980) + , b = t(3401) + , l = t(205) + , d = Array; + e.exports = function(e) { + var r = f(e) + , t = c(this) + , p = arguments.length + , h = p > 1 ? arguments[1] : void 0 + , v = void 0 !== h; + v && (h = n(h, p > 2 ? arguments[2] : void 0)); + var g, m, y, w, I, S, x = l(r), O = 0; + if (!x || this === d && o(x)) + for (g = s(r), + m = t ? new this(g) : d(g); g > O; O++) + S = v ? h(r[O], O) : r[O], + u(m, O, S); + else + for (I = (w = b(r, x)).next, + m = t ? new this : []; !(y = a(I, w)).done; O++) + S = v ? i(w, h, [y.value, O], !0) : y.value, + u(m, O, S); + return m.length = O, + m + } + }, + 752: function(e, r, t) { + var n = t(1884) + , a = t(3260) + , f = t(2312) + , i = function(e) { + return function(r, t, i) { + var o, c = n(r), s = f(c), u = a(i, s); + if (e && t != t) { + for (; s > u; ) + if ((o = c[u++]) != o) + return !0 + } else + for (; s > u; u++) + if ((e || u in c) && c[u] === t) + return e || u || 0; + return !e && -1 + } + }; + e.exports = { + includes: i(!0), + indexOf: i(!1) + } + }, + 3250: function(e, r, t) { + var n = t(8495) + , a = t(9027) + , f = t(144) + , i = t(2296) + , o = t(2312) + , c = t(5262) + , s = a([].push) + , u = function(e) { + var r = 1 == e + , t = 2 == e + , a = 3 == e + , u = 4 == e + , b = 6 == e + , l = 7 == e + , d = 5 == e || b; + return function(p, h, v, g) { + for (var m, y, w = i(p), I = f(w), S = n(h, v), x = o(I), O = 0, _ = g || c, k = r ? _(p, x) : t || l ? _(p, 0) : void 0; x > O; O++) + if ((d || O in I) && (y = S(m = I[O], O, w), + e)) + if (r) + k[O] = y; + else if (y) + switch (e) { + case 3: + return !0; + case 5: + return m; + case 6: + return O; + case 2: + s(k, m) + } + else + switch (e) { + case 4: + return !1; + case 7: + s(k, m) + } + return b ? -1 : a || u ? u : k + } + }; + e.exports = { + forEach: u(0), + map: u(1), + filter: u(2), + some: u(3), + every: u(4), + find: u(5), + findIndex: u(6), + filterReject: u(7) + } + }, + 4613: function(e, r, t) { + var n = t(9769) + , a = t(3967) + , f = t(1150) + , i = a("species"); + e.exports = function(e) { + return f >= 51 || !n((function() { + var r = []; + return (r.constructor = {})[i] = function() { + return { + foo: 1 + } + } + , + 1 !== r[e](Boolean).foo + } + )) + } + }, + 7401: function(e, r, t) { + var n = t(3260) + , a = t(2312) + , f = t(3980) + , i = Array + , o = Math.max; + e.exports = function(e, r, t) { + for (var c = a(e), s = n(r, c), u = n(void 0 === t ? c : t, c), b = i(o(u - s, 0)), l = 0; s < u; s++, + l++) + f(b, l, e[s]); + return b.length = l, + b + } + }, + 927: function(e, r, t) { + var n = t(9027); + e.exports = n([].slice) + }, + 5515: function(e, r, t) { + var n = t(7401) + , a = Math.floor + , f = function(e, r) { + var t = e.length + , c = a(t / 2); + return t < 8 ? i(e, r) : o(e, f(n(e, 0, c), r), f(n(e, c), r), r) + } + , i = function(e, r) { + for (var t, n, a = e.length, f = 1; f < a; ) { + for (n = f, + t = e[f]; n && r(e[n - 1], t) > 0; ) + e[n] = e[--n]; + n !== f++ && (e[n] = t) + } + return e + } + , o = function(e, r, t, n) { + for (var a = r.length, f = t.length, i = 0, o = 0; i < a || o < f; ) + e[i + o] = i < a && o < f ? n(r[i], t[o]) <= 0 ? r[i++] : t[o++] : i < a ? r[i++] : t[o++]; + return e + }; + e.exports = f + }, + 7408: function(e, r, t) { + var n = t(4422) + , a = t(9106) + , f = t(2951) + , i = t(3967)("species") + , o = Array; + e.exports = function(e) { + var r; + return n(e) && (r = e.constructor, + (a(r) && (r === o || n(r.prototype)) || f(r) && null === (r = r[i])) && (r = void 0)), + void 0 === r ? o : r + } + }, + 5262: function(e, r, t) { + var n = t(7408); + e.exports = function(e, r) { + return new (n(e))(0 === r ? 0 : r) + } + }, + 6429: function(e, r, t) { + var n = t(6347) + , a = t(6177); + e.exports = function(e, r, t, f) { + try { + return f ? r(n(t)[0], t[1]) : r(t) + } catch (r) { + a(e, "throw", r) + } + } + }, + 6251: function(e, r, t) { + var n = t(3967)("iterator") + , a = !1; + try { + var f = 0 + , i = { + next: function() { + return { + done: !!f++ + } + }, + return: function() { + a = !0 + } + }; + i[n] = function() { + return this + } + , + Array.from(i, (function() { + throw 2 + } + )) + } catch (e) {} + e.exports = function(e, r) { + if (!r && !a) + return !1; + var t = !1; + try { + var f = {}; + f[n] = function() { + return { + next: function() { + return { + done: t = !0 + } + } + } + } + , + e(f) + } catch (e) {} + return t + } + }, + 237: function(e, r, t) { + var n = t(9027) + , a = n({}.toString) + , f = n("".slice); + e.exports = function(e) { + return f(a(e), 8, -1) + } + }, + 5032: function(e, r, t) { + var n = t(5727) + , a = t(7235) + , f = t(237) + , i = t(3967)("toStringTag") + , o = Object + , c = "Arguments" == f(function() { + return arguments + }()); + e.exports = n ? f : function(e) { + var r, t, n; + return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof (t = function(e, r) { + try { + return e[r] + } catch (e) {} + }(r = o(e), i)) ? t : c ? f(r) : "Object" == (n = f(r)) && a(r.callee) ? "Arguments" : n + } + }, + 292: function(e, r, t) { + var n = t(5831) + , a = t(2231) + , f = t(381) + , i = t(9051); + e.exports = function(e, r, t) { + for (var o = a(r), c = i.f, s = f.f, u = 0; u < o.length; u++) { + var b = o[u]; + n(e, b) || t && n(t, b) || c(e, b, s(r, b)) + } + } + }, + 328: function(e, r, t) { + var n = t(9769); + e.exports = !n((function() { + function e() {} + return e.prototype.constructor = null, + Object.getPrototypeOf(new e) !== e.prototype + } + )) + }, + 67: function(e) { + e.exports = function(e, r) { + return { + value: e, + done: r + } + } + }, + 235: function(e, r, t) { + var n = t(6986) + , a = t(9051) + , f = t(9829); + e.exports = n ? function(e, r, t) { + return a.f(e, r, f(1, t)) + } + : function(e, r, t) { + return e[r] = t, + e + } + }, + 9829: function(e) { + e.exports = function(e, r) { + return { + enumerable: !(1 & e), + configurable: !(2 & e), + writable: !(4 & e), + value: r + } + } + }, + 3980: function(e, r, t) { + "use strict"; + var n = t(7568) + , a = t(9051) + , f = t(9829); + e.exports = function(e, r, t) { + var i = n(r); + i in e ? a.f(e, i, f(0, t)) : e[i] = t + } + }, + 6317: function(e, r, t) { + var n = t(9578) + , a = t(9051); + e.exports = function(e, r, t) { + return t.get && n(t.get, r, { + getter: !0 + }), + t.set && n(t.set, r, { + setter: !0 + }), + a.f(e, r, t) + } + }, + 2072: function(e, r, t) { + var n = t(7235) + , a = t(9051) + , f = t(9578) + , i = t(8108); + e.exports = function(e, r, t, o) { + o || (o = {}); + var c = o.enumerable + , s = void 0 !== o.name ? o.name : r; + if (n(t) && f(t, s, o), + o.global) + c ? e[r] = t : i(r, t); + else { + try { + o.unsafe ? e[r] && (c = !0) : delete e[r] + } catch (e) {} + c ? e[r] = t : a.f(e, r, { + value: t, + enumerable: !1, + configurable: !o.nonConfigurable, + writable: !o.nonWritable + }) + } + return e + } + }, + 4266: function(e, r, t) { + var n = t(2072); + e.exports = function(e, r, t) { + for (var a in r) + n(e, a, r[a], t); + return e + } + }, + 8108: function(e, r, t) { + var n = t(376) + , a = Object.defineProperty; + e.exports = function(e, r) { + try { + a(n, e, { + value: r, + configurable: !0, + writable: !0 + }) + } catch (t) { + n[e] = r + } + return r + } + }, + 6986: function(e, r, t) { + var n = t(9769); + e.exports = !n((function() { + return 7 != Object.defineProperty({}, 1, { + get: function() { + return 7 + } + })[1] + } + )) + }, + 4401: function(e) { + var r = "object" == typeof document && document.all + , t = void 0 === r && void 0 !== r; + e.exports = { + all: r, + IS_HTMLDDA: t + } + }, + 30: function(e, r, t) { + var n = t(376) + , a = t(2951) + , f = n.document + , i = a(f) && a(f.createElement); + e.exports = function(e) { + return i ? f.createElement(e) : {} + } + }, + 8851: function(e) { + var r = TypeError; + e.exports = function(e) { + if (e > 9007199254740991) + throw r("Maximum allowed index exceeded"); + return e + } + }, + 6920: function(e) { + e.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 + } + }, + 8225: function(e, r, t) { + var n = t(30)("span").classList + , a = n && n.constructor && n.constructor.prototype; + e.exports = a === Object.prototype ? void 0 : a + }, + 254: function(e, r, t) { + var n = t(9273) + , a = t(2395); + e.exports = !n && !a && "object" == typeof window && "object" == typeof document + }, + 9273: function(e) { + e.exports = "object" == typeof Deno && Deno && "object" == typeof Deno.version + }, + 5118: function(e, r, t) { + var n = t(6229); + e.exports = /ipad|iphone|ipod/i.test(n) && "undefined" != typeof Pebble + }, + 6232: function(e, r, t) { + var n = t(6229); + e.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(n) + }, + 2395: function(e, r, t) { + var n = t(237); + e.exports = "undefined" != typeof process && "process" == n(process) + }, + 9689: function(e, r, t) { + var n = t(6229); + e.exports = /web0s(?!.*chrome)/i.test(n) + }, + 6229: function(e) { + e.exports = "undefined" != typeof navigator && String(navigator.userAgent) || "" + }, + 1150: function(e, r, t) { + var n, a, f = t(376), i = t(6229), o = f.process, c = f.Deno, s = o && o.versions || c && c.version, u = s && s.v8; + u && (a = (n = u.split("."))[0] > 0 && n[0] < 4 ? 1 : +(n[0] + n[1])), + !a && i && (!(n = i.match(/Edge\/(\d+)/)) || n[1] >= 74) && (n = i.match(/Chrome\/(\d+)/)) && (a = +n[1]), + e.exports = a + }, + 8671: function(e) { + e.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"] + }, + 5020: function(e, r, t) { + var n = t(9027) + , a = Error + , f = n("".replace) + , i = String(a("zxcasd").stack) + , o = /\n\s*at [^:]*:[^\n]*/ + , c = o.test(i); + e.exports = function(e, r) { + if (c && "string" == typeof e && !a.prepareStackTrace) + for (; r--; ) + e = f(e, o, ""); + return e + } + }, + 1844: function(e, r, t) { + var n = t(235) + , a = t(5020) + , f = t(6051) + , i = Error.captureStackTrace; + e.exports = function(e, r, t, o) { + f && (i ? i(e, r) : n(e, "stack", a(t, o))) + } + }, + 6051: function(e, r, t) { + var n = t(9769) + , a = t(9829); + e.exports = !n((function() { + var e = Error("a"); + return !("stack"in e) || (Object.defineProperty(e, "stack", a(1, 7)), + 7 !== e.stack) + } + )) + }, + 9401: function(e, r, t) { + var n = t(376) + , a = t(381).f + , f = t(235) + , i = t(2072) + , o = t(8108) + , c = t(292) + , s = t(4039); + e.exports = function(e, r) { + var t, u, b, l, d, p = e.target, h = e.global, v = e.stat; + if (t = h ? n : v ? n[p] || o(p, {}) : (n[p] || {}).prototype) + for (u in r) { + if (l = r[u], + b = e.dontCallGetSet ? (d = a(t, u)) && d.value : t[u], + !s(h ? u : p + (v ? "." : "#") + u, e.forced) && void 0 !== b) { + if (typeof l == typeof b) + continue; + c(l, b) + } + (e.sham || b && b.sham) && f(l, "sham", !0), + i(t, u, l, e) + } + } + }, + 9769: function(e) { + e.exports = function(e) { + try { + return !!e() + } catch (e) { + return !0 + } + } + }, + 4272: function(e, r, t) { + var n = t(1945) + , a = Function.prototype + , f = a.apply + , i = a.call; + e.exports = "object" == typeof Reflect && Reflect.apply || (n ? i.bind(f) : function() { + return i.apply(f, arguments) + } + ) + }, + 8495: function(e, r, t) { + var n = t(4914) + , a = t(312) + , f = t(1945) + , i = n(n.bind); + e.exports = function(e, r) { + return a(e), + void 0 === r ? e : f ? i(e, r) : function() { + return e.apply(r, arguments) + } + } + }, + 1945: function(e, r, t) { + var n = t(9769); + e.exports = !n((function() { + var e = function() {} + .bind(); + return "function" != typeof e || e.hasOwnProperty("prototype") + } + )) + }, + 1970: function(e, r, t) { + var n = t(1945) + , a = Function.prototype.call; + e.exports = n ? a.bind(a) : function() { + return a.apply(a, arguments) + } + }, + 4157: function(e, r, t) { + var n = t(6986) + , a = t(5831) + , f = Function.prototype + , i = n && Object.getOwnPropertyDescriptor + , o = a(f, "name") + , c = o && "something" === function() {} + .name + , s = o && (!n || n && i(f, "name").configurable); + e.exports = { + EXISTS: o, + PROPER: c, + CONFIGURABLE: s + } + }, + 2352: function(e, r, t) { + var n = t(9027) + , a = t(312); + e.exports = function(e, r, t) { + try { + return n(a(Object.getOwnPropertyDescriptor(e, r)[t])) + } catch (e) {} + } + }, + 4914: function(e, r, t) { + var n = t(237) + , a = t(9027); + e.exports = function(e) { + if ("Function" === n(e)) + return a(e) + } + }, + 9027: function(e, r, t) { + var n = t(1945) + , a = Function.prototype + , f = a.call + , i = n && a.bind.bind(f, f); + e.exports = n ? i : function(e) { + return function() { + return f.apply(e, arguments) + } + } + }, + 9023: function(e, r, t) { + var n = t(376) + , a = t(7235); + e.exports = function(e, r) { + return arguments.length < 2 ? (t = n[e], + a(t) ? t : void 0) : n[e] && n[e][r]; + var t + } + }, + 205: function(e, r, t) { + var n = t(5032) + , a = t(3953) + , f = t(1246) + , i = t(857) + , o = t(3967)("iterator"); + e.exports = function(e) { + if (!f(e)) + return a(e, o) || a(e, "@@iterator") || i[n(e)] + } + }, + 3401: function(e, r, t) { + var n = t(1970) + , a = t(312) + , f = t(6347) + , i = t(2734) + , o = t(205) + , c = TypeError; + e.exports = function(e, r) { + var t = arguments.length < 2 ? o(e) : r; + if (a(t)) + return f(n(t, e)); + throw c(i(e) + " is not iterable") + } + }, + 7194: function(e, r, t) { + var n = t(9027) + , a = t(4422) + , f = t(7235) + , i = t(237) + , o = t(2100) + , c = n([].push); + e.exports = function(e) { + if (f(e)) + return e; + if (a(e)) { + for (var r = e.length, t = [], n = 0; n < r; n++) { + var s = e[n]; + "string" == typeof s ? c(t, s) : "number" != typeof s && "Number" != i(s) && "String" != i(s) || c(t, o(s)) + } + var u = t.length + , b = !0; + return function(e, r) { + if (b) + return b = !1, + r; + if (a(this)) + return r; + for (var n = 0; n < u; n++) + if (t[n] === e) + return r + } + } + } + }, + 3953: function(e, r, t) { + var n = t(312) + , a = t(1246); + e.exports = function(e, r) { + var t = e[r]; + return a(t) ? void 0 : n(t) + } + }, + 376: function(e, r, t) { + var n = function(e) { + return e && e.Math == Math && e + }; + e.exports = n("object" == typeof globalThis && globalThis) || n("object" == typeof window && window) || n("object" == typeof self && self) || n("object" == typeof t.g && t.g) || function() { + return this + }() || Function("return this")() + }, + 5831: function(e, r, t) { + var n = t(9027) + , a = t(2296) + , f = n({}.hasOwnProperty); + e.exports = Object.hasOwn || function(e, r) { + return f(a(e), r) + } + }, + 3804: function(e) { + e.exports = {} + }, + 4962: function(e) { + e.exports = function(e, r) { + try { + 1 == arguments.length ? console.error(e) : console.error(e, r) + } catch (e) {} + } + }, + 8673: function(e, r, t) { + var n = t(9023); + e.exports = n("document", "documentElement") + }, + 4690: function(e, r, t) { + var n = t(6986) + , a = t(9769) + , f = t(30); + e.exports = !n && !a((function() { + return 7 != Object.defineProperty(f("div"), "a", { + get: function() { + return 7 + } + }).a + } + )) + }, + 144: function(e, r, t) { + var n = t(9027) + , a = t(9769) + , f = t(237) + , i = Object + , o = n("".split); + e.exports = a((function() { + return !i("z").propertyIsEnumerable(0) + } + )) ? function(e) { + return "String" == f(e) ? o(e, "") : i(e) + } + : i + }, + 6441: function(e, r, t) { + var n = t(9027) + , a = t(7235) + , f = t(8797) + , i = n(Function.toString); + a(f.inspectSource) || (f.inspectSource = function(e) { + return i(e) + } + ), + e.exports = f.inspectSource + }, + 7205: function(e, r, t) { + var n = t(2951) + , a = t(235); + e.exports = function(e, r) { + n(r) && "cause"in r && a(e, "cause", r.cause) + } + }, + 2569: function(e, r, t) { + var n, a, f, i = t(3545), o = t(376), c = t(2951), s = t(235), u = t(5831), b = t(8797), l = t(1506), d = t(3804), p = "Object already initialized", h = o.TypeError, v = o.WeakMap; + if (i || b.state) { + var g = b.state || (b.state = new v); + g.get = g.get, + g.has = g.has, + g.set = g.set, + n = function(e, r) { + if (g.has(e)) + throw h(p); + return r.facade = e, + g.set(e, r), + r + } + , + a = function(e) { + return g.get(e) || {} + } + , + f = function(e) { + return g.has(e) + } + } else { + var m = l("state"); + d[m] = !0, + n = function(e, r) { + if (u(e, m)) + throw h(p); + return r.facade = e, + s(e, m, r), + r + } + , + a = function(e) { + return u(e, m) ? e[m] : {} + } + , + f = function(e) { + return u(e, m) + } + } + e.exports = { + set: n, + get: a, + has: f, + enforce: function(e) { + return f(e) ? a(e) : n(e, {}) + }, + getterFor: function(e) { + return function(r) { + var t; + if (!c(r) || (t = a(r)).type !== e) + throw h("Incompatible receiver, " + e + " required"); + return t + } + } + } + }, + 8861: function(e, r, t) { + var n = t(3967) + , a = t(857) + , f = n("iterator") + , i = Array.prototype; + e.exports = function(e) { + return void 0 !== e && (a.Array === e || i[f] === e) + } + }, + 4422: function(e, r, t) { + var n = t(237); + e.exports = Array.isArray || function(e) { + return "Array" == n(e) + } + }, + 7235: function(e, r, t) { + var n = t(4401) + , a = n.all; + e.exports = n.IS_HTMLDDA ? function(e) { + return "function" == typeof e || e === a + } + : function(e) { + return "function" == typeof e + } + }, + 9106: function(e, r, t) { + var n = t(9027) + , a = t(9769) + , f = t(7235) + , i = t(5032) + , o = t(9023) + , c = t(6441) + , s = function() {} + , u = [] + , b = o("Reflect", "construct") + , l = /^\s*(?:class|function)\b/ + , d = n(l.exec) + , p = !l.exec(s) + , h = function(e) { + if (!f(e)) + return !1; + try { + return b(s, u, e), + !0 + } catch (e) { + return !1 + } + } + , v = function(e) { + if (!f(e)) + return !1; + switch (i(e)) { + case "AsyncFunction": + case "GeneratorFunction": + case "AsyncGeneratorFunction": + return !1 + } + try { + return p || !!d(l, c(e)) + } catch (e) { + return !0 + } + }; + v.sham = !0, + e.exports = !b || a((function() { + var e; + return h(h.call) || !h(Object) || !h((function() { + e = !0 + } + )) || e + } + )) ? v : h + }, + 4039: function(e, r, t) { + var n = t(9769) + , a = t(7235) + , f = /#|\.prototype\./ + , i = function(e, r) { + var t = c[o(e)]; + return t == u || t != s && (a(r) ? n(r) : !!r) + } + , o = i.normalize = function(e) { + return String(e).replace(f, ".").toLowerCase() + } + , c = i.data = {} + , s = i.NATIVE = "N" + , u = i.POLYFILL = "P"; + e.exports = i + }, + 1246: function(e) { + e.exports = function(e) { + return null == e + } + }, + 2951: function(e, r, t) { + var n = t(7235) + , a = t(4401) + , f = a.all; + e.exports = a.IS_HTMLDDA ? function(e) { + return "object" == typeof e ? null !== e : n(e) || e === f + } + : function(e) { + return "object" == typeof e ? null !== e : n(e) + } + }, + 8264: function(e) { + e.exports = !1 + }, + 7082: function(e, r, t) { + var n = t(9023) + , a = t(7235) + , f = t(6471) + , i = t(9366) + , o = Object; + e.exports = i ? function(e) { + return "symbol" == typeof e + } + : function(e) { + var r = n("Symbol"); + return a(r) && f(r.prototype, o(e)) + } + }, + 6875: function(e, r, t) { + var n = t(8495) + , a = t(1970) + , f = t(6347) + , i = t(2734) + , o = t(8861) + , c = t(2312) + , s = t(6471) + , u = t(3401) + , b = t(205) + , l = t(6177) + , d = TypeError + , p = function(e, r) { + this.stopped = e, + this.result = r + } + , h = p.prototype; + e.exports = function(e, r, t) { + var v, g, m, y, w, I, S, x = t && t.that, O = !(!t || !t.AS_ENTRIES), _ = !(!t || !t.IS_RECORD), k = !(!t || !t.IS_ITERATOR), C = !(!t || !t.INTERRUPTED), P = n(r, x), E = function(e) { + return v && l(v, "normal", e), + new p(!0,e) + }, j = function(e) { + return O ? (f(e), + C ? P(e[0], e[1], E) : P(e[0], e[1])) : C ? P(e, E) : P(e) + }; + if (_) + v = e.iterator; + else if (k) + v = e; + else { + if (!(g = b(e))) + throw d(i(e) + " is not iterable"); + if (o(g)) { + for (m = 0, + y = c(e); y > m; m++) + if ((w = j(e[m])) && s(h, w)) + return w; + return new p(!1) + } + v = u(e, g) + } + for (I = _ ? e.next : v.next; !(S = a(I, v)).done; ) { + try { + w = j(S.value) + } catch (e) { + l(v, "throw", e) + } + if ("object" == typeof w && w && s(h, w)) + return w + } + return new p(!1) + } + }, + 6177: function(e, r, t) { + var n = t(1970) + , a = t(6347) + , f = t(3953); + e.exports = function(e, r, t) { + var i, o; + a(e); + try { + if (!(i = f(e, "return"))) { + if ("throw" === r) + throw t; + return t + } + i = n(i, e) + } catch (e) { + o = !0, + i = e + } + if ("throw" === r) + throw t; + if (o) + throw i; + return a(i), + t + } + }, + 1811: function(e, r, t) { + "use strict"; + var n = t(4929).IteratorPrototype + , a = t(6101) + , f = t(9829) + , i = t(5746) + , o = t(857) + , c = function() { + return this + }; + e.exports = function(e, r, t, s) { + var u = r + " Iterator"; + return e.prototype = a(n, { + next: f(+!s, t) + }), + i(e, u, !1, !0), + o[u] = c, + e + } + }, + 8710: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(1970) + , f = t(8264) + , i = t(4157) + , o = t(7235) + , c = t(1811) + , s = t(4972) + , u = t(331) + , b = t(5746) + , l = t(235) + , d = t(2072) + , p = t(3967) + , h = t(857) + , v = t(4929) + , g = i.PROPER + , m = i.CONFIGURABLE + , y = v.IteratorPrototype + , w = v.BUGGY_SAFARI_ITERATORS + , I = p("iterator") + , S = "keys" + , x = "values" + , O = "entries" + , _ = function() { + return this + }; + e.exports = function(e, r, t, i, p, v, k) { + c(t, r, i); + var C, P, E, j = function(e) { + if (e === p && T) + return T; + if (!w && e in M) + return M[e]; + switch (e) { + case S: + case x: + case O: + return function() { + return new t(this,e) + } + } + return function() { + return new t(this) + } + }, A = r + " Iterator", R = !1, M = e.prototype, L = M[I] || M["@@iterator"] || p && M[p], T = !w && L || j(p), W = "Array" == r && M.entries || L; + if (W && (C = s(W.call(new e))) !== Object.prototype && C.next && (f || s(C) === y || (u ? u(C, y) : o(C[I]) || d(C, I, _)), + b(C, A, !0, !0), + f && (h[A] = _)), + g && p == x && L && L.name !== x && (!f && m ? l(M, "name", x) : (R = !0, + T = function() { + return a(L, this) + } + )), + p) + if (P = { + values: j(x), + keys: v ? T : j(S), + entries: j(O) + }, + k) + for (E in P) + (w || R || !(E in M)) && d(M, E, P[E]); + else + n({ + target: r, + proto: !0, + forced: w || R + }, P); + return f && !k || M[I] === T || d(M, I, T, { + name: p + }), + h[r] = T, + P + } + }, + 4929: function(e, r, t) { + "use strict"; + var n, a, f, i = t(9769), o = t(7235), c = t(2951), s = t(6101), u = t(4972), b = t(2072), l = t(3967), d = t(8264), p = l("iterator"), h = !1; + [].keys && ("next"in (f = [].keys()) ? (a = u(u(f))) !== Object.prototype && (n = a) : h = !0), + !c(n) || i((function() { + var e = {}; + return n[p].call(e) !== e + } + )) ? n = {} : d && (n = s(n)), + o(n[p]) || b(n, p, (function() { + return this + } + )), + e.exports = { + IteratorPrototype: n, + BUGGY_SAFARI_ITERATORS: h + } + }, + 857: function(e) { + e.exports = {} + }, + 2312: function(e, r, t) { + var n = t(5346); + e.exports = function(e) { + return n(e.length) + } + }, + 9578: function(e, r, t) { + var n = t(9027) + , a = t(9769) + , f = t(7235) + , i = t(5831) + , o = t(6986) + , c = t(4157).CONFIGURABLE + , s = t(6441) + , u = t(2569) + , b = u.enforce + , l = u.get + , d = String + , p = Object.defineProperty + , h = n("".slice) + , v = n("".replace) + , g = n([].join) + , m = o && !a((function() { + return 8 !== p((function() {} + ), "length", { + value: 8 + }).length + } + )) + , y = String(String).split("String") + , w = e.exports = function(e, r, t) { + "Symbol(" === h(d(r), 0, 7) && (r = "[" + v(d(r), /^Symbol\(([^)]*)\)/, "$1") + "]"), + t && t.getter && (r = "get " + r), + t && t.setter && (r = "set " + r), + (!i(e, "name") || c && e.name !== r) && (o ? p(e, "name", { + value: r, + configurable: !0 + }) : e.name = r), + m && t && i(t, "arity") && e.length !== t.arity && p(e, "length", { + value: t.arity + }); + try { + t && i(t, "constructor") && t.constructor ? o && p(e, "prototype", { + writable: !1 + }) : e.prototype && (e.prototype = void 0) + } catch (e) {} + var n = b(e); + return i(n, "source") || (n.source = g(y, "string" == typeof r ? r : "")), + e + } + ; + Function.prototype.toString = w((function() { + return f(this) && l(this).source || s(this) + } + ), "toString") + }, + 9498: function(e) { + var r = Math.ceil + , t = Math.floor; + e.exports = Math.trunc || function(e) { + var n = +e; + return (n > 0 ? t : r)(n) + } + }, + 9587: function(e, r, t) { + var n, a, f, i, o, c = t(376), s = t(8495), u = t(381).f, b = t(612).set, l = t(5039), d = t(6232), p = t(5118), h = t(9689), v = t(2395), g = c.MutationObserver || c.WebKitMutationObserver, m = c.document, y = c.process, w = c.Promise, I = u(c, "queueMicrotask"), S = I && I.value; + if (!S) { + var x = new l + , O = function() { + var e, r; + for (v && (e = y.domain) && e.exit(); r = x.get(); ) + try { + r() + } catch (e) { + throw x.head && n(), + e + } + e && e.enter() + }; + d || v || h || !g || !m ? !p && w && w.resolve ? ((i = w.resolve(void 0)).constructor = w, + o = s(i.then, i), + n = function() { + o(O) + } + ) : v ? n = function() { + y.nextTick(O) + } + : (b = s(b, c), + n = function() { + b(O) + } + ) : (a = !0, + f = m.createTextNode(""), + new g(O).observe(f, { + characterData: !0 + }), + n = function() { + f.data = a = !a + } + ), + S = function(e) { + x.head || n(), + x.add(e) + } + } + e.exports = S + }, + 6175: function(e, r, t) { + "use strict"; + var n = t(312) + , a = TypeError + , f = function(e) { + var r, t; + this.promise = new e((function(e, n) { + if (void 0 !== r || void 0 !== t) + throw a("Bad Promise constructor"); + r = e, + t = n + } + )), + this.resolve = n(r), + this.reject = n(t) + }; + e.exports.f = function(e) { + return new f(e) + } + }, + 5198: function(e, r, t) { + var n = t(2100); + e.exports = function(e, r) { + return void 0 === e ? arguments.length < 2 ? "" : r : n(e) + } + }, + 5993: function(e, r, t) { + "use strict"; + var n = t(6986) + , a = t(9027) + , f = t(1970) + , i = t(9769) + , o = t(5070) + , c = t(4207) + , s = t(3749) + , u = t(2296) + , b = t(144) + , l = Object.assign + , d = Object.defineProperty + , p = a([].concat); + e.exports = !l || i((function() { + if (n && 1 !== l({ + b: 1 + }, l(d({}, "a", { + enumerable: !0, + get: function() { + d(this, "b", { + value: 3, + enumerable: !1 + }) + } + }), { + b: 2 + })).b) + return !0; + var e = {} + , r = {} + , t = Symbol() + , a = "abcdefghijklmnopqrst"; + return e[t] = 7, + a.split("").forEach((function(e) { + r[e] = e + } + )), + 7 != l({}, e)[t] || o(l({}, r)).join("") != a + } + )) ? function(e, r) { + for (var t = u(e), a = arguments.length, i = 1, l = c.f, d = s.f; a > i; ) + for (var h, v = b(arguments[i++]), g = l ? p(o(v), l(v)) : o(v), m = g.length, y = 0; m > y; ) + h = g[y++], + n && !f(d, v, h) || (t[h] = v[h]); + return t + } + : l + }, + 6101: function(e, r, t) { + var n, a = t(6347), f = t(2041), i = t(8671), o = t(3804), c = t(8673), s = t(30), u = t(1506), b = "prototype", l = "script", d = u("IE_PROTO"), p = function() {}, h = function(e) { + return "<" + l + ">" + e + "" + }, v = function(e) { + e.write(h("")), + e.close(); + var r = e.parentWindow.Object; + return e = null, + r + }, g = function() { + try { + n = new ActiveXObject("htmlfile") + } catch (e) {} + var e, r, t; + g = "undefined" != typeof document ? document.domain && n ? v(n) : (r = s("iframe"), + t = "java" + l + ":", + r.style.display = "none", + c.appendChild(r), + r.src = String(t), + (e = r.contentWindow.document).open(), + e.write(h("document.F=Object")), + e.close(), + e.F) : v(n); + for (var a = i.length; a--; ) + delete g[b][i[a]]; + return g() + }; + o[d] = !0, + e.exports = Object.create || function(e, r) { + var t; + return null !== e ? (p[b] = a(e), + t = new p, + p[b] = null, + t[d] = e) : t = g(), + void 0 === r ? t : f.f(t, r) + } + }, + 2041: function(e, r, t) { + var n = t(6986) + , a = t(774) + , f = t(9051) + , i = t(6347) + , o = t(1884) + , c = t(5070); + r.f = n && !a ? Object.defineProperties : function(e, r) { + i(e); + for (var t, n = o(r), a = c(r), s = a.length, u = 0; s > u; ) + f.f(e, t = a[u++], n[t]); + return e + } + }, + 9051: function(e, r, t) { + var n = t(6986) + , a = t(4690) + , f = t(774) + , i = t(6347) + , o = t(7568) + , c = TypeError + , s = Object.defineProperty + , u = Object.getOwnPropertyDescriptor + , b = "enumerable" + , l = "configurable" + , d = "writable"; + r.f = n ? f ? function(e, r, t) { + if (i(e), + r = o(r), + i(t), + "function" == typeof e && "prototype" === r && "value"in t && d in t && !t[d]) { + var n = u(e, r); + n && n[d] && (e[r] = t.value, + t = { + configurable: l in t ? t[l] : n[l], + enumerable: b in t ? t[b] : n[b], + writable: !1 + }) + } + return s(e, r, t) + } + : s : function(e, r, t) { + if (i(e), + r = o(r), + i(t), + a) + try { + return s(e, r, t) + } catch (e) {} + if ("get"in t || "set"in t) + throw c("Accessors not supported"); + return "value"in t && (e[r] = t.value), + e + } + }, + 381: function(e, r, t) { + var n = t(6986) + , a = t(1970) + , f = t(3749) + , i = t(9829) + , o = t(1884) + , c = t(7568) + , s = t(5831) + , u = t(4690) + , b = Object.getOwnPropertyDescriptor; + r.f = n ? b : function(e, r) { + if (e = o(e), + r = c(r), + u) + try { + return b(e, r) + } catch (e) {} + if (s(e, r)) + return i(!a(f.f, e, r), e[r]) + } + }, + 6216: function(e, r, t) { + var n = t(237) + , a = t(1884) + , f = t(6099).f + , i = t(7401) + , o = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; + e.exports.f = function(e) { + return o && "Window" == n(e) ? function(e) { + try { + return f(e) + } catch (e) { + return i(o) + } + }(e) : f(a(e)) + } + }, + 6099: function(e, r, t) { + var n = t(6360) + , a = t(8671).concat("length", "prototype"); + r.f = Object.getOwnPropertyNames || function(e) { + return n(e, a) + } + }, + 4207: function(e, r) { + r.f = Object.getOwnPropertySymbols + }, + 4972: function(e, r, t) { + var n = t(5831) + , a = t(7235) + , f = t(2296) + , i = t(1506) + , o = t(328) + , c = i("IE_PROTO") + , s = Object + , u = s.prototype; + e.exports = o ? s.getPrototypeOf : function(e) { + var r = f(e); + if (n(r, c)) + return r[c]; + var t = r.constructor; + return a(t) && r instanceof t ? t.prototype : r instanceof s ? u : null + } + }, + 6471: function(e, r, t) { + var n = t(9027); + e.exports = n({}.isPrototypeOf) + }, + 6360: function(e, r, t) { + var n = t(9027) + , a = t(5831) + , f = t(1884) + , i = t(752).indexOf + , o = t(3804) + , c = n([].push); + e.exports = function(e, r) { + var t, n = f(e), s = 0, u = []; + for (t in n) + !a(o, t) && a(n, t) && c(u, t); + for (; r.length > s; ) + a(n, t = r[s++]) && (~i(u, t) || c(u, t)); + return u + } + }, + 5070: function(e, r, t) { + var n = t(6360) + , a = t(8671); + e.exports = Object.keys || function(e) { + return n(e, a) + } + }, + 3749: function(e, r) { + "use strict"; + var t = {}.propertyIsEnumerable + , n = Object.getOwnPropertyDescriptor + , a = n && !t.call({ + 1: 2 + }, 1); + r.f = a ? function(e) { + var r = n(this, e); + return !!r && r.enumerable + } + : t + }, + 331: function(e, r, t) { + var n = t(2352) + , a = t(6347) + , f = t(7725); + e.exports = Object.setPrototypeOf || ("__proto__"in {} ? function() { + var e, r = !1, t = {}; + try { + (e = n(Object.prototype, "__proto__", "set"))(t, []), + r = t instanceof Array + } catch (e) {} + return function(t, n) { + return a(t), + f(n), + r ? e(t, n) : t.__proto__ = n, + t + } + }() : void 0) + }, + 7475: function(e, r, t) { + "use strict"; + var n = t(5727) + , a = t(5032); + e.exports = n ? {}.toString : function() { + return "[object " + a(this) + "]" + } + }, + 7963: function(e, r, t) { + var n = t(1970) + , a = t(7235) + , f = t(2951) + , i = TypeError; + e.exports = function(e, r) { + var t, o; + if ("string" === r && a(t = e.toString) && !f(o = n(t, e))) + return o; + if (a(t = e.valueOf) && !f(o = n(t, e))) + return o; + if ("string" !== r && a(t = e.toString) && !f(o = n(t, e))) + return o; + throw i("Can't convert object to primitive value") + } + }, + 2231: function(e, r, t) { + var n = t(9023) + , a = t(9027) + , f = t(6099) + , i = t(4207) + , o = t(6347) + , c = a([].concat); + e.exports = n("Reflect", "ownKeys") || function(e) { + var r = f.f(o(e)) + , t = i.f; + return t ? c(r, t(e)) : r + } + }, + 1537: function(e, r, t) { + var n = t(376); + e.exports = n + }, + 9545: function(e) { + e.exports = function(e) { + try { + return { + error: !1, + value: e() + } + } catch (e) { + return { + error: !0, + value: e + } + } + } + }, + 5277: function(e, r, t) { + var n = t(376) + , a = t(5773) + , f = t(7235) + , i = t(4039) + , o = t(6441) + , c = t(3967) + , s = t(254) + , u = t(9273) + , b = t(8264) + , l = t(1150) + , d = a && a.prototype + , p = c("species") + , h = !1 + , v = f(n.PromiseRejectionEvent) + , g = i("Promise", (function() { + var e = o(a) + , r = e !== String(a); + if (!r && 66 === l) + return !0; + if (b && (!d.catch || !d.finally)) + return !0; + if (!l || l < 51 || !/native code/.test(e)) { + var t = new a((function(e) { + e(1) + } + )) + , n = function(e) { + e((function() {} + ), (function() {} + )) + }; + if ((t.constructor = {})[p] = n, + !(h = t.then((function() {} + ))instanceof n)) + return !0 + } + return !r && (s || u) && !v + } + )); + e.exports = { + CONSTRUCTOR: g, + REJECTION_EVENT: v, + SUBCLASSING: h + } + }, + 5773: function(e, r, t) { + var n = t(376); + e.exports = n.Promise + }, + 2397: function(e, r, t) { + var n = t(6347) + , a = t(2951) + , f = t(6175); + e.exports = function(e, r) { + if (n(e), + a(r) && r.constructor === e) + return r; + var t = f.f(e); + return (0, + t.resolve)(r), + t.promise + } + }, + 1021: function(e, r, t) { + var n = t(5773) + , a = t(6251) + , f = t(5277).CONSTRUCTOR; + e.exports = f || !a((function(e) { + n.all(e).then(void 0, (function() {} + )) + } + )) + }, + 5039: function(e) { + var r = function() { + this.head = null, + this.tail = null + }; + r.prototype = { + add: function(e) { + var r = { + item: e, + next: null + } + , t = this.tail; + t ? t.next = r : this.head = r, + this.tail = r + }, + get: function() { + var e = this.head; + if (e) + return null === (this.head = e.next) && (this.tail = null), + e.item + } + }, + e.exports = r + }, + 8224: function(e, r, t) { + var n = t(1246) + , a = TypeError; + e.exports = function(e) { + if (n(e)) + throw a("Can't call method on " + e); + return e + } + }, + 6841: function(e, r, t) { + "use strict"; + var n = t(9023) + , a = t(6317) + , f = t(3967) + , i = t(6986) + , o = f("species"); + e.exports = function(e) { + var r = n(e); + i && r && !r[o] && a(r, o, { + configurable: !0, + get: function() { + return this + } + }) + } + }, + 5746: function(e, r, t) { + var n = t(9051).f + , a = t(5831) + , f = t(3967)("toStringTag"); + e.exports = function(e, r, t) { + e && !t && (e = e.prototype), + e && !a(e, f) && n(e, f, { + configurable: !0, + value: r + }) + } + }, + 1506: function(e, r, t) { + var n = t(4377) + , a = t(3380) + , f = n("keys"); + e.exports = function(e) { + return f[e] || (f[e] = a(e)) + } + }, + 8797: function(e, r, t) { + var n = t(376) + , a = t(8108) + , f = "__core-js_shared__" + , i = n[f] || a(f, {}); + e.exports = i + }, + 4377: function(e, r, t) { + var n = t(8264) + , a = t(8797); + (e.exports = function(e, r) { + return a[e] || (a[e] = void 0 !== r ? r : {}) + } + )("versions", []).push({ + version: "3.29.1", + mode: n ? "pure" : "global", + copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)", + license: "https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE", + source: "https://github.com/zloirock/core-js" + }) + }, + 5261: function(e, r, t) { + var n = t(6347) + , a = t(6160) + , f = t(1246) + , i = t(3967)("species"); + e.exports = function(e, r) { + var t, o = n(e).constructor; + return void 0 === o || f(t = n(o)[i]) ? r : a(t) + } + }, + 273: function(e, r, t) { + var n = t(9027) + , a = t(1835) + , f = t(2100) + , i = t(8224) + , o = n("".charAt) + , c = n("".charCodeAt) + , s = n("".slice) + , u = function(e) { + return function(r, t) { + var n, u, b = f(i(r)), l = a(t), d = b.length; + return l < 0 || l >= d ? e ? "" : void 0 : (n = c(b, l)) < 55296 || n > 56319 || l + 1 === d || (u = c(b, l + 1)) < 56320 || u > 57343 ? e ? o(b, l) : n : e ? s(b, l, l + 2) : u - 56320 + (n - 55296 << 10) + 65536 + } + }; + e.exports = { + codeAt: u(!1), + charAt: u(!0) + } + }, + 603: function(e, r, t) { + var n = t(9027) + , a = 2147483647 + , f = /[^\0-\u007E]/ + , i = /[.\u3002\uFF0E\uFF61]/g + , o = "Overflow: input needs wider integers to process" + , c = RangeError + , s = n(i.exec) + , u = Math.floor + , b = String.fromCharCode + , l = n("".charCodeAt) + , d = n([].join) + , p = n([].push) + , h = n("".replace) + , v = n("".split) + , g = n("".toLowerCase) + , m = function(e) { + return e + 22 + 75 * (e < 26) + } + , y = function(e, r, t) { + var n = 0; + for (e = t ? u(e / 700) : e >> 1, + e += u(e / r); e > 455; ) + e = u(e / 35), + n += 36; + return u(n + 36 * e / (e + 38)) + } + , w = function(e) { + var r = []; + e = function(e) { + for (var r = [], t = 0, n = e.length; t < n; ) { + var a = l(e, t++); + if (a >= 55296 && a <= 56319 && t < n) { + var f = l(e, t++); + 56320 == (64512 & f) ? p(r, ((1023 & a) << 10) + (1023 & f) + 65536) : (p(r, a), + t--) + } else + p(r, a) + } + return r + }(e); + var t, n, f = e.length, i = 128, s = 0, h = 72; + for (t = 0; t < e.length; t++) + (n = e[t]) < 128 && p(r, b(n)); + var v = r.length + , g = v; + for (v && p(r, "-"); g < f; ) { + var w = a; + for (t = 0; t < e.length; t++) + (n = e[t]) >= i && n < w && (w = n); + var I = g + 1; + if (w - i > u((a - s) / I)) + throw c(o); + for (s += (w - i) * I, + i = w, + t = 0; t < e.length; t++) { + if ((n = e[t]) < i && ++s > a) + throw c(o); + if (n == i) { + for (var S = s, x = 36; ; ) { + var O = x <= h ? 1 : x >= h + 26 ? 26 : x - h; + if (S < O) + break; + var _ = S - O + , k = 36 - O; + p(r, b(m(O + _ % k))), + S = u(_ / k), + x += 36 + } + p(r, b(m(S))), + h = y(s, I, g == v), + s = 0, + g++ + } + } + s++, + i++ + } + return d(r, "") + }; + e.exports = function(e) { + var r, t, n = [], a = v(h(g(e), i, "."), "."); + for (r = 0; r < a.length; r++) + t = a[r], + p(n, s(f, t) ? "xn--" + w(t) : t); + return d(n, ".") + } + }, + 2727: function(e, r, t) { + var n = t(1150) + , a = t(9769); + e.exports = !!Object.getOwnPropertySymbols && !a((function() { + var e = Symbol(); + return !String(e) || !(Object(e)instanceof Symbol) || !Symbol.sham && n && n < 41 + } + )) + }, + 4486: function(e, r, t) { + var n = t(1970) + , a = t(9023) + , f = t(3967) + , i = t(2072); + e.exports = function() { + var e = a("Symbol") + , r = e && e.prototype + , t = r && r.valueOf + , o = f("toPrimitive"); + r && !r[o] && i(r, o, (function(e) { + return n(t, this) + } + ), { + arity: 1 + }) + } + }, + 2169: function(e, r, t) { + var n = t(2727); + e.exports = n && !!Symbol.for && !!Symbol.keyFor + }, + 612: function(e, r, t) { + var n, a, f, i, o = t(376), c = t(4272), s = t(8495), u = t(7235), b = t(5831), l = t(9769), d = t(8673), p = t(927), h = t(30), v = t(1238), g = t(6232), m = t(2395), y = o.setImmediate, w = o.clearImmediate, I = o.process, S = o.Dispatch, x = o.Function, O = o.MessageChannel, _ = o.String, k = 0, C = {}, P = "onreadystatechange"; + l((function() { + n = o.location + } + )); + var E = function(e) { + if (b(C, e)) { + var r = C[e]; + delete C[e], + r() + } + } + , j = function(e) { + return function() { + E(e) + } + } + , A = function(e) { + E(e.data) + } + , R = function(e) { + o.postMessage(_(e), n.protocol + "//" + n.host) + }; + y && w || (y = function(e) { + v(arguments.length, 1); + var r = u(e) ? e : x(e) + , t = p(arguments, 1); + return C[++k] = function() { + c(r, void 0, t) + } + , + a(k), + k + } + , + w = function(e) { + delete C[e] + } + , + m ? a = function(e) { + I.nextTick(j(e)) + } + : S && S.now ? a = function(e) { + S.now(j(e)) + } + : O && !g ? (i = (f = new O).port2, + f.port1.onmessage = A, + a = s(i.postMessage, i)) : o.addEventListener && u(o.postMessage) && !o.importScripts && n && "file:" !== n.protocol && !l(R) ? (a = R, + o.addEventListener("message", A, !1)) : a = P in h("script") ? function(e) { + d.appendChild(h("script"))[P] = function() { + d.removeChild(this), + E(e) + } + } + : function(e) { + setTimeout(j(e), 0) + } + ), + e.exports = { + set: y, + clear: w + } + }, + 3260: function(e, r, t) { + var n = t(1835) + , a = Math.max + , f = Math.min; + e.exports = function(e, r) { + var t = n(e); + return t < 0 ? a(t + r, 0) : f(t, r) + } + }, + 1884: function(e, r, t) { + var n = t(144) + , a = t(8224); + e.exports = function(e) { + return n(a(e)) + } + }, + 1835: function(e, r, t) { + var n = t(9498); + e.exports = function(e) { + var r = +e; + return r != r || 0 === r ? 0 : n(r) + } + }, + 5346: function(e, r, t) { + var n = t(1835) + , a = Math.min; + e.exports = function(e) { + return e > 0 ? a(n(e), 9007199254740991) : 0 + } + }, + 2296: function(e, r, t) { + var n = t(8224) + , a = Object; + e.exports = function(e) { + return a(n(e)) + } + }, + 799: function(e, r, t) { + var n = t(1970) + , a = t(2951) + , f = t(7082) + , i = t(3953) + , o = t(7963) + , c = t(3967) + , s = TypeError + , u = c("toPrimitive"); + e.exports = function(e, r) { + if (!a(e) || f(e)) + return e; + var t, c = i(e, u); + if (c) { + if (void 0 === r && (r = "default"), + t = n(c, e, r), + !a(t) || f(t)) + return t; + throw s("Can't convert object to primitive value") + } + return void 0 === r && (r = "number"), + o(e, r) + } + }, + 7568: function(e, r, t) { + var n = t(799) + , a = t(7082); + e.exports = function(e) { + var r = n(e, "string"); + return a(r) ? r : r + "" + } + }, + 5727: function(e, r, t) { + var n = {}; + n[t(3967)("toStringTag")] = "z", + e.exports = "[object z]" === String(n) + }, + 2100: function(e, r, t) { + var n = t(5032) + , a = String; + e.exports = function(e) { + if ("Symbol" === n(e)) + throw TypeError("Cannot convert a Symbol value to a string"); + return a(e) + } + }, + 2734: function(e) { + var r = String; + e.exports = function(e) { + try { + return r(e) + } catch (e) { + return "Object" + } + } + }, + 3380: function(e, r, t) { + var n = t(9027) + , a = 0 + , f = Math.random() + , i = n(1..toString); + e.exports = function(e) { + return "Symbol(" + (void 0 === e ? "" : e) + ")_" + i(++a + f, 36) + } + }, + 9269: function(e, r, t) { + var n = t(9769) + , a = t(3967) + , f = t(6986) + , i = t(8264) + , o = a("iterator"); + e.exports = !n((function() { + var e = new URL("b?a=1&b=2&c=3","http://a") + , r = e.searchParams + , t = ""; + return e.pathname = "c%20d", + r.forEach((function(e, n) { + r.delete("b"), + t += n + e + } + )), + i && !e.toJSON || !r.size && (i || !f) || !r.sort || "http://a/c%20d?a=1&c=3" !== e.href || "3" !== r.get("c") || "a=1" !== String(new URLSearchParams("?a=1")) || !r[o] || "a" !== new URL("https://a@b").username || "b" !== new URLSearchParams(new URLSearchParams("a=b")).get("a") || "xn--e1aybc" !== new URL("http://тест").host || "#%D0%B1" !== new URL("http://a#б").hash || "a1c3" !== t || "x" !== new URL("http://x",void 0).host + } + )) + }, + 9366: function(e, r, t) { + var n = t(2727); + e.exports = n && !Symbol.sham && "symbol" == typeof Symbol.iterator + }, + 774: function(e, r, t) { + var n = t(6986) + , a = t(9769); + e.exports = n && a((function() { + return 42 != Object.defineProperty((function() {} + ), "prototype", { + value: 42, + writable: !1 + }).prototype + } + )) + }, + 1238: function(e) { + var r = TypeError; + e.exports = function(e, t) { + if (e < t) + throw r("Not enough arguments"); + return e + } + }, + 3545: function(e, r, t) { + var n = t(376) + , a = t(7235) + , f = n.WeakMap; + e.exports = a(f) && /native code/.test(String(f)) + }, + 8656: function(e, r, t) { + var n = t(1537) + , a = t(5831) + , f = t(5027) + , i = t(9051).f; + e.exports = function(e) { + var r = n.Symbol || (n.Symbol = {}); + a(r, e) || i(r, e, { + value: f.f(e) + }) + } + }, + 5027: function(e, r, t) { + var n = t(3967); + r.f = n + }, + 3967: function(e, r, t) { + var n = t(376) + , a = t(4377) + , f = t(5831) + , i = t(3380) + , o = t(2727) + , c = t(9366) + , s = n.Symbol + , u = a("wks") + , b = c ? s.for || s : s && s.withoutSetter || i; + e.exports = function(e) { + return f(u, e) || (u[e] = o && f(s, e) ? s[e] : b("Symbol." + e)), + u[e] + } + }, + 2262: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(6471) + , f = t(4972) + , i = t(331) + , o = t(292) + , c = t(6101) + , s = t(235) + , u = t(9829) + , b = t(7205) + , l = t(1844) + , d = t(6875) + , p = t(5198) + , h = t(3967)("toStringTag") + , v = Error + , g = [].push + , m = function(e, r) { + var t, n = a(y, this); + i ? t = i(v(), n ? f(this) : y) : (t = n ? this : c(y), + s(t, h, "Error")), + void 0 !== r && s(t, "message", p(r)), + l(t, m, t.stack, 1), + arguments.length > 2 && b(t, arguments[2]); + var o = []; + return d(e, g, { + that: o + }), + s(t, "errors", o), + t + }; + i ? i(m, v) : o(m, v, { + name: !0 + }); + var y = m.prototype = c(v.prototype, { + constructor: u(1, m), + message: u(1, ""), + name: u(1, "AggregateError") + }); + n({ + global: !0, + constructor: !0, + arity: 2 + }, { + AggregateError: m + }) + }, + 5245: function(e, r, t) { + t(2262) + }, + 8662: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(9769) + , f = t(4422) + , i = t(2951) + , o = t(2296) + , c = t(2312) + , s = t(8851) + , u = t(3980) + , b = t(5262) + , l = t(4613) + , d = t(3967) + , p = t(1150) + , h = d("isConcatSpreadable") + , v = p >= 51 || !a((function() { + var e = []; + return e[h] = !1, + e.concat()[0] !== e + } + )) + , g = function(e) { + if (!i(e)) + return !1; + var r = e[h]; + return void 0 !== r ? !!r : f(e) + }; + n({ + target: "Array", + proto: !0, + arity: 1, + forced: !v || !l("concat") + }, { + concat: function(e) { + var r, t, n, a, f, i = o(this), l = b(i, 0), d = 0; + for (r = -1, + n = arguments.length; r < n; r++) + if (g(f = -1 === r ? i : arguments[r])) + for (a = c(f), + s(d + a), + t = 0; t < a; t++, + d++) + t in f && u(l, d, f[t]); + else + s(d + 1), + u(l, d++, f); + return l.length = d, + l + } + }) + }, + 6861: function(e, r, t) { + "use strict"; + var n = t(1884) + , a = t(4102) + , f = t(857) + , i = t(2569) + , o = t(9051).f + , c = t(8710) + , s = t(67) + , u = t(8264) + , b = t(6986) + , l = "Array Iterator" + , d = i.set + , p = i.getterFor(l); + e.exports = c(Array, "Array", (function(e, r) { + d(this, { + type: l, + target: n(e), + index: 0, + kind: r + }) + } + ), (function() { + var e = p(this) + , r = e.target + , t = e.kind + , n = e.index++; + return !r || n >= r.length ? (e.target = void 0, + s(void 0, !0)) : s("keys" == t ? n : "values" == t ? r[n] : [n, r[n]], !1) + } + ), "values"); + var h = f.Arguments = f.Array; + if (a("keys"), + a("values"), + a("entries"), + !u && b && "values" !== h.name) + try { + o(h, "name", { + value: "values" + }) + } catch (e) {} + }, + 9125: function(e, r, t) { + var n = t(9401) + , a = t(9023) + , f = t(4272) + , i = t(1970) + , o = t(9027) + , c = t(9769) + , s = t(7235) + , u = t(7082) + , b = t(927) + , l = t(7194) + , d = t(2727) + , p = String + , h = a("JSON", "stringify") + , v = o(/./.exec) + , g = o("".charAt) + , m = o("".charCodeAt) + , y = o("".replace) + , w = o(1..toString) + , I = /[\uD800-\uDFFF]/g + , S = /^[\uD800-\uDBFF]$/ + , x = /^[\uDC00-\uDFFF]$/ + , O = !d || c((function() { + var e = a("Symbol")(); + return "[null]" != h([e]) || "{}" != h({ + a: e + }) || "{}" != h(Object(e)) + } + )) + , _ = c((function() { + return '"\\udf06\\ud834"' !== h("\udf06\ud834") || '"\\udead"' !== h("\udead") + } + )) + , k = function(e, r) { + var t = b(arguments) + , n = l(r); + if (s(n) || void 0 !== e && !u(e)) + return t[1] = function(e, r) { + if (s(n) && (r = i(n, this, p(e), r)), + !u(r)) + return r + } + , + f(h, null, t) + } + , C = function(e, r, t) { + var n = g(t, r - 1) + , a = g(t, r + 1); + return v(S, e) && !v(x, a) || v(x, e) && !v(S, n) ? "\\u" + w(m(e, 0), 16) : e + }; + h && n({ + target: "JSON", + stat: !0, + arity: 3, + forced: O || _ + }, { + stringify: function(e, r, t) { + var n = b(arguments) + , a = f(O ? k : h, null, n); + return _ && "string" == typeof a ? y(a, I, C) : a + } + }) + }, + 6058: function(e, r, t) { + var n = t(376); + t(5746)(n.JSON, "JSON", !0) + }, + 7923: function(e, r, t) { + t(5746)(Math, "Math", !0) + }, + 5560: function(e, r, t) { + var n = t(9401) + , a = t(2727) + , f = t(9769) + , i = t(4207) + , o = t(2296); + n({ + target: "Object", + stat: !0, + forced: !a || f((function() { + i.f(1) + } + )) + }, { + getOwnPropertySymbols: function(e) { + var r = i.f; + return r ? r(o(e)) : [] + } + }) + }, + 1074: function(e, r, t) { + var n = t(5727) + , a = t(2072) + , f = t(7475); + n || a(Object.prototype, "toString", f, { + unsafe: !0 + }) + }, + 1310: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(1970) + , f = t(312) + , i = t(6175) + , o = t(9545) + , c = t(6875); + n({ + target: "Promise", + stat: !0, + forced: t(1021) + }, { + allSettled: function(e) { + var r = this + , t = i.f(r) + , n = t.resolve + , s = t.reject + , u = o((function() { + var t = f(r.resolve) + , i = [] + , o = 0 + , s = 1; + c(e, (function(e) { + var f = o++ + , c = !1; + s++, + a(t, r, e).then((function(e) { + c || (c = !0, + i[f] = { + status: "fulfilled", + value: e + }, + --s || n(i)) + } + ), (function(e) { + c || (c = !0, + i[f] = { + status: "rejected", + reason: e + }, + --s || n(i)) + } + )) + } + )), + --s || n(i) + } + )); + return u.error && s(u.value), + t.promise + } + }) + }, + 421: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(1970) + , f = t(312) + , i = t(6175) + , o = t(9545) + , c = t(6875); + n({ + target: "Promise", + stat: !0, + forced: t(1021) + }, { + all: function(e) { + var r = this + , t = i.f(r) + , n = t.resolve + , s = t.reject + , u = o((function() { + var t = f(r.resolve) + , i = [] + , o = 0 + , u = 1; + c(e, (function(e) { + var f = o++ + , c = !1; + u++, + a(t, r, e).then((function(e) { + c || (c = !0, + i[f] = e, + --u || n(i)) + } + ), s) + } + )), + --u || n(i) + } + )); + return u.error && s(u.value), + t.promise + } + }) + }, + 4409: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(1970) + , f = t(312) + , i = t(9023) + , o = t(6175) + , c = t(9545) + , s = t(6875) + , u = t(1021) + , b = "No one promise resolved"; + n({ + target: "Promise", + stat: !0, + forced: u + }, { + any: function(e) { + var r = this + , t = i("AggregateError") + , n = o.f(r) + , u = n.resolve + , l = n.reject + , d = c((function() { + var n = f(r.resolve) + , i = [] + , o = 0 + , c = 1 + , d = !1; + s(e, (function(e) { + var f = o++ + , s = !1; + c++, + a(n, r, e).then((function(e) { + s || d || (d = !0, + u(e)) + } + ), (function(e) { + s || d || (s = !0, + i[f] = e, + --c || l(new t(i,b))) + } + )) + } + )), + --c || l(new t(i,b)) + } + )); + return d.error && l(d.value), + n.promise + } + }) + }, + 92: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(8264) + , f = t(5277).CONSTRUCTOR + , i = t(5773) + , o = t(9023) + , c = t(7235) + , s = t(2072) + , u = i && i.prototype; + if (n({ + target: "Promise", + proto: !0, + forced: f, + real: !0 + }, { + catch: function(e) { + return this.then(void 0, e) + } + }), + !a && c(i)) { + var b = o("Promise").prototype.catch; + u.catch !== b && s(u, "catch", b, { + unsafe: !0 + }) + } + }, + 8596: function(e, r, t) { + "use strict"; + var n, a, f, i = t(9401), o = t(8264), c = t(2395), s = t(376), u = t(1970), b = t(2072), l = t(331), d = t(5746), p = t(6841), h = t(312), v = t(7235), g = t(2951), m = t(1507), y = t(5261), w = t(612).set, I = t(9587), S = t(4962), x = t(9545), O = t(5039), _ = t(2569), k = t(5773), C = t(5277), P = t(6175), E = "Promise", j = C.CONSTRUCTOR, A = C.REJECTION_EVENT, R = C.SUBCLASSING, M = _.getterFor(E), L = _.set, T = k && k.prototype, W = k, U = T, N = s.TypeError, D = s.document, B = s.process, F = P.f, H = F, q = !!(D && D.createEvent && s.dispatchEvent), z = "unhandledrejection", G = function(e) { + var r; + return !(!g(e) || !v(r = e.then)) && r + }, V = function(e, r) { + var t, n, a, f = r.value, i = 1 == r.state, o = i ? e.ok : e.fail, c = e.resolve, s = e.reject, b = e.domain; + try { + o ? (i || (2 === r.rejection && X(r), + r.rejection = 1), + !0 === o ? t = f : (b && b.enter(), + t = o(f), + b && (b.exit(), + a = !0)), + t === e.promise ? s(N("Promise-chain cycle")) : (n = G(t)) ? u(n, t, c, s) : c(t)) : s(f) + } catch (e) { + b && !a && b.exit(), + s(e) + } + }, J = function(e, r) { + e.notified || (e.notified = !0, + I((function() { + for (var t, n = e.reactions; t = n.get(); ) + V(t, e); + e.notified = !1, + r && !e.rejection && Y(e) + } + ))) + }, Z = function(e, r, t) { + var n, a; + q ? ((n = D.createEvent("Event")).promise = r, + n.reason = t, + n.initEvent(e, !1, !0), + s.dispatchEvent(n)) : n = { + promise: r, + reason: t + }, + !A && (a = s["on" + e]) ? a(n) : e === z && S("Unhandled promise rejection", t) + }, Y = function(e) { + u(w, s, (function() { + var r, t = e.facade, n = e.value; + if (Q(e) && (r = x((function() { + c ? B.emit("unhandledRejection", n, t) : Z(z, t, n) + } + )), + e.rejection = c || Q(e) ? 2 : 1, + r.error)) + throw r.value + } + )) + }, Q = function(e) { + return 1 !== e.rejection && !e.parent + }, X = function(e) { + u(w, s, (function() { + var r = e.facade; + c ? B.emit("rejectionHandled", r) : Z("rejectionhandled", r, e.value) + } + )) + }, K = function(e, r, t) { + return function(n) { + e(r, n, t) + } + }, $ = function(e, r, t) { + e.done || (e.done = !0, + t && (e = t), + e.value = r, + e.state = 2, + J(e, !0)) + }, ee = function(e, r, t) { + if (!e.done) { + e.done = !0, + t && (e = t); + try { + if (e.facade === r) + throw N("Promise can't be resolved itself"); + var n = G(r); + n ? I((function() { + var t = { + done: !1 + }; + try { + u(n, r, K(ee, t, e), K($, t, e)) + } catch (r) { + $(t, r, e) + } + } + )) : (e.value = r, + e.state = 1, + J(e, !1)) + } catch (r) { + $({ + done: !1 + }, r, e) + } + } + }; + if (j && (U = (W = function(e) { + m(this, U), + h(e), + u(n, this); + var r = M(this); + try { + e(K(ee, r), K($, r)) + } catch (e) { + $(r, e) + } + } + ).prototype, + (n = function(e) { + L(this, { + type: E, + done: !1, + notified: !1, + parent: !1, + reactions: new O, + rejection: !1, + state: 0, + value: void 0 + }) + } + ).prototype = b(U, "then", (function(e, r) { + var t = M(this) + , n = F(y(this, W)); + return t.parent = !0, + n.ok = !v(e) || e, + n.fail = v(r) && r, + n.domain = c ? B.domain : void 0, + 0 == t.state ? t.reactions.add(n) : I((function() { + V(n, t) + } + )), + n.promise + } + )), + a = function() { + var e = new n + , r = M(e); + this.promise = e, + this.resolve = K(ee, r), + this.reject = K($, r) + } + , + P.f = F = function(e) { + return e === W || undefined === e ? new a(e) : H(e) + } + , + !o && v(k) && T !== Object.prototype)) { + f = T.then, + R || b(T, "then", (function(e, r) { + var t = this; + return new W((function(e, r) { + u(f, t, e, r) + } + )).then(e, r) + } + ), { + unsafe: !0 + }); + try { + delete T.constructor + } catch (e) {} + l && l(T, U) + } + i({ + global: !0, + constructor: !0, + wrap: !0, + forced: j + }, { + Promise: W + }), + d(W, E, !1, !0), + p(E) + }, + 480: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(8264) + , f = t(5773) + , i = t(9769) + , o = t(9023) + , c = t(7235) + , s = t(5261) + , u = t(2397) + , b = t(2072) + , l = f && f.prototype; + if (n({ + target: "Promise", + proto: !0, + real: !0, + forced: !!f && i((function() { + l.finally.call({ + then: function() {} + }, (function() {} + )) + } + )) + }, { + finally: function(e) { + var r = s(this, o("Promise")) + , t = c(e); + return this.then(t ? function(t) { + return u(r, e()).then((function() { + return t + } + )) + } + : e, t ? function(t) { + return u(r, e()).then((function() { + throw t + } + )) + } + : e) + } + }), + !a && c(f)) { + var d = o("Promise").prototype.finally; + l.finally !== d && b(l, "finally", d, { + unsafe: !0 + }) + } + }, + 1295: function(e, r, t) { + t(8596), + t(421), + t(92), + t(7661), + t(2389), + t(7532) + }, + 7661: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(1970) + , f = t(312) + , i = t(6175) + , o = t(9545) + , c = t(6875); + n({ + target: "Promise", + stat: !0, + forced: t(1021) + }, { + race: function(e) { + var r = this + , t = i.f(r) + , n = t.reject + , s = o((function() { + var i = f(r.resolve); + c(e, (function(e) { + a(i, r, e).then(t.resolve, n) + } + )) + } + )); + return s.error && n(s.value), + t.promise + } + }) + }, + 2389: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(1970) + , f = t(6175); + n({ + target: "Promise", + stat: !0, + forced: t(5277).CONSTRUCTOR + }, { + reject: function(e) { + var r = f.f(this); + return a(r.reject, void 0, e), + r.promise + } + }) + }, + 7532: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(9023) + , f = t(8264) + , i = t(5773) + , o = t(5277).CONSTRUCTOR + , c = t(2397) + , s = a("Promise") + , u = f && !o; + n({ + target: "Promise", + stat: !0, + forced: f || o + }, { + resolve: function(e) { + return c(u && this === s ? i : this, e) + } + }) + }, + 3218: function(e, r, t) { + var n = t(9401) + , a = t(376) + , f = t(5746); + n({ + global: !0 + }, { + Reflect: {} + }), + f(a.Reflect, "Reflect", !0) + }, + 9711: function(e, r, t) { + "use strict"; + var n = t(273).charAt + , a = t(2100) + , f = t(2569) + , i = t(8710) + , o = t(67) + , c = "String Iterator" + , s = f.set + , u = f.getterFor(c); + i(String, "String", (function(e) { + s(this, { + type: c, + string: a(e), + index: 0 + }) + } + ), (function() { + var e, r = u(this), t = r.string, a = r.index; + return a >= t.length ? o(void 0, !0) : (e = n(t, a), + r.index += e.length, + o(e, !1)) + } + )) + }, + 761: function(e, r, t) { + t(8656)("asyncIterator") + }, + 7338: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(376) + , f = t(1970) + , i = t(9027) + , o = t(8264) + , c = t(6986) + , s = t(2727) + , u = t(9769) + , b = t(5831) + , l = t(6471) + , d = t(6347) + , p = t(1884) + , h = t(7568) + , v = t(2100) + , g = t(9829) + , m = t(6101) + , y = t(5070) + , w = t(6099) + , I = t(6216) + , S = t(4207) + , x = t(381) + , O = t(9051) + , _ = t(2041) + , k = t(3749) + , C = t(2072) + , P = t(6317) + , E = t(4377) + , j = t(1506) + , A = t(3804) + , R = t(3380) + , M = t(3967) + , L = t(5027) + , T = t(8656) + , W = t(4486) + , U = t(5746) + , N = t(2569) + , D = t(3250).forEach + , B = j("hidden") + , F = "Symbol" + , H = "prototype" + , q = N.set + , z = N.getterFor(F) + , G = Object[H] + , V = a.Symbol + , J = V && V[H] + , Z = a.TypeError + , Y = a.QObject + , Q = x.f + , X = O.f + , K = I.f + , $ = k.f + , ee = i([].push) + , re = E("symbols") + , te = E("op-symbols") + , ne = E("wks") + , ae = !Y || !Y[H] || !Y[H].findChild + , fe = c && u((function() { + return 7 != m(X({}, "a", { + get: function() { + return X(this, "a", { + value: 7 + }).a + } + })).a + } + )) ? function(e, r, t) { + var n = Q(G, r); + n && delete G[r], + X(e, r, t), + n && e !== G && X(G, r, n) + } + : X + , ie = function(e, r) { + var t = re[e] = m(J); + return q(t, { + type: F, + tag: e, + description: r + }), + c || (t.description = r), + t + } + , oe = function(e, r, t) { + e === G && oe(te, r, t), + d(e); + var n = h(r); + return d(t), + b(re, n) ? (t.enumerable ? (b(e, B) && e[B][n] && (e[B][n] = !1), + t = m(t, { + enumerable: g(0, !1) + })) : (b(e, B) || X(e, B, g(1, {})), + e[B][n] = !0), + fe(e, n, t)) : X(e, n, t) + } + , ce = function(e, r) { + d(e); + var t = p(r) + , n = y(t).concat(le(t)); + return D(n, (function(r) { + c && !f(se, t, r) || oe(e, r, t[r]) + } + )), + e + } + , se = function(e) { + var r = h(e) + , t = f($, this, r); + return !(this === G && b(re, r) && !b(te, r)) && (!(t || !b(this, r) || !b(re, r) || b(this, B) && this[B][r]) || t) + } + , ue = function(e, r) { + var t = p(e) + , n = h(r); + if (t !== G || !b(re, n) || b(te, n)) { + var a = Q(t, n); + return !a || !b(re, n) || b(t, B) && t[B][n] || (a.enumerable = !0), + a + } + } + , be = function(e) { + var r = K(p(e)) + , t = []; + return D(r, (function(e) { + b(re, e) || b(A, e) || ee(t, e) + } + )), + t + } + , le = function(e) { + var r = e === G + , t = K(r ? te : p(e)) + , n = []; + return D(t, (function(e) { + !b(re, e) || r && !b(G, e) || ee(n, re[e]) + } + )), + n + }; + s || (V = function() { + if (l(J, this)) + throw Z("Symbol is not a constructor"); + var e = arguments.length && void 0 !== arguments[0] ? v(arguments[0]) : void 0 + , r = R(e) + , t = function(e) { + this === G && f(t, te, e), + b(this, B) && b(this[B], r) && (this[B][r] = !1), + fe(this, r, g(1, e)) + }; + return c && ae && fe(G, r, { + configurable: !0, + set: t + }), + ie(r, e) + } + , + C(J = V[H], "toString", (function() { + return z(this).tag + } + )), + C(V, "withoutSetter", (function(e) { + return ie(R(e), e) + } + )), + k.f = se, + O.f = oe, + _.f = ce, + x.f = ue, + w.f = I.f = be, + S.f = le, + L.f = function(e) { + return ie(M(e), e) + } + , + c && (P(J, "description", { + configurable: !0, + get: function() { + return z(this).description + } + }), + o || C(G, "propertyIsEnumerable", se, { + unsafe: !0 + }))), + n({ + global: !0, + constructor: !0, + wrap: !0, + forced: !s, + sham: !s + }, { + Symbol: V + }), + D(y(ne), (function(e) { + T(e) + } + )), + n({ + target: F, + stat: !0, + forced: !s + }, { + useSetter: function() { + ae = !0 + }, + useSimple: function() { + ae = !1 + } + }), + n({ + target: "Object", + stat: !0, + forced: !s, + sham: !c + }, { + create: function(e, r) { + return void 0 === r ? m(e) : ce(m(e), r) + }, + defineProperty: oe, + defineProperties: ce, + getOwnPropertyDescriptor: ue + }), + n({ + target: "Object", + stat: !0, + forced: !s + }, { + getOwnPropertyNames: be + }), + W(), + U(V, F), + A[B] = !0 + }, + 1386: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(6986) + , f = t(376) + , i = t(9027) + , o = t(5831) + , c = t(7235) + , s = t(6471) + , u = t(2100) + , b = t(6317) + , l = t(292) + , d = f.Symbol + , p = d && d.prototype; + if (a && c(d) && (!("description"in p) || void 0 !== d().description)) { + var h = {} + , v = function() { + var e = arguments.length < 1 || void 0 === arguments[0] ? void 0 : u(arguments[0]) + , r = s(p, this) ? new d(e) : void 0 === e ? d() : d(e); + return "" === e && (h[r] = !0), + r + }; + l(v, d), + v.prototype = p, + p.constructor = v; + var g = "Symbol(test)" == String(d("test")) + , m = i(p.valueOf) + , y = i(p.toString) + , w = /^Symbol\((.*)\)[^)]+$/ + , I = i("".replace) + , S = i("".slice); + b(p, "description", { + configurable: !0, + get: function() { + var e = m(this); + if (o(h, e)) + return ""; + var r = y(e) + , t = g ? S(r, 7, -1) : I(r, w, "$1"); + return "" === t ? void 0 : t + } + }), + n({ + global: !0, + constructor: !0, + forced: !0 + }, { + Symbol: v + }) + } + }, + 4607: function(e, r, t) { + var n = t(9401) + , a = t(9023) + , f = t(5831) + , i = t(2100) + , o = t(4377) + , c = t(2169) + , s = o("string-to-symbol-registry") + , u = o("symbol-to-string-registry"); + n({ + target: "Symbol", + stat: !0, + forced: !c + }, { + for: function(e) { + var r = i(e); + if (f(s, r)) + return s[r]; + var t = a("Symbol")(r); + return s[r] = t, + u[t] = r, + t + } + }) + }, + 9217: function(e, r, t) { + t(8656)("hasInstance") + }, + 2969: function(e, r, t) { + t(8656)("isConcatSpreadable") + }, + 8804: function(e, r, t) { + t(8656)("iterator") + }, + 1885: function(e, r, t) { + t(7338), + t(4607), + t(9289), + t(9125), + t(5560) + }, + 9289: function(e, r, t) { + var n = t(9401) + , a = t(5831) + , f = t(7082) + , i = t(2734) + , o = t(4377) + , c = t(2169) + , s = o("symbol-to-string-registry"); + n({ + target: "Symbol", + stat: !0, + forced: !c + }, { + keyFor: function(e) { + if (!f(e)) + throw TypeError(i(e) + " is not a symbol"); + if (a(s, e)) + return s[e] + } + }) + }, + 4185: function(e, r, t) { + t(8656)("matchAll") + }, + 6960: function(e, r, t) { + t(8656)("match") + }, + 2243: function(e, r, t) { + t(8656)("replace") + }, + 7049: function(e, r, t) { + t(8656)("search") + }, + 5497: function(e, r, t) { + t(8656)("species") + }, + 6469: function(e, r, t) { + t(8656)("split") + }, + 7641: function(e, r, t) { + var n = t(8656) + , a = t(4486); + n("toPrimitive"), + a() + }, + 4792: function(e, r, t) { + var n = t(9023) + , a = t(8656) + , f = t(5746); + a("toStringTag"), + f(n("Symbol"), "Symbol") + }, + 9582: function(e, r, t) { + t(8656)("unscopables") + }, + 5523: function(e, r, t) { + t(8656)("dispose") + }, + 1249: function(e, r, t) { + var n = t(376) + , a = t(6920) + , f = t(8225) + , i = t(6861) + , o = t(235) + , c = t(3967) + , s = c("iterator") + , u = c("toStringTag") + , b = i.values + , l = function(e, r) { + if (e) { + if (e[s] !== b) + try { + o(e, s, b) + } catch (r) { + e[s] = b + } + if (e[u] || o(e, u, r), + a[r]) + for (var t in i) + if (e[t] !== i[t]) + try { + o(e, t, i[t]) + } catch (r) { + e[t] = i[t] + } + } + }; + for (var d in a) + l(n[d] && n[d].prototype, d); + l(f, "DOMTokenList") + }, + 6321: function(e, r, t) { + "use strict"; + t(6861); + var n = t(9401) + , a = t(376) + , f = t(1970) + , i = t(9027) + , o = t(6986) + , c = t(9269) + , s = t(2072) + , u = t(6317) + , b = t(4266) + , l = t(5746) + , d = t(1811) + , p = t(2569) + , h = t(1507) + , v = t(7235) + , g = t(5831) + , m = t(8495) + , y = t(5032) + , w = t(6347) + , I = t(2951) + , S = t(2100) + , x = t(6101) + , O = t(9829) + , _ = t(3401) + , k = t(205) + , C = t(1238) + , P = t(3967) + , E = t(5515) + , j = P("iterator") + , A = "URLSearchParams" + , R = A + "Iterator" + , M = p.set + , L = p.getterFor(A) + , T = p.getterFor(R) + , W = Object.getOwnPropertyDescriptor + , U = function(e) { + if (!o) + return a[e]; + var r = W(a, e); + return r && r.value + } + , N = U("fetch") + , D = U("Request") + , B = U("Headers") + , F = D && D.prototype + , H = B && B.prototype + , q = a.RegExp + , z = a.TypeError + , G = a.decodeURIComponent + , V = a.encodeURIComponent + , J = i("".charAt) + , Z = i([].join) + , Y = i([].push) + , Q = i("".replace) + , X = i([].shift) + , K = i([].splice) + , $ = i("".split) + , ee = i("".slice) + , re = /\+/g + , te = Array(4) + , ne = function(e) { + return te[e - 1] || (te[e - 1] = q("((?:%[\\da-f]{2}){" + e + "})", "gi")) + } + , ae = function(e) { + try { + return G(e) + } catch (r) { + return e + } + } + , fe = function(e) { + var r = Q(e, re, " ") + , t = 4; + try { + return G(r) + } catch (e) { + for (; t; ) + r = Q(r, ne(t--), ae); + return r + } + } + , ie = /[!'()~]|%20/g + , oe = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+" + } + , ce = function(e) { + return oe[e] + } + , se = function(e) { + return Q(V(e), ie, ce) + } + , ue = d((function(e, r) { + M(this, { + type: R, + iterator: _(L(e).entries), + kind: r + }) + } + ), "Iterator", (function() { + var e = T(this) + , r = e.kind + , t = e.iterator.next() + , n = t.value; + return t.done || (t.value = "keys" === r ? n.key : "values" === r ? n.value : [n.key, n.value]), + t + } + ), !0) + , be = function(e) { + this.entries = [], + this.url = null, + void 0 !== e && (I(e) ? this.parseObject(e) : this.parseQuery("string" == typeof e ? "?" === J(e, 0) ? ee(e, 1) : e : S(e))) + }; + be.prototype = { + type: A, + bindURL: function(e) { + this.url = e, + this.update() + }, + parseObject: function(e) { + var r, t, n, a, i, o, c, s = k(e); + if (s) + for (t = (r = _(e, s)).next; !(n = f(t, r)).done; ) { + if (i = (a = _(w(n.value))).next, + (o = f(i, a)).done || (c = f(i, a)).done || !f(i, a).done) + throw z("Expected sequence with length 2"); + Y(this.entries, { + key: S(o.value), + value: S(c.value) + }) + } + else + for (var u in e) + g(e, u) && Y(this.entries, { + key: u, + value: S(e[u]) + }) + }, + parseQuery: function(e) { + if (e) + for (var r, t, n = $(e, "&"), a = 0; a < n.length; ) + (r = n[a++]).length && (t = $(r, "="), + Y(this.entries, { + key: fe(X(t)), + value: fe(Z(t, "=")) + })) + }, + serialize: function() { + for (var e, r = this.entries, t = [], n = 0; n < r.length; ) + e = r[n++], + Y(t, se(e.key) + "=" + se(e.value)); + return Z(t, "&") + }, + update: function() { + this.entries.length = 0, + this.parseQuery(this.url.query) + }, + updateURL: function() { + this.url && this.url.update() + } + }; + var le = function() { + h(this, de); + var e = M(this, new be(arguments.length > 0 ? arguments[0] : void 0)); + o || (this.length = e.entries.length) + } + , de = le.prototype; + if (b(de, { + append: function(e, r) { + C(arguments.length, 2); + var t = L(this); + Y(t.entries, { + key: S(e), + value: S(r) + }), + o || this.length++, + t.updateURL() + }, + delete: function(e) { + C(arguments.length, 1); + for (var r = L(this), t = r.entries, n = S(e), a = 0; a < t.length; ) + t[a].key === n ? K(t, a, 1) : a++; + o || (this.length = t.length), + r.updateURL() + }, + get: function(e) { + C(arguments.length, 1); + for (var r = L(this).entries, t = S(e), n = 0; n < r.length; n++) + if (r[n].key === t) + return r[n].value; + return null + }, + getAll: function(e) { + C(arguments.length, 1); + for (var r = L(this).entries, t = S(e), n = [], a = 0; a < r.length; a++) + r[a].key === t && Y(n, r[a].value); + return n + }, + has: function(e) { + C(arguments.length, 1); + for (var r = L(this).entries, t = S(e), n = 0; n < r.length; ) + if (r[n++].key === t) + return !0; + return !1 + }, + set: function(e, r) { + C(arguments.length, 1); + for (var t, n = L(this), a = n.entries, f = !1, i = S(e), c = S(r), s = 0; s < a.length; s++) + (t = a[s]).key === i && (f ? K(a, s--, 1) : (f = !0, + t.value = c)); + f || Y(a, { + key: i, + value: c + }), + o || (this.length = a.length), + n.updateURL() + }, + sort: function() { + var e = L(this); + E(e.entries, (function(e, r) { + return e.key > r.key ? 1 : -1 + } + )), + e.updateURL() + }, + forEach: function(e) { + for (var r, t = L(this).entries, n = m(e, arguments.length > 1 ? arguments[1] : void 0), a = 0; a < t.length; ) + n((r = t[a++]).value, r.key, this) + }, + keys: function() { + return new ue(this,"keys") + }, + values: function() { + return new ue(this,"values") + }, + entries: function() { + return new ue(this,"entries") + } + }, { + enumerable: !0 + }), + s(de, j, de.entries, { + name: "entries" + }), + s(de, "toString", (function() { + return L(this).serialize() + } + ), { + enumerable: !0 + }), + o && u(de, "size", { + get: function() { + return L(this).entries.length + }, + configurable: !0, + enumerable: !0 + }), + l(le, A), + n({ + global: !0, + constructor: !0, + forced: !c + }, { + URLSearchParams: le + }), + !c && v(B)) { + var pe = i(H.has) + , he = i(H.set) + , ve = function(e) { + if (I(e)) { + var r, t = e.body; + if (y(t) === A) + return r = e.headers ? new B(e.headers) : new B, + pe(r, "content-type") || he(r, "content-type", "application/x-www-form-urlencoded;charset=UTF-8"), + x(e, { + body: O(0, S(t)), + headers: O(0, r) + }) + } + return e + }; + if (v(N) && n({ + global: !0, + enumerable: !0, + dontCallGetSet: !0, + forced: !0 + }, { + fetch: function(e) { + return N(e, arguments.length > 1 ? ve(arguments[1]) : {}) + } + }), + v(D)) { + var ge = function(e) { + return h(this, F), + new D(e,arguments.length > 1 ? ve(arguments[1]) : {}) + }; + F.constructor = ge, + ge.prototype = F, + n({ + global: !0, + constructor: !0, + dontCallGetSet: !0, + forced: !0 + }, { + Request: ge + }) + } + } + e.exports = { + URLSearchParams: le, + getState: L + } + }, + 6337: function(e, r, t) { + t(6321) + }, + 7138: function(e, r, t) { + "use strict"; + var n = t(6986) + , a = t(9027) + , f = t(6317) + , i = URLSearchParams.prototype + , o = a(i.forEach); + n && !("size"in i) && f(i, "size", { + get: function() { + var e = 0; + return o(this, (function() { + e++ + } + )), + e + }, + configurable: !0, + enumerable: !0 + }) + }, + 6217: function(e, r, t) { + "use strict"; + t(9711); + var n, a = t(9401), f = t(6986), i = t(9269), o = t(376), c = t(8495), s = t(9027), u = t(2072), b = t(6317), l = t(1507), d = t(5831), p = t(5993), h = t(5335), v = t(7401), g = t(273).codeAt, m = t(603), y = t(2100), w = t(5746), I = t(1238), S = t(6321), x = t(2569), O = x.set, _ = x.getterFor("URL"), k = S.URLSearchParams, C = S.getState, P = o.URL, E = o.TypeError, j = o.parseInt, A = Math.floor, R = Math.pow, M = s("".charAt), L = s(/./.exec), T = s([].join), W = s(1..toString), U = s([].pop), N = s([].push), D = s("".replace), B = s([].shift), F = s("".split), H = s("".slice), q = s("".toLowerCase), z = s([].unshift), G = "Invalid scheme", V = "Invalid host", J = "Invalid port", Z = /[a-z]/i, Y = /[\d+-.a-z]/i, Q = /\d/, X = /^0x/i, K = /^[0-7]+$/, $ = /^\d+$/, ee = /^[\da-f]+$/i, re = /[\0\t\n\r #%/:<>?@[\\\]^|]/, te = /[\0\t\n\r #/:<>?@[\\\]^|]/, ne = /^[\u0000-\u0020]+/, ae = /(^|[^\u0000-\u0020])[\u0000-\u0020]+$/, fe = /[\t\n\r]/g, ie = function(e) { + var r, t, n, a; + if ("number" == typeof e) { + for (r = [], + t = 0; t < 4; t++) + z(r, e % 256), + e = A(e / 256); + return T(r, ".") + } + if ("object" == typeof e) { + for (r = "", + n = function(e) { + for (var r = null, t = 1, n = null, a = 0, f = 0; f < 8; f++) + 0 !== e[f] ? (a > t && (r = n, + t = a), + n = null, + a = 0) : (null === n && (n = f), + ++a); + return a > t && (r = n, + t = a), + r + }(e), + t = 0; t < 8; t++) + a && 0 === e[t] || (a && (a = !1), + n === t ? (r += t ? ":" : "::", + a = !0) : (r += W(e[t], 16), + t < 7 && (r += ":"))); + return "[" + r + "]" + } + return e + }, oe = {}, ce = p({}, oe, { + " ": 1, + '"': 1, + "<": 1, + ">": 1, + "`": 1 + }), se = p({}, ce, { + "#": 1, + "?": 1, + "{": 1, + "}": 1 + }), ue = p({}, se, { + "/": 1, + ":": 1, + ";": 1, + "=": 1, + "@": 1, + "[": 1, + "\\": 1, + "]": 1, + "^": 1, + "|": 1 + }), be = function(e, r) { + var t = g(e, 0); + return t > 32 && t < 127 && !d(r, e) ? e : encodeURIComponent(e) + }, le = { + ftp: 21, + file: null, + http: 80, + https: 443, + ws: 80, + wss: 443 + }, de = function(e, r) { + var t; + return 2 == e.length && L(Z, M(e, 0)) && (":" == (t = M(e, 1)) || !r && "|" == t) + }, pe = function(e) { + var r; + return e.length > 1 && de(H(e, 0, 2)) && (2 == e.length || "/" === (r = M(e, 2)) || "\\" === r || "?" === r || "#" === r) + }, he = function(e) { + return "." === e || "%2e" === q(e) + }, ve = {}, ge = {}, me = {}, ye = {}, we = {}, Ie = {}, Se = {}, xe = {}, Oe = {}, _e = {}, ke = {}, Ce = {}, Pe = {}, Ee = {}, je = {}, Ae = {}, Re = {}, Me = {}, Le = {}, Te = {}, We = {}, Ue = function(e, r, t) { + var n, a, f, i = y(e); + if (r) { + if (a = this.parse(i)) + throw E(a); + this.searchParams = null + } else { + if (void 0 !== t && (n = new Ue(t,!0)), + a = this.parse(i, null, n)) + throw E(a); + (f = C(new k)).bindURL(this), + this.searchParams = f + } + }; + Ue.prototype = { + type: "URL", + parse: function(e, r, t) { + var a, f, i, o, c, s = this, u = r || ve, b = 0, l = "", p = !1, g = !1, m = !1; + for (e = y(e), + r || (s.scheme = "", + s.username = "", + s.password = "", + s.host = null, + s.port = null, + s.path = [], + s.query = null, + s.fragment = null, + s.cannotBeABaseURL = !1, + e = D(e, ne, ""), + e = D(e, ae, "$1")), + e = D(e, fe, ""), + a = h(e); b <= a.length; ) { + switch (f = a[b], + u) { + case ve: + if (!f || !L(Z, f)) { + if (r) + return G; + u = me; + continue + } + l += q(f), + u = ge; + break; + case ge: + if (f && (L(Y, f) || "+" == f || "-" == f || "." == f)) + l += q(f); + else { + if (":" != f) { + if (r) + return G; + l = "", + u = me, + b = 0; + continue + } + if (r && (s.isSpecial() != d(le, l) || "file" == l && (s.includesCredentials() || null !== s.port) || "file" == s.scheme && !s.host)) + return; + if (s.scheme = l, + r) + return void (s.isSpecial() && le[s.scheme] == s.port && (s.port = null)); + l = "", + "file" == s.scheme ? u = Ee : s.isSpecial() && t && t.scheme == s.scheme ? u = ye : s.isSpecial() ? u = xe : "/" == a[b + 1] ? (u = we, + b++) : (s.cannotBeABaseURL = !0, + N(s.path, ""), + u = Le) + } + break; + case me: + if (!t || t.cannotBeABaseURL && "#" != f) + return G; + if (t.cannotBeABaseURL && "#" == f) { + s.scheme = t.scheme, + s.path = v(t.path), + s.query = t.query, + s.fragment = "", + s.cannotBeABaseURL = !0, + u = We; + break + } + u = "file" == t.scheme ? Ee : Ie; + continue; + case ye: + if ("/" != f || "/" != a[b + 1]) { + u = Ie; + continue + } + u = Oe, + b++; + break; + case we: + if ("/" == f) { + u = _e; + break + } + u = Me; + continue; + case Ie: + if (s.scheme = t.scheme, + f == n) + s.username = t.username, + s.password = t.password, + s.host = t.host, + s.port = t.port, + s.path = v(t.path), + s.query = t.query; + else if ("/" == f || "\\" == f && s.isSpecial()) + u = Se; + else if ("?" == f) + s.username = t.username, + s.password = t.password, + s.host = t.host, + s.port = t.port, + s.path = v(t.path), + s.query = "", + u = Te; + else { + if ("#" != f) { + s.username = t.username, + s.password = t.password, + s.host = t.host, + s.port = t.port, + s.path = v(t.path), + s.path.length--, + u = Me; + continue + } + s.username = t.username, + s.password = t.password, + s.host = t.host, + s.port = t.port, + s.path = v(t.path), + s.query = t.query, + s.fragment = "", + u = We + } + break; + case Se: + if (!s.isSpecial() || "/" != f && "\\" != f) { + if ("/" != f) { + s.username = t.username, + s.password = t.password, + s.host = t.host, + s.port = t.port, + u = Me; + continue + } + u = _e + } else + u = Oe; + break; + case xe: + if (u = Oe, + "/" != f || "/" != M(l, b + 1)) + continue; + b++; + break; + case Oe: + if ("/" != f && "\\" != f) { + u = _e; + continue + } + break; + case _e: + if ("@" == f) { + p && (l = "%40" + l), + p = !0, + i = h(l); + for (var w = 0; w < i.length; w++) { + var I = i[w]; + if (":" != I || m) { + var S = be(I, ue); + m ? s.password += S : s.username += S + } else + m = !0 + } + l = "" + } else if (f == n || "/" == f || "?" == f || "#" == f || "\\" == f && s.isSpecial()) { + if (p && "" == l) + return "Invalid authority"; + b -= h(l).length + 1, + l = "", + u = ke + } else + l += f; + break; + case ke: + case Ce: + if (r && "file" == s.scheme) { + u = Ae; + continue + } + if (":" != f || g) { + if (f == n || "/" == f || "?" == f || "#" == f || "\\" == f && s.isSpecial()) { + if (s.isSpecial() && "" == l) + return V; + if (r && "" == l && (s.includesCredentials() || null !== s.port)) + return; + if (o = s.parseHost(l)) + return o; + if (l = "", + u = Re, + r) + return; + continue + } + "[" == f ? g = !0 : "]" == f && (g = !1), + l += f + } else { + if ("" == l) + return V; + if (o = s.parseHost(l)) + return o; + if (l = "", + u = Pe, + r == Ce) + return + } + break; + case Pe: + if (!L(Q, f)) { + if (f == n || "/" == f || "?" == f || "#" == f || "\\" == f && s.isSpecial() || r) { + if ("" != l) { + var x = j(l, 10); + if (x > 65535) + return J; + s.port = s.isSpecial() && x === le[s.scheme] ? null : x, + l = "" + } + if (r) + return; + u = Re; + continue + } + return J + } + l += f; + break; + case Ee: + if (s.scheme = "file", + "/" == f || "\\" == f) + u = je; + else { + if (!t || "file" != t.scheme) { + u = Me; + continue + } + if (f == n) + s.host = t.host, + s.path = v(t.path), + s.query = t.query; + else if ("?" == f) + s.host = t.host, + s.path = v(t.path), + s.query = "", + u = Te; + else { + if ("#" != f) { + pe(T(v(a, b), "")) || (s.host = t.host, + s.path = v(t.path), + s.shortenPath()), + u = Me; + continue + } + s.host = t.host, + s.path = v(t.path), + s.query = t.query, + s.fragment = "", + u = We + } + } + break; + case je: + if ("/" == f || "\\" == f) { + u = Ae; + break + } + t && "file" == t.scheme && !pe(T(v(a, b), "")) && (de(t.path[0], !0) ? N(s.path, t.path[0]) : s.host = t.host), + u = Me; + continue; + case Ae: + if (f == n || "/" == f || "\\" == f || "?" == f || "#" == f) { + if (!r && de(l)) + u = Me; + else if ("" == l) { + if (s.host = "", + r) + return; + u = Re + } else { + if (o = s.parseHost(l)) + return o; + if ("localhost" == s.host && (s.host = ""), + r) + return; + l = "", + u = Re + } + continue + } + l += f; + break; + case Re: + if (s.isSpecial()) { + if (u = Me, + "/" != f && "\\" != f) + continue + } else if (r || "?" != f) + if (r || "#" != f) { + if (f != n && (u = Me, + "/" != f)) + continue + } else + s.fragment = "", + u = We; + else + s.query = "", + u = Te; + break; + case Me: + if (f == n || "/" == f || "\\" == f && s.isSpecial() || !r && ("?" == f || "#" == f)) { + if (".." === (c = q(c = l)) || "%2e." === c || ".%2e" === c || "%2e%2e" === c ? (s.shortenPath(), + "/" == f || "\\" == f && s.isSpecial() || N(s.path, "")) : he(l) ? "/" == f || "\\" == f && s.isSpecial() || N(s.path, "") : ("file" == s.scheme && !s.path.length && de(l) && (s.host && (s.host = ""), + l = M(l, 0) + ":"), + N(s.path, l)), + l = "", + "file" == s.scheme && (f == n || "?" == f || "#" == f)) + for (; s.path.length > 1 && "" === s.path[0]; ) + B(s.path); + "?" == f ? (s.query = "", + u = Te) : "#" == f && (s.fragment = "", + u = We) + } else + l += be(f, se); + break; + case Le: + "?" == f ? (s.query = "", + u = Te) : "#" == f ? (s.fragment = "", + u = We) : f != n && (s.path[0] += be(f, oe)); + break; + case Te: + r || "#" != f ? f != n && ("'" == f && s.isSpecial() ? s.query += "%27" : s.query += "#" == f ? "%23" : be(f, oe)) : (s.fragment = "", + u = We); + break; + case We: + f != n && (s.fragment += be(f, ce)) + } + b++ + } + }, + parseHost: function(e) { + var r, t, n; + if ("[" == M(e, 0)) { + if ("]" != M(e, e.length - 1)) + return V; + if (r = function(e) { + var r, t, n, a, f, i, o, c = [0, 0, 0, 0, 0, 0, 0, 0], s = 0, u = null, b = 0, l = function() { + return M(e, b) + }; + if (":" == l()) { + if (":" != M(e, 1)) + return; + b += 2, + u = ++s + } + for (; l(); ) { + if (8 == s) + return; + if (":" != l()) { + for (r = t = 0; t < 4 && L(ee, l()); ) + r = 16 * r + j(l(), 16), + b++, + t++; + if ("." == l()) { + if (0 == t) + return; + if (b -= t, + s > 6) + return; + for (n = 0; l(); ) { + if (a = null, + n > 0) { + if (!("." == l() && n < 4)) + return; + b++ + } + if (!L(Q, l())) + return; + for (; L(Q, l()); ) { + if (f = j(l(), 10), + null === a) + a = f; + else { + if (0 == a) + return; + a = 10 * a + f + } + if (a > 255) + return; + b++ + } + c[s] = 256 * c[s] + a, + 2 != ++n && 4 != n || s++ + } + if (4 != n) + return; + break + } + if (":" == l()) { + if (b++, + !l()) + return + } else if (l()) + return; + c[s++] = r + } else { + if (null !== u) + return; + b++, + u = ++s + } + } + if (null !== u) + for (i = s - u, + s = 7; 0 != s && i > 0; ) + o = c[s], + c[s--] = c[u + i - 1], + c[u + --i] = o; + else if (8 != s) + return; + return c + }(H(e, 1, -1)), + !r) + return V; + this.host = r + } else if (this.isSpecial()) { + if (e = m(e), + L(re, e)) + return V; + if (r = function(e) { + var r, t, n, a, f, i, o, c = F(e, "."); + if (c.length && "" == c[c.length - 1] && c.length--, + (r = c.length) > 4) + return e; + for (t = [], + n = 0; n < r; n++) { + if ("" == (a = c[n])) + return e; + if (f = 10, + a.length > 1 && "0" == M(a, 0) && (f = L(X, a) ? 16 : 8, + a = H(a, 8 == f ? 1 : 2)), + "" === a) + i = 0; + else { + if (!L(10 == f ? $ : 8 == f ? K : ee, a)) + return e; + i = j(a, f) + } + N(t, i) + } + for (n = 0; n < r; n++) + if (i = t[n], + n == r - 1) { + if (i >= R(256, 5 - r)) + return null + } else if (i > 255) + return null; + for (o = U(t), + n = 0; n < t.length; n++) + o += t[n] * R(256, 3 - n); + return o + }(e), + null === r) + return V; + this.host = r + } else { + if (L(te, e)) + return V; + for (r = "", + t = h(e), + n = 0; n < t.length; n++) + r += be(t[n], oe); + this.host = r + } + }, + cannotHaveUsernamePasswordPort: function() { + return !this.host || this.cannotBeABaseURL || "file" == this.scheme + }, + includesCredentials: function() { + return "" != this.username || "" != this.password + }, + isSpecial: function() { + return d(le, this.scheme) + }, + shortenPath: function() { + var e = this.path + , r = e.length; + !r || "file" == this.scheme && 1 == r && de(e[0], !0) || e.length-- + }, + serialize: function() { + var e = this + , r = e.scheme + , t = e.username + , n = e.password + , a = e.host + , f = e.port + , i = e.path + , o = e.query + , c = e.fragment + , s = r + ":"; + return null !== a ? (s += "//", + e.includesCredentials() && (s += t + (n ? ":" + n : "") + "@"), + s += ie(a), + null !== f && (s += ":" + f)) : "file" == r && (s += "//"), + s += e.cannotBeABaseURL ? i[0] : i.length ? "/" + T(i, "/") : "", + null !== o && (s += "?" + o), + null !== c && (s += "#" + c), + s + }, + setHref: function(e) { + var r = this.parse(e); + if (r) + throw E(r); + this.searchParams.update() + }, + getOrigin: function() { + var e = this.scheme + , r = this.port; + if ("blob" == e) + try { + return new Ne(e.path[0]).origin + } catch (e) { + return "null" + } + return "file" != e && this.isSpecial() ? e + "://" + ie(this.host) + (null !== r ? ":" + r : "") : "null" + }, + getProtocol: function() { + return this.scheme + ":" + }, + setProtocol: function(e) { + this.parse(y(e) + ":", ve) + }, + getUsername: function() { + return this.username + }, + setUsername: function(e) { + var r = h(y(e)); + if (!this.cannotHaveUsernamePasswordPort()) { + this.username = ""; + for (var t = 0; t < r.length; t++) + this.username += be(r[t], ue) + } + }, + getPassword: function() { + return this.password + }, + setPassword: function(e) { + var r = h(y(e)); + if (!this.cannotHaveUsernamePasswordPort()) { + this.password = ""; + for (var t = 0; t < r.length; t++) + this.password += be(r[t], ue) + } + }, + getHost: function() { + var e = this.host + , r = this.port; + return null === e ? "" : null === r ? ie(e) : ie(e) + ":" + r + }, + setHost: function(e) { + this.cannotBeABaseURL || this.parse(e, ke) + }, + getHostname: function() { + var e = this.host; + return null === e ? "" : ie(e) + }, + setHostname: function(e) { + this.cannotBeABaseURL || this.parse(e, Ce) + }, + getPort: function() { + var e = this.port; + return null === e ? "" : y(e) + }, + setPort: function(e) { + this.cannotHaveUsernamePasswordPort() || ("" == (e = y(e)) ? this.port = null : this.parse(e, Pe)) + }, + getPathname: function() { + var e = this.path; + return this.cannotBeABaseURL ? e[0] : e.length ? "/" + T(e, "/") : "" + }, + setPathname: function(e) { + this.cannotBeABaseURL || (this.path = [], + this.parse(e, Re)) + }, + getSearch: function() { + var e = this.query; + return e ? "?" + e : "" + }, + setSearch: function(e) { + "" == (e = y(e)) ? this.query = null : ("?" == M(e, 0) && (e = H(e, 1)), + this.query = "", + this.parse(e, Te)), + this.searchParams.update() + }, + getSearchParams: function() { + return this.searchParams.facade + }, + getHash: function() { + var e = this.fragment; + return e ? "#" + e : "" + }, + setHash: function(e) { + "" != (e = y(e)) ? ("#" == M(e, 0) && (e = H(e, 1)), + this.fragment = "", + this.parse(e, We)) : this.fragment = null + }, + update: function() { + this.query = this.searchParams.serialize() || null + } + }; + var Ne = function(e) { + var r = l(this, De) + , t = I(arguments.length, 1) > 1 ? arguments[1] : void 0 + , n = O(r, new Ue(e,!1,t)); + f || (r.href = n.serialize(), + r.origin = n.getOrigin(), + r.protocol = n.getProtocol(), + r.username = n.getUsername(), + r.password = n.getPassword(), + r.host = n.getHost(), + r.hostname = n.getHostname(), + r.port = n.getPort(), + r.pathname = n.getPathname(), + r.search = n.getSearch(), + r.searchParams = n.getSearchParams(), + r.hash = n.getHash()) + } + , De = Ne.prototype + , Be = function(e, r) { + return { + get: function() { + return _(this)[e]() + }, + set: r && function(e) { + return _(this)[r](e) + } + , + configurable: !0, + enumerable: !0 + } + }; + if (f && (b(De, "href", Be("serialize", "setHref")), + b(De, "origin", Be("getOrigin")), + b(De, "protocol", Be("getProtocol", "setProtocol")), + b(De, "username", Be("getUsername", "setUsername")), + b(De, "password", Be("getPassword", "setPassword")), + b(De, "host", Be("getHost", "setHost")), + b(De, "hostname", Be("getHostname", "setHostname")), + b(De, "port", Be("getPort", "setPort")), + b(De, "pathname", Be("getPathname", "setPathname")), + b(De, "search", Be("getSearch", "setSearch")), + b(De, "searchParams", Be("getSearchParams")), + b(De, "hash", Be("getHash", "setHash"))), + u(De, "toJSON", (function() { + return _(this).serialize() + } + ), { + enumerable: !0 + }), + u(De, "toString", (function() { + return _(this).serialize() + } + ), { + enumerable: !0 + }), + P) { + var Fe = P.createObjectURL + , He = P.revokeObjectURL; + Fe && u(Ne, "createObjectURL", c(Fe, P)), + He && u(Ne, "revokeObjectURL", c(He, P)) + } + w(Ne, "URL"), + a({ + global: !0, + constructor: !0, + forced: !i, + sham: !f + }, { + URL: Ne + }) + }, + 2294: function(e, r, t) { + t(6217) + }, + 5721: function(e, r, t) { + "use strict"; + var n = t(9401) + , a = t(1970); + n({ + target: "URL", + proto: !0, + enumerable: !0 + }, { + toJSON: function() { + return a(URL.prototype.toString, this) + } + }) + } + } + , r = {}; + function t(n) { + var a = r[n]; + if (void 0 !== a) + return a.exports; + var f = r[n] = { + exports: {} + }; + return e[n](f, f.exports, t), + f.exports + } + t.d = function(e, r) { + for (var n in r) + t.o(r, n) && !t.o(e, n) && Object.defineProperty(e, n, { + enumerable: !0, + get: r[n] + }) + } + , + t.g = function() { + if ("object" == typeof globalThis) + return globalThis; + try { + return this || new Function("return this")() + } catch (e) { + if ("object" == typeof window) + return window + } + }(), + t.o = function(e, r) { + return Object.prototype.hasOwnProperty.call(e, r) + } + , + t.r = function(e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { + value: "Module" + }), + Object.defineProperty(e, "__esModule", { + value: !0 + }) + } + ; + var n = {}; + !function() { + "use strict"; + t.r(n), + t.d(n, { + init: function() { + return me + } + }); + var e; + t(5245), + t(6861), + t(1074), + t(1295), + t(1310), + t(4409), + t(480), + t(9711), + t(1249), + t(1885), + t(1386), + t(761), + t(9217), + t(2969), + t(8804), + t(6960), + t(4185), + t(2243), + t(7049), + t(5497), + t(6469), + t(7641), + t(4792), + t(9582), + t(8662), + t(6058), + t(7923), + t(3218), + t(5523), + t(2294), + t(5721), + t(6337), + t(7138); + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l = -1, d = [], p = null, h = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + h.push(t[u]); + h.p = a; + for (var v = []; ; ) + try { + var g = i[r++]; + if (g < 20) + if (g < 17) + 5 === g ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + d[++l] = (c << 8) + i[r++]) : d[++l] = void 0; + else if (17 === g) { + for (s = i[r++], + u = i[r++], + b = h; s > 0; --s) + b = b.p; + d[++l] = b[u] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + d[l] = d[l][s]; + else if (g < 52) + if (20 === g) { + for (s = i[r++], + u = i[r++], + b = h; s > 0; --s) + b = b.p; + b[u] = d[l--] + } else + d[l] = !d[l]; + else if (g < 59) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + d[l] ? r += c : --l; + else if (59 === g) + c = i[r++], + s = d[l--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, h], + u._u = e, + d[++l] = u; + else { + for (s = d[l--], + u = null; b = v.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + v.push(u); + else { + if (!p) + return s; + r = p[1], + p[2], + h = p[3], + v = p[4], + d[++l] = s, + p = p[0] + } + } + } catch (e) { + for (; (c = v.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; p; ) { + for (s = p[4]; c = s.pop(); ) + if (c[0]) + break e; + p = p[0] + } + if (!p) + throw e; + r = p[1], + p[2], + h = p[3], + v = p[4], + p = p[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + v.push(c), + d[++l] = e) : 2 === s ? (r = c[2], + c[0] = 0, + v.push(c)) : (r = c[3], + c[0] = 2, + v.push(c), + d[++l] = e) + } + }(u, [], 0, r) + }("484e4f4a403f5243001a2e283f2d6bd10000002a080983ec0000003611020012000032323400081102001200013232340008110200120002323234000811020012000332324205000000003b001401010842000408141211241f16050708341211241f16050705121816071e16121820121535051800041205331e04071603141f1205", { + get 0() { + return window + }, + get 1() { + return e + }, + set 1(r) { + e = r + } + }); + var r = e; + function a(e, r) { + var t = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; + if (!t) { + if (Array.isArray(e) || (t = function(e, r) { + if (!e) + return; + if ("string" == typeof e) + return f(e, r); + var t = Object.prototype.toString.call(e).slice(8, -1); + "Object" === t && e.constructor && (t = e.constructor.name); + if ("Map" === t || "Set" === t) + return Array.from(e); + if ("Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) + return f(e, r) + }(e)) || r && e && "number" == typeof e.length) { + t && (e = t); + var n = 0 + , a = function() {}; + return { + s: a, + n: function() { + return n >= e.length ? { + done: !0 + } : { + done: !1, + value: e[n++] + } + }, + e: function(e) { + throw e + }, + f: a + } + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + } + var i, o = !0, c = !1; + return { + s: function() { + t = t.call(e) + }, + n: function() { + var e = t.next(); + return o = e.done, + e + }, + e: function(e) { + c = !0, + i = e + }, + f: function() { + try { + o || null == t.return || t.return() + } finally { + if (c) + throw i + } + } + } + } + function f(e, r) { + (null == r || r > e.length) && (r = e.length); + for (var t = 0, n = new Array(r); t < r; t++) + n[t] = e[t]; + return n + } + var i = [{ + name: "Huawei", + regs: [/(huawei)browser\/([\w.]+)/i] + }, { + name: "Chrome", + regs: [/(chrome)\/v?([\w.]+)/i, /\b(?:crmo|crios)\/([\w.]+)/i, /headlesschrome(?:\/([\w.]+)| )/i, / wv\).+(chrome)\/([\w.]+)/i] + }, { + name: "Edge", + regs: [/edg(?:e|ios|a)?\/([\w.]+)/i] + }, { + name: "Firefox", + regs: [/\bfocus\/([\w.]+)/i, /fxios\/([-\w.]+)/i, /mobile vr; rv:([\w.]+)\).+firefox/i, /(firefox)\/([\w.]+)/i] + }, { + name: "IE", + regs: [/(?:ms|\()(ie) ([\w.]+)/i, /trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i, /(iemobile)(?:browser)?[/ ]?([\w.]*)/i] + }, { + name: "Opera", + regs: [/(opera mini)\/([-\w.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w.]+)/i, /(opera)(?:.+version\/|[/ ]+)([\w.]+)/i, /opios[/ ]+([\w.]+)/i, /\bopr\/([\w.]+)/i] + }, { + name: "Safari", + regs: [/version\/([\w.,]+) .*mobile\/\w+ (safari)/i, /version\/([\w(.|,)]+) .*(mobile ?safari|safari)/i] + }]; + function o(e) { + var r, t = { + name: "Other", + isHuawei: function() { + return "Huawei" === this.name + }, + isOpera: function() { + return "Opera" === this.name + }, + isFirefox: function() { + return "Firefox" === this.name + }, + isEdge: function() { + return "Edge" === this.name + }, + isIE: function() { + return "IE" === this.name + }, + isChrome: function() { + return "Chrome" === this.name + }, + isSafari: function() { + return "Safari" === this.name + }, + isOther: function() { + return "Other" === this.name + } + }, n = a(i); + try { + for (n.s(); !(r = n.n()).done; ) { + var f = r.value; + if (f.regs.some((function(r) { + return r.test(e) + } + ))) { + t.name = f.name; + break + } + } + } catch (e) { + n.e(e) + } finally { + n.f() + } + return t + } + function c(e, r) { + var t = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; + if (!t) { + if (Array.isArray(e) || (t = function(e, r) { + if (!e) + return; + if ("string" == typeof e) + return s(e, r); + var t = Object.prototype.toString.call(e).slice(8, -1); + "Object" === t && e.constructor && (t = e.constructor.name); + if ("Map" === t || "Set" === t) + return Array.from(e); + if ("Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) + return s(e, r) + }(e)) || r && e && "number" == typeof e.length) { + t && (e = t); + var n = 0 + , a = function() {}; + return { + s: a, + n: function() { + return n >= e.length ? { + done: !0 + } : { + done: !1, + value: e[n++] + } + }, + e: function(e) { + throw e + }, + f: a + } + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + } + var f, i = !0, o = !1; + return { + s: function() { + t = t.call(e) + }, + n: function() { + var e = t.next(); + return i = e.done, + e + }, + e: function(e) { + o = !0, + f = e + }, + f: function() { + try { + i || null == t.return || t.return() + } finally { + if (o) + throw f + } + } + } + } + function s(e, r) { + (null == r || r > e.length) && (r = e.length); + for (var t = 0, n = new Array(r); t < r; t++) + n[t] = e[t]; + return n + } + var u = [{ + name: "HarmonyOS", + regs: [/droid ([\w.]+)\b.+(harmonyos)/i, /OpenHarmony/i] + }, { + name: "Android", + regs: [/droid ([\w.]+)\b.+(android[- ]x86)/i, /(android)[-/ ]?([\w.]*)/i] + }, { + name: "iOS", + regs: [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i, /\((ipad);[-\w),; ]+apple/i, /applecoremedia\/[\w.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i, /\b(crios)\/([\w.]+)/i, /fxios\/([-\w.]+)/i] + }, { + name: "MacOS", + regs: [/(mac os x) ?([\w. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i] + }, { + name: "Windows", + regs: [/microsoft (windows) (vista|xp)/i, /(windows) nt 6\.2; (arm)/i, /(windows)[/ ]?([ntce\d. ]+\w)(?!.+xbox)/i, /(windows (?:phone(?: os)?|mobile))[/ ]?([\d.\w ]*)/i, /(win(?=3|9|n)|win 9x )([nt\d.]+)/i] + }, { + name: "Linux", + regs: [/(linux) ?([\w.]*)/i] + }]; + function b(e) { + var r, t = { + name: "Other", + isAndroid: function() { + return "Android" === this.name + }, + isiOS: function() { + return "iOS" === this.name + }, + isLinux: function() { + return "Linux" === this.name + }, + isMacOS: function() { + return "MacOS" === this.name + }, + isWindows: function() { + return "Windows" === this.name + }, + isHarmonyOS: function() { + return "HarmonyOS" === this.name + }, + isOther: function() { + return "Other" === this.name + } + }, n = c(u); + try { + for (n.s(); !(r = n.n()).done; ) { + var a = r.value; + if (a.regs.some((function(r) { + return r.test(e) + } + ))) { + t.name = a.name; + break + } + } + } catch (e) { + n.e(e) + } finally { + n.f() + } + return t + } + function l(e, r) { + var t = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; + if (!t) { + if (Array.isArray(e) || (t = function(e, r) { + if (!e) + return; + if ("string" == typeof e) + return d(e, r); + var t = Object.prototype.toString.call(e).slice(8, -1); + "Object" === t && e.constructor && (t = e.constructor.name); + if ("Map" === t || "Set" === t) + return Array.from(e); + if ("Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) + return d(e, r) + }(e)) || r && e && "number" == typeof e.length) { + t && (e = t); + var n = 0 + , a = function() {}; + return { + s: a, + n: function() { + return n >= e.length ? { + done: !0 + } : { + done: !1, + value: e[n++] + } + }, + e: function(e) { + throw e + }, + f: a + } + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + } + var f, i = !0, o = !1; + return { + s: function() { + t = t.call(e) + }, + n: function() { + var e = t.next(); + return i = e.done, + e + }, + e: function(e) { + o = !0, + f = e + }, + f: function() { + try { + i || null == t.return || t.return() + } finally { + if (o) + throw f + } + } + } + } + function d(e, r) { + (null == r || r > e.length) && (r = e.length); + for (var t = 0, n = new Array(r); t < r; t++) + n[t] = e[t]; + return n + } + var p, h = [{ + name: "Android", + regs: [/android/i] + }, { + name: "Apple", + regs: [/mac|iphone|ipad|ipod/i] + }, { + name: "Linux", + regs: [/linux/i] + }, { + name: "Windows", + regs: [/win/i] + }]; + function v(e) { + var r, t = { + name: "Other", + isAndroid: function() { + return "Android" === this.name + }, + isApple: function() { + return "Apple" === this.name + }, + isLinux: function() { + return "Linux" === this.name + }, + isWindows: function() { + return "Windows" === this.name + }, + isOther: function() { + return "Other" === this.name + } + }, n = l(h); + try { + for (n.s(); !(r = n.n()).done; ) { + var a = r.value; + if (a.regs.some((function(r) { + return r.test(e) + } + ))) { + t.name = a.name; + break + } + } + } catch (e) { + n.e(e) + } finally { + n.f() + } + return t + } + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 25) + if (m < 8) + m < 4 ? p[++d] = 1 !== m && null : 4 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]); + else if (m < 18) + if (8 === m) + p[++d] = void 0; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (18 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (m < 66) + m < 52 ? 25 === m ? (s = p[d--], + p[d] -= s) : (s = p[d--], + p[d] = p[d] > s) : 52 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u); + else if (m < 71) + if (66 === m) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l); + else + 71 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f5243001a2e2dae9f070d000000626b58be6200000078110200120000140001110200120001140002110200120002140003110200120003140004110001110003190401902934000b1100021100041904012c29420211020211020112000443011400011100014a120005430047000702110101430042014205000000003b00140001050000003e3b00140103084200060a110b0a1b0c29171a0a160b110b0a1b0c361b1719160a0a1710101b0c29171a0a160b1710101b0c361b1719160a090b0d1b0c3f191b100a09170d38170c1b181106", { + get 0() { + return window + }, + get 1() { + return navigator + }, + get 2() { + return o + }, + get 3() { + return p + }, + set 3(e) { + p = e + } + }, void 0); + var g, m = p; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 38) + if (m < 8) + m < 5 ? p[++d] = 1 !== m && null : 5 === m ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]); + else if (m < 18) + if (8 === m) + p[++d] = void 0; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (m < 20) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (20 === m) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else + s = p[d--], + p[d] = p[d] === s; + else if (m < 59) + m < 52 ? 38 === m ? (s = p[d--], + p[d] = p[d] !== s) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : 52 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : p[d] = typeof p[d]; + else if (m < 67) + if (59 === m) + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u; + else { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } + else + m < 71 ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l)) : 71 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f5243002b2f149c4a1e79000000c256a404c5000000d81102001200001200014a1200021100014301421102013a070003263300081102023a070003263300081102033a070003263300081102043a070003263300081102053a07000326470076021101011102024301070004251400010211010111020343010700052534000d021101011102034301070006251400020211010111020443010700072534000d021101011102044301070008251400030211010111020543010700092514000411000133000311000233000311000333000311000442014205000000003b0114000105000000133b001401060842000a09181a071c071c11180d081c073b1c1a01060f040b090404091d060c0d0e01060d0c1233070a020d0b1c4826091e010f091c071a351533070a020d0b1c48203c25242c070b1d050d061c351133070a020d0b1c482c070b1d050d061c351133070a020d0b1c4824070b091c010706350f33070a020d0b1c48270a020d0b1c351033070a020d0b1c4820011b1c071a1135", { + 0: Object, + get 1() { + return "undefined" != typeof window ? window : void 0 + }, + get 2() { + return "undefined" != typeof navigator ? navigator : void 0 + }, + get 3() { + return "undefined" != typeof document ? document : void 0 + }, + get 4() { + return "undefined" != typeof location ? location : void 0 + }, + get 5() { + return "undefined" != typeof history ? history : void 0 + }, + get 6() { + return g + }, + set 6(e) { + g = e + } + }, void 0); + var y, w = g; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 51) + if (y < 17) + y < 5 ? y < 2 ? p[++d] = !0 : 2 === y ? p[++d] = null : (c = i[r++], + p[++d] = c << 24 >> 24) : y < 7 ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : 7 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = void 0; + else if (y < 38) + if (y < 18) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else if (18 === y) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else + y < 40 ? (s = p[d--], + p[d] = p[d] !== s) : 40 === y ? (s = p[d--], + p[d] = p[d] <= s) : p[d] = !p[d]; + else if (y < 62) + y < 58 ? y < 52 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : 52 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : (s = p[d--], + p[d] = p[d]instanceof s) : y < 59 ? p[d] = typeof p[d] : 59 === y ? (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c); + else if (y < 67) + if (y < 65) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c; + else if (65 === y) + if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s); + else { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } + else + y < 71 ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l)) : 71 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (s = p[d], + p[++d] = s) + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f5243002f370904f8db680000008d7b90d5be000000a31100013a070000263400151100014a12000143004a1200020700034301030028423e00061400020042413d00211102004a12000407000543011400010211010111000112000643014700020042410211010111020112000143013400161102023a0700072633000b11020112000811020237323400161102033a0700072633000b11020112000811020337324205000000003b0114000105000000213b00140104084200090856455e5344595f5e08445f634442595e5707595e5455487f560d6b5e514459465510535f54556d0d534255514455755c555d555e440653515e46514309445f7451445165627c09455e545556595e555407405c4557595e43", { + get 0() { + return document + }, + get 1() { + return navigator + }, + get 2() { + return "undefined" != typeof PluginArray ? PluginArray : void 0 + }, + get 3() { + return "undefined" != typeof MSPluginsCollection ? MSPluginsCollection : void 0 + }, + get 4() { + return y + }, + set 4(e) { + y = e + } + }, void 0); + var I, S = y; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 39) + if (m < 7) + m < 3 ? p[++d] = m < 1 || 1 !== m && null : m < 5 ? (c = i[r++], + p[++d] = c << 24 >> 24) : 5 === m ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = +o[c]); + else if (m < 18) + if (m < 8) + c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]; + else if (8 === m) + p[++d] = void 0; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (m < 20) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (20 === m) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else + s = p[d--], + p[d] = p[d] === s; + else if (m < 59) + m < 51 ? m < 42 ? (s = p[d--], + p[d] = p[d] < s) : 42 === m ? (s = p[d--], + p[d] = p[d] >= s) : p[d] = !p[d] : m < 52 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : 52 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : p[d] = typeof p[d]; + else if (m < 71) + if (m < 66) + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u; + else if (66 === m) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l); + else + m < 73 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === m ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f52430038001326e9446c0000017225bcaae2000001a011020012000033000e1102001200001200013a0700022547001a1102001200004a12000143004a12000305000000363b014301490842110001120004323233000a1100011200040600052714020108421102001200063247000600140101084211020112000747003a1102011200074a12000807000943011400011100014a12000a07000b05000000a53b004302491100014a12000a07000d05000000b73b0043024908421103011200074a12000c070009430149084200140201084211020012000033000e11020012000012000e3a0700022547001a1102001200004a12000e43004a12000f05000000f33b0143014908421100011200104a120011070012430103002a4700040014020108420211020211020012001343011400011100014a12001443003400091100014a12001543003400091100014a1200164300470007021101024300491100014a1200174300470007021101034300491100014a1200184300470007021101044300491101014205000000003b0014000205000000503b0014000305000000bd3b00140004050000010e3b0014010301140001084200190775726974676163086375726f6b6772630860736865726f696804726e63680577736972670a343536363636363636360d756374706f65635169746d6374096f6862637e6362424404697663680964626b75456e63656d1067626243706368724a6f75726368637407757365656375750e62636a63726342677267646775630563747469740c616372426f7463657269747f05656772656e076b637575676163076f6862637e49600d697372266960266b636b69747f09737563744761636872086f75456e74696b63066f7543626163076f754976637467096f75406f746360697e086f7555676067746f", { + get 0() { + return navigator + }, + get 1() { + return window + }, + get 2() { + return o + }, + get 3() { + return I + }, + set 3(e) { + I = e + } + }, void 0); + var x, O = I; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 50) + if (m < 17) + m < 5 ? p[++d] = null : 5 === m ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : p[++d] = void 0; + else if (m < 18) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else if (18 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (m < 59) + m < 51 ? p[d] = !p[d] : 51 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d); + else if (m < 67) + if (59 === m) + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u; + else { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } + else + 67 === m ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + console.log('11'), + g = []) : (l = s.apply(b, u), + p[++d] = l)) : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f5243003e253581911830000000deaa22b0a2000000ea0211020111020012000043011400010211020211020012000143011400021100024a120002430033000a1100014a1200024300321400031100024a120003430033000a1100014a12000343003233000a1100014a12000443003233000a1100014a1200054300321400041100024a120005430033000a1100014a1200054300321400051100024a120006430033000a1100014a12000743003233000a1100014a1200084300321400061100024a120009430033000a1100014a1200094300321400071100033400031100043400031100053400031100063400031100074205000000003b001401030842000a09707660774462606b710875696471636a7768096c76526c6b616a7276076c76496c6b707d0b6c764d6477686a6b7c4a56096c76446b61776a6c61076c764475756960076c764864664a56056c766c4a56076c764a716d6077", { + get 0() { + return navigator + }, + get 1() { + return b + }, + get 2() { + return v + }, + get 3() { + return x + }, + set 3(e) { + x = e + } + }, void 0); + var _, k = x; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 52) + if (m < 17) + m < 7 ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : 7 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = void 0; + else if (m < 18) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else if (18 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (m < 67) + if (m < 59) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d; + else if (59 === m) + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u; + else { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } + else if (m < 68) + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l); + else if (68 === m) { + for (c = i[r++], + b = [void 0], + l = c; l > 0; --l) + b[l] = p[d--]; + u = p[d--], + l = new (s = Function.bind.apply(u, b)), + p[++d] = l + } else + s = p[d], + p[++d] = s + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f52430023250d34e2d6180000003efe67ebd70000004a110200120000140001110202070001070002440214000211020207000344011400031100024a120004110001430134000c1100034a12000411000143014205000000003b001401010842000504405a4d4e1a76004e41444d54405c5c58127407740744474b494440475b5c0101414a76405c5c585b1712740774070073180511755319041b5500740673180511755319041b5501531b55547349054e180511755319041c5500127349054e180511755319041c5501531f5501045c4d5b5c", { + get 0() { + return location + }, + get 1() { + return _ + }, + set 1(e) { + _ = e + }, + 2: RegExp + }, void 0); + var C, P = _; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 51) + if (m < 18) + if (m < 7) + 2 === m ? p[++d] = null : (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]); + else if (m < 8) + c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]; + else if (8 === m) + p[++d] = void 0; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (m < 35) + if (m < 20) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (20 === m) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else { + for (s = i[r++], + u = i[r++], + b = v, + b = v; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else + m < 37 ? (s = p[d--], + p[d] = p[d] == s) : 37 === m ? (s = p[d--], + p[d] = p[d] === s) : (s = p[d--], + p[d] = p[d] !== s); + else if (m < 66) + m < 53 ? 51 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : m < 58 ? (s = p[d--], + (u = p[d--])[s] = p[d]) : 58 === m ? p[d] = typeof p[d] : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u); + else if (m < 71) + if (m < 67) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else + 67 === m ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l)) : r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16); + else + m < 73 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === m ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f52430038193666bb410d000000cb5f070258000000e1070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a421102013a070006263300191102021200051200074a120008110201120009430107000a2534002b1102033a0700062547000607000645000902110101110203430107000b2533000a11020312000c07000d254205000000003b0114000105000000783b001401040842000e171e3c3f3c3b3271363b322e3b2c2d7e737e2a272e3b313808382b303d2a373130062d27333c313208372a3b2c3f2a312c0b3d31302d2a2c2b3d2a312c092e2c312a312a272e3b092b303a3b3837303b3a082a310d2a2c373039043d3f3232072e2c313d3b2d2d1005313c343b3d2a7e2e2c313d3b2d2d0306313c343b3d2a052a372a323b0430313a3b", { + 0: Symbol, + get 1() { + return void 0 !== t.g ? t.g : void 0 + }, + 2: Object, + get 3() { + return "undefined" != typeof process ? process : void 0 + }, + get 4() { + return C + }, + set 4(e) { + C = e + } + }, void 0); + var E, j = C; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l = -1, d = [], p = null, h = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + h.push(t[u]); + h.p = a; + for (var v = []; ; ) + try { + var g = i[r++]; + if (g < 50) + if (g < 17) + g < 7 ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + d[++l] = (c << 8) + i[r++]) : 7 === g ? (c = (i[r] << 8) + i[r + 1], + r += 2, + d[++l] = o[c]) : d[++l] = void 0; + else if (g < 20) + if (17 === g) { + for (s = i[r++], + u = i[r++], + b = h; s > 0; --s) + b = b.p; + d[++l] = b[u] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + d[l] = d[l][s]; + else if (20 === g) { + for (s = i[r++], + u = i[r++], + b = h; s > 0; --s) + b = b.p; + b[u] = d[l--] + } else + s = d[l--], + d[l] = d[l] !== s; + else if (g < 55) + g < 51 ? d[l] = !d[l] : 51 === g ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + d[l] ? --l : r += c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + d[l] ? r += c : --l); + else if (g < 59) + 55 === g ? (s = d[l--], + d[l] = d[l]instanceof s) : d[l] = typeof d[l]; + else if (59 === g) + c = i[r++], + s = d[l--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, h], + u._u = e, + d[++l] = u; + else { + for (s = d[l--], + u = null; b = v.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + v.push(u); + else { + if (!p) + return s; + r = p[1], + p[2], + h = p[3], + v = p[4], + d[++l] = s, + p = p[0] + } + } + } catch (e) { + for (; (c = v.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; p; ) { + for (s = p[4]; c = s.pop(); ) + if (c[0]) + break e; + p = p[0] + } + if (!p) + throw e; + r = p[1], + p[2], + h = p[3], + v = p[4], + p = p[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + v.push(c), + d[++l] = e) : 2 === s ? (r = c[2], + c[0] = 0, + v.push(c)) : (r = c[3], + c[0] = 2, + v.push(c), + d[++l] = e) + } + }(u, [], 0, r) + }("484e4f4a403f5243001c0f149bd5e56400000064c2ad1c1f000000701102003a0700002633000b11020112000111020037323400161102023a0700002633000b1102011200011102023732340008110203120002323234000811020312000332323400081102031200043232340010110203120005323300061102031200064205000000003b00140104084200070962797372717e79727307677b62707e79640848677f767963787a0b74767b7b477f767963787a0b4848797e707f637a766572055662737e78185476796176644572797372657e797054787963726f632553", { + get 0() { + return "undefined" != typeof PluginArray ? PluginArray : void 0 + }, + get 1() { + return navigator + }, + get 2() { + return "undefined" != typeof MSPluginsCollection ? MSPluginsCollection : void 0 + }, + get 3() { + return window + }, + get 4() { + return E + }, + set 4(e) { + E = e + } + }); + var A, R = E; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 38) + if (m < 8) + m < 3 ? p[++d] = m < 1 || 1 !== m && null : m < 5 ? 3 === m ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : 5 === m ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]); + else if (m < 18) + if (m < 12) + p[++d] = void 0; + else if (12 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (m < 23) + if (18 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (23 === m) { + for (s = i[r++], + u = i[r++], + b = v, + b = v; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } else + s = p[d--], + p[d] = p[d] === s; + else if (m < 58) + m < 51 ? m < 42 ? (s = p[d--], + p[d] = p[d] !== s) : 42 === m ? (s = p[d--], + p[d] = p[d] >= s) : p[d] = !p[d] : m < 53 ? 51 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : 53 === m ? (s = p[d--], + (u = p[d--])[s] = p[d]) : p[d] = void 0; + else if (m < 67) + if (m < 59) + p[d] = typeof p[d]; + else if (59 === m) + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u; + else { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } + else + m < 71 ? 67 === m ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l)) : r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : 71 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300072609d3c159950000016800346d35000001b011020012000032323300121102001200004a120001070002430103002a421102001200033a070004263400121102001200034a120001070002430103002a4211020012000500253400111102014a1200061102000700054302082642110200120007323233000c1102001200071200080300254211020012000932470002014211020012000912000a1700013502253400071100010300382547000603003845000611000112000b03002533000d11020012000912000c07000d254211020212000e0403202514000111020212000f0402582514000211020212001003002514000311020212001103002514000411000133000311000234000911000333000311000442110202120012323400071102021200133247000200420211010443000211010543000211010643000c00031400010211010143003400060211010243003400060211010343003400161100014a12001405000001643b01430112000b03032a421100014205000000003b00140001050000001e3b00140002050000003f3b00140003050000005c3b0014000405000000743b0014000505000000bc3b0014000605000001043b00140103084200150a362727013225243e3839073e3933322f18310e1f3236333b322424143f25383a3209222432251630323923062423253e39300920323533253e21322518303223182039072538273225232e13322434253e272338250a343839393234233e3839032523230d2224322516303239231336233606352536393324063b323930233f08273b36233138253a000a3e39393225003e33233f0b3e393932251f323e303f230a3822233225003e33233f0b38222332251f323e303f2306243425323239043221363b06313e3b233225", { + get 0() { + return navigator + }, + 1: Object, + get 2() { + return window + }, + get 3() { + return A + }, + set 3(e) { + A = e + } + }, void 0); + var M, L, T, W, U, N, D, B, F, H, q, z, G, V, J, Z, Y, Q, X, K, $, ee, re, te, ne = A; + function ae(e, r) { + var t = oe(); + return ae = function(r, n) { + var a = t[r -= 349]; + if (void 0 === ae.rxRTlL) { + ae.IlGaZp = function(e, r) { + var t, n, a = [], f = 0, i = ""; + for (e = function(e) { + for (var r, t, n = "", a = "", f = 0, i = 0; t = e.charAt(i++); ~t && (r = f % 4 ? 64 * r + t : t, + f++ % 4) ? n += String.fromCharCode(255 & r >> (-2 * f & 6)) : 0) + t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t); + for (var o = 0, c = n.length; o < c; o++) + a += "%" + ("00" + n.charCodeAt(o).toString(16)).slice(-2); + return decodeURIComponent(a) + }(e), + n = 0; n < 256; n++) + a[n] = n; + for (n = 0; n < 256; n++) + f = (f + a[n] + r.charCodeAt(n % r.length)) % 256, + t = a[n], + a[n] = a[f], + a[f] = t; + n = 0, + f = 0; + for (var o = 0; o < e.length; o++) + f = (f + a[n = (n + 1) % 256]) % 256, + t = a[n], + a[n] = a[f], + a[f] = t, + i += String.fromCharCode(e.charCodeAt(o) ^ a[(a[n] + a[f]) % 256]); + return i + } + , + e = arguments, + ae.rxRTlL = !0 + } + var f = r + t[0] + , i = e[f]; + return i ? a = i : (void 0 === ae.Cfyjoc && (ae.Cfyjoc = !0), + a = ae.IlGaZp(a, n), + e[f] = a), + a + } + , + ae(e, r) + } + function fe(e) { + var r = le + , t = ae; + return (fe = t(366, "xRc%") == typeof Symbol && r(424) == typeof Symbol[r(362)] ? function(e) { + return typeof e + } + : function(e) { + var n = r; + return e && t(357, "idiR") == typeof Symbol && e[n(423)] === Symbol && e !== Symbol.prototype ? "symbol" : typeof e + } + )(e) + } + function ie(e, r) { + for (var t = le, n = ae, a = 0; a < r[n(372, "szau")]; a++) { + var f = r[a]; + f.enumerable = f[n(431, "[eMO")] || !1, + f.configurable = !0, + t(377)in f && (f[n(354, "$dZX")] = !0), + Object[n(370, "f6SR")](e, ce(f[n(358, "m6jK")]), f) + } + } + function oe() { + var e = ["W69rnSoLrc4", "zM9YrwfJAa", "oCosCSoXWQe", "eLNdImkC", "mJaXmJjMBuzkC0m", "DMfSDwu", "WPaYWQS7", "WPiIWR8", "W5yeiCoBuJK", "zNjVBunOyxjdB2rL", "y2HHCKnVzgvbDa", "yuXVWO/cUmkRWRRdLSk+", "i1NdHNGfWO7cTa", "Dg9tDhjPBMC", "FmousSkmW4K", "W5hcVCo5WOtcOW", "Aw52ywXPzcbQigzVCIbIB29Sigz1BMn0Aw9Uiezg", "ymkUqCoDWOa", "x2zPBgW", "C3rYAw5N", "EhSZacjGWPZdOYj0wW", "WRxdKuypkX/cGWxcGmo8", "bmk8dCk/zhBdR1pdP1W", "Aw52ywXPzcbQigzVCIbJB25ZDgfUDcbuAG", "WQTLxq9o", "W4WMyZ3cNa", "y29TChjLC3mGzxjYB3i6ig5VDcbLBM91z2GGzgf0yq", "ndrqueD5A1K", "WOFdSML1hKldVSoABwS", "W5RcLZHIWPeZomkS", "kmoXWQOK", "y29Uy2f0", "Agv4", "q2fUBM90ignHBgWGysbJBgfZCYbHCYbHigz1BMn0Aw9U", "BgvUz3rO", "W6eLBq", "u8oJtSoHza", "W7/dSSo4WR7cOSkdWPuiW4hdMSodWO9m", "qeb0B1bYAw1PDgL2zsbTDxn0ihjLDhvYBIbHihbYAw1PDgL2zsb2ywX1zs4", "ySkkn8kUWOhdKCkuo8kbmq", "WOJdLCo5WPJdLmkzmmkxW6xdSSoAWRiC", "nty1BeHWy0Ph", "B2jQzwn0", "gGhdQIW9wmoWWR1C", "iSkCw8oU", "hv3dISkxfXe", "WOeAW5G8WQZcNa", "CMvN", "fJmsWPtdQq", "W4nhzCorW5a", "WPNcK8kHpSoGpmooW4HDW6ZdMSkrW5pcOq", "y29UC3rYDwn0B3i", "C3LTyM9S", "mZu0ntK5DuHRALr2", "WP4gW5S5WRFcMa", "ChvZAa", "mJiZnLzky1jyuW", "bWP/W5eu", "vSkbWR7dPSohcSo2bXJcUW", "W4RcHmotWPVdVXXAWRFdMSkM", "ACorx8kg", "F8oCWQNdGSo4", "y2fSBa", "W7tdVfJdPsK7", "kmoFya", "ugLoWPVdHmoPyCo8aa", "mti5mZKZnLDMqMr6EG", "mta5odaYmhzruLLlrq", "y2H1BMS", "a2NdRmkbwbJcH8oG", "C2XPy2u", "CMvZzxq", "c8kjW6fwymovW41m", "oSkqwa", "DfdcVcSHtSoCWQnL", "zxjYB3i", "WQ3cRCkVW6xdS8of", "AxrLCMf0B3i", "cJpcVq", "odaWmuTiBfDjwq", "WO0dWRNdO8otWPldQMj2eSkIdW", "WOyYWRyWDh/dGGO", "WR3cT8kS", "WRa5WRZdUSouEmkxW5a/W7e", "cCoUWOhdPfjmWQW", "amowW6VcUCo/jCofjY/cMfRcKrqf", "WPC1WReNzq"]; + return (oe = function() { + return e + } + )() + } + function ce(e) { + var r = ae + , t = function(e, r) { + var t = le + , n = ae; + if (fe(e) !== n(380, "KJav") || null === e) + return e; + var a = e[Symbol.toPrimitive]; + if (void 0 !== a) { + var f = a[n(375, "[al8")](e, r || n(384, "HS6&")); + if (fe(f) !== t(414)) + return f; + throw new TypeError(t(410)) + } + return (r === t(391) ? String : Number)(e) + }(e, le(391)); + return fe(t) === r(418, "j7Jq") ? t : String(t) + } + function se(e, r, t) { + var n = ae; + return e.length >= r ? e : t.repeat(r - e[n(435, "aBO8")]) + e + } + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var o, c, s, u, b, l = -1, d = [], p = null, h = [t]; + for (c = Math.min(t.length, n), + s = 0; s < c; ++s) + h.push(t[s]); + h.p = a; + for (var v = []; ; ) + try { + var g = i[r++]; + if (g < 43) + if (g < 17) + g < 5 ? 2 === g ? d[++l] = null : (o = i[r++], + d[++l] = o << 24 >> 24) : 5 === g ? (o = ((o = ((o = i[r++]) << 8) + i[r++]) << 8) + i[r++], + d[++l] = (o << 8) + i[r++]) : d[++l] = void 0; + else if (g < 23) + if (17 === g) { + for (c = i[r++], + s = i[r++], + u = h; c > 0; --c) + u = u.p; + d[++l] = u[s] + } else { + for (c = i[r++], + s = i[r++], + u = h; c > 0; --c) + u = u.p; + u[s] = d[l--] + } + else if (23 === g) { + for (c = i[r++], + s = i[r++], + u = h, + u = h; c > 0; --c) + u = u.p; + d[++l] = u, + d[++l] = s + } else + d[l] = +d[l]; + else if (g < 66) + g < 53 ? 43 === g ? (c = d[l--], + d[l] = d[l] << c) : (c = d[l--], + d[l] = d[l] | c) : 53 === g ? (c = d[l--], + (s = d[l--])[c] = d[l]) : (o = i[r++], + c = d[l--], + (s = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [c, o, h], + s._u = e, + d[++l] = s); + else if (g < 69) + if (66 === g) { + for (c = d[l--], + s = null; u = v.pop(); ) + if (2 === u[0] || 3 === u[0]) { + s = u; + break + } + if (s) + r = s[2], + s[0] = 0, + v.push(s); + else { + if (!p) + return c; + r = p[1], + f = p[2], + h = p[3], + v = p[4], + d[++l] = c, + p = p[0] + } + } else + l -= o = i[r++], + s = d.slice(l + 1, l + o + 1), + c = d[l--], + u = d[l--], + c._u === e ? (c = c._v, + p = [p, r, f, h, v], + r = c[0], + null == u && (u = function() { + return this + }()), + f = u, + (h = [s].concat(s)).length = Math.min(c[1], o) + 1, + h.p = c[2], + v = []) : (b = c.apply(u, s), + d[++l] = b); + else + g < 71 ? r += 2 + (o = (o = (i[r] << 8) + i[r + 1]) << 16 >> 16) : 71 === g ? (o = (o = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (c = d[l--]) || (r += o)) : --l + } catch (e) { + for (; (o = v.pop()) && !o[0]; ) + ; + if (!o) { + e: for (; p; ) { + for (c = p[4]; o = c.pop(); ) + if (o[0]) + break e; + p = p[0] + } + if (!p) + throw e; + r = p[1], + f = p[2], + h = p[3], + v = p[4], + p = p[0] + } + 1 === (c = o[0]) ? (r = o[2], + o[0] = 0, + v.push(o), + d[++l] = e) : 2 === c ? (r = o[2], + o[0] = 0, + v.push(o)) : (r = o[3], + o[0] = 2, + v.push(o), + d[++l] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300343c06c02c0b2c000000ce092be700000000da03011400010211020243004700ae1100010211020343001e03012b2f17000135491100010211020443001e03022b2f17000135491100010211020943001e03032b2f17000135491100010211020843001e03042b2f17000135491100010211020743001e03052b2f17000135491100010211020143001e03062b2f17000135491100010211020043001e03082b2f17000135491100010211020643001e03092b2f17000135491100010211020543001e030a2b2f170001354945000e110001030103072b2f17000135491100014205000000003b0014010a08420000", { + get 0() { + return r + }, + get 1() { + return m + }, + get 2() { + return w + }, + get 3() { + return S + }, + get 4() { + return O + }, + get 5() { + return k + }, + get 6() { + return P + }, + get 7() { + return j + }, + get 8() { + return R + }, + get 9() { + return ne + }, + get 10() { + return M + }, + set 10(e) { + M = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 38) + if (y < 18) + if (y < 7) + y < 3 ? p[++d] = y < 1 || 1 !== y && null : y < 5 ? 3 === y ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : 5 === y ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = +o[c]); + else if (y < 12) + y < 8 ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = 8 === y ? void 0 : f; + else if (y < 14) + 12 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s) : p[++d] = {}; + else if (14 === y) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (y < 25) + if (y < 21) + if (y < 19) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (19 === y) + s = p[d--], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (y < 23) + 21 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + b = p[d--], + u[s] = b) : (s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b); + else if (23 === y) { + for (s = i[r++], + u = i[r++], + b = g, + b = g; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } else + s = p[d--], + p[d] += s; + else + y < 31 ? y < 27 ? 25 === y ? (s = p[d--], + p[d] -= s) : (s = p[d--], + p[d] *= s) : 27 === y ? (s = p[d--], + p[d] /= s) : (s = p[d--], + p[d] %= s) : y < 35 ? 31 === y ? (s = p[d--], + b = ++(u = p[d--])[s], + p[++d] = b) : (s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b) : 35 === y ? (s = p[d--], + p[d] = p[d] == s) : (s = p[d--], + p[d] = p[d] === s); + else if (y < 58) + y < 50 ? y < 41 ? y < 39 ? (s = p[d--], + p[d] = p[d] !== s) : 39 === y ? (s = p[d--], + p[d] = p[d] < s) : (s = p[d--], + p[d] = p[d] <= s) : y < 43 ? 41 === y ? (s = p[d--], + p[d] = p[d] > s) : (s = p[d--], + p[d] = p[d] >= s) : 43 === y ? (s = p[d--], + p[d] = p[d] << s) : (s = p[d--], + p[d] = p[d] | s) : y < 53 ? y < 51 ? p[d] = !p[d] : 51 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : y < 55 ? 53 === y ? (s = p[d--], + (u = p[d--])[s] = p[d]) : (s = p[d--], + p[d] = p[d]in s) : 55 === y ? (s = p[d--], + p[d] = p[d]instanceof s) : p[d] = void 0; + else if (y < 66) + if (y < 61) + y < 59 ? p[d] = typeof p[d] : 59 === y ? (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u) : (c = i[r++], + s = p[d--], + (b = [u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + ]).p = g, + u._v = [s, c, b], + u._u = e, + p[++d] = u); + else if (y < 64) + 61 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c); + else { + if (64 === y) + throw s = p[d--]; + if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s) + } + else if (y < 70) + if (y < 68) + if (66 === y) { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b,u), + p[++d] = l); + else if (68 === y) { + for (c = i[r++], + b = [void 0], + l = c; l > 0; --l) + b[l] = p[d--]; + u = p[d--], + l = new (s = Function.bind.apply(u, b)), + p[++d] = l + } else + r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16); + else + y < 73 ? 70 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) && (r += c)) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === y ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300063410b54669d800000ac13a3a705700000c29070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a42021101071100024301140002110002110001364700261102014a1200061100011100020d1100030e0007000e0008000e0009000e000a43034945000a1100031100011100021611000142110001110002373247000911020207000b4401400842030014000311000311000212000c27470056110002110003131400041100041200083400010111000415000800110004150009070007110004364700070011000415000a1102014a1200061100010211010711000412000d4301110004430349170003214945ff9d08421100024700100211010511000112000511000243024911000347000d021101051100011100034302491102014a1200061100010700050d010e000a430349110001420211010811000107000e4302140002021101011100024301070002254700061100024500090211020311000243014202110101110001430107000f263400051100010225470004110001421100011102001200101314000311000308264700351100034a120011110001110002340003070012430214000402110101110004430107000f26470004110004421102020700134401400211000207000e25470006110203450003110204110001430142070014110001030011000107001435160700151100010301110001070015351607001611000103021100010700163516084205000002f73b01140001021101061100010d07000c0e000d050000031f3c000e00070d07001a0e000d05000003273c000e00070d07001b0e000d05000003313c000e00070d07001c0e000d05000003463c000e00070d07001d0e000d050000037c3c010e00070d07001e0e000d05000003af3c000e00070d07001f0e000d05000003d03c000e00070c000743024911000142021102040b11010143024911030511000103011844010b15001703000b15001803000b15001908420b12001712000c420b1200180b12001925420b1200190301180b4a12000c43001c0b12001825420b4a12001a430047000208420b12001903002547000d0b4a12000c43000301194500070b1200190301191400010b12001711000113420b4a12001b43004700080b4a12001e4300491100010b1200170b120019160b1200190301180b4a12000c43001c0b15001908420b4a12001a430047000208420b1200180301180b4a12000c43001c0b15001808420b4a12001a43004700040c0000420c00001400010b1200181400021100014a12001d0b120017110002134301491100020301180b4a12000c43001c1400021100020b1200192646ffd21100014205000004663b0014000411000012000c0300293300081100000300130826470009110000030013450002033c14000103001400021102064a12002043001400030211000443004908421103074a12002105000004793b0043014908421702021f1102012a47001d1104064a1200204300110203191400011100011102021b14030b4500070211020443004908420d1100011200220e00231100011200240e00251102084a12002043000e0026421100011200271700023502253400071100020300382547000603003845000b1100024a120028030043011400031100034700200d1100031200220e00231100031200240e00251102084a12002043000e002642084211000247005f11010d110001131400031100034a12001c43001400041100043300311100021200261100041200261911010b2834001d1100041200231100021200232533000d1100041200251100021200252547000208421100034a12001d11000243014908421100011200291400031100031102093747006911000312002a14000411000407002b2334000711000407002c23470002084207002d1400053e0004140006413d001a0211020a11000312002e4a12002f0300030f430243011400054111000547001a0d1100050e00291100020e00301102084a12002043000e002642084211020b4a12003107003205000006f23b0143024911020b4a12003107003305000007103b0143024911020b4a120031070034050000072e3b0143024911020b4a120031070035050000074c3b0143024911020b4a120031070036050000076a3b0143024911020b4a12003107003705000007883b0143024911020b4a12003107003805000007a63b0043024911020b4a12003107003905000007e93b0143024911020b4a12003107003a050000080c3b0143024911020712003b11020712003c254700141102074a12003107003d05000008623b0143024911020b4a12003107004305000009003b0043024908420211020e11000143011400020211021011020912001411000243024908420211020f11000143011400020211021011020912001411000243024908420211020e11000143011400020211021011020912001511000243024908420211020f11000143011400020211021011020912001511000243024908420211020e11000143011400020211021011020912001611000243024908420211020f11000143011400020211021011020912001611000243024908421103104a12001c43001400010d1103084a12002043000e002614000211000133000d1100021200261100011200262547000208421103104a12001d1100024301490842021102111100010301430214000211000247000d1103114a12001d110002430149084202110211110001030043021400021100024700401103114a12001c430014000311000347002e1100021200261100031200261904015e2a4700101103114a12001d11000243014945000a1103114a12001e430049084211000112003e14000211000112003f14000311000112004014000411000233000311000333000311000447006f1103124a12001c43001400050d1100020e00231100030e00251100040e00411103084a12002043000e002614000611030c4a12004243000500015f901a050000ea6018140007110005330011110006120026110005120026191100072747000208421103124a12001d11000643014908421103134a12001c43001400010d11030b12004407004525470005030145000203020e00461103084a12002043000e002614000211000133000d1100021200461100011200462547000208421103134a12001d110002430149084211020d4a12001f430014000111000112000c030025470006030103012b4211000112000c03012547000303004203001400021100014a12004705000009b93b0243014911000211000112000c0301191b031229470006030103042b4203004211030c4a12004811030c4a120049110002120023110001120023190302430211030c4a1200491100021200251100011200251903024302184301140003110102110003110002120026110001120026191b1817010235491100024211020e4a12001f430012000c030025470006030103022b420300421102104a12001f430014000111000112000c030025470006030103032b4211000112000c03062747000303004203001400021100014a1200470500000a8f3b0243014911000211000112000c0301191b06004a29470006030103052b420300421101020301110002120026110001120026191b181701023549110002420211011243000211011343002f0211011443002f4205000000003b0114000105000000783b0314000305000000c23b0214000405000000d83b0214000505000001423b0314000605000001843b0114000705000001b33b02140008050000041d3b0014000c05000004aa3b0114000e05000004ca3b0114000f050000051f3b0214001005000005863b0214001105000006043b00140114050000095a3b001400120500000a143b001400130500000a2f3b001400140500000aac3b001401150205000002333b011100093400050d170009354301490205000002653b00430014000a031014000b0211000c43004911000a040190440114010d11000a0364440114010e11000a0400c8440114010f11000a0364440114011011000a0332440114011111000a0332440114011211000a033244011401130d17000235490211000311000211000912001411010d4303490211000311000211000912001511010e4303490211000311000211000912001611010f43034911000214000d0842004b17597b787b7c7536717c75697c6b6a3934396d60697c767f087f6c777a6d707677066a60747b767508706d7c6b786d766b0b7a76776a6d6b6c7a6d766b09696b766d766d60697c0e7d7c7f70777c496b76697c6b6d60056f78756c7c0a7c776c747c6b787b757c0c7a76777f707e6c6b787b757c086e6b706d787b757c215a787777766d397a7875753978397a75786a6a39786a3978397f6c777a6d70767706757c777e6d7103727c60066a6d6b70777e06767b737c7a6d0b6d76496b7074706d706f7c047a787575077d7c7f786c756d2c59596d76496b7074706d706f7c39746c6a6d396b7c6d6c6b77397839696b7074706d706f7c396f78756c7c370454766f7c0a5a75707a724a6d786b6d085a75707a725c777d05706d7c746a057f6b76776d046b7c786b07706a5c74696d6006706a5f6c75750475786a6d04696c6a7103697669047d786d780377766e156b7c686c7c6a6d58777074786d7076775f6b78747c077a75707c776d410161077a75707c776d400160026d6a076d766c7a717c6a04706d7c74066d786b7e7c6d0877767d7c5778747c045b565d4004514d545500097077777c6b4d7c616d056a75707a7c0474767d7c10787d7d5c6f7c776d55706a6d7c777c6b0974766c6a7c74766f7c096d766c7a7174766f7c0974766c6a7c7d766e770a6d766c7a716a6d786b6d0774766c6a7c6c69086d766c7a717c777d07727c607d766e770974766c6a7c766f7c6b0874766c6a7c766c6d046a7c757f036d7669117d7c6f707a7c766b707c776d786d707677047b7c6d78057e787474780578756971780163066b78777d7674106f706a707b7075706d607a7178777e7c0f6f706a707b7075706d604a6d786d7c076f706a707b757c016f066b7c7d6c7a7c046a686b6d0369766e0329372b", { + 0: Symbol, + 1: Object, + 2: TypeError, + 3: String, + 4: Number, + 5: Array, + get 6() { + return performance + }, + get 7() { + return window + }, + 8: Date, + get 9() { + return HTMLElement + }, + 10: encodeURI, + get 11() { + return document + }, + 12: Math, + get 13() { + return L + }, + set 13(e) { + L = e + }, + get 14() { + return T + }, + set 14(e) { + T = e + }, + get 15() { + return W + }, + set 15(e) { + W = e + }, + get 16() { + return U + }, + set 16(e) { + U = e + }, + get 17() { + return N + }, + set 17(e) { + N = e + }, + get 18() { + return D + }, + set 18(e) { + D = e + }, + get 19() { + return B + }, + set 19(e) { + B = e + }, + get 20() { + return F + }, + set 20(e) { + F = e + }, + get 21() { + return H + }, + set 21(e) { + H = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 40) + if (y < 21) + if (y < 12) + y < 7 ? y < 3 ? p[++d] = null : 3 === y ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : y < 8 ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = 8 === y ? void 0 : f; + else if (y < 17) + y < 13 ? (c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s) : 13 === y ? p[++d] = {} : (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u); + else if (y < 19) + if (17 === y) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (19 === y) + s = p[d--], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (y < 30) + if (y < 24) + if (y < 22) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + b = p[d--], + u[s] = b; + else if (22 === y) + s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b; + else { + for (s = i[r++], + u = i[r++], + b = g, + b = g; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else + y < 26 ? 24 === y ? (s = p[d--], + p[d] += s) : (s = p[d--], + p[d] -= s) : 26 === y ? (s = p[d--], + p[d] *= s) : p[d] = -p[d]; + else + y < 35 ? y < 31 ? p[d] = +p[d] : 31 === y ? (s = p[d--], + b = ++(u = p[d--])[s], + p[++d] = b) : (s = p[d--], + b = --(u = p[d--])[s], + p[++d] = b) : y < 38 ? 35 === y ? (s = p[d--], + p[d] = p[d] == s) : (s = p[d--], + p[d] = p[d] === s) : 38 === y ? (s = p[d--], + p[d] = p[d] !== s) : (s = p[d--], + p[d] = p[d] < s); + else if (y < 61) + y < 54 ? y < 51 ? y < 42 ? (s = p[d--], + p[d] = p[d] <= s) : 42 === y ? (s = p[d--], + p[d] = p[d] >= s) : p[d] = !p[d] : y < 52 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : 52 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : (s = p[d--], + (u = p[d--])[s] = p[d]) : y < 57 ? y < 55 ? (s = p[d--], + p[d] = p[d]in s) : 55 === y ? (s = p[d--], + p[d] = p[d]instanceof s) : p[d] = void 0 : y < 59 ? 57 === y ? (s = p[d--], + b = delete (u = p[d--])[s], + p[++d] = b) : p[d] = typeof p[d] : 59 === y ? (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u) : (c = i[r++], + s = p[d--], + (b = [u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + ]).p = g, + u._v = [s, c, b], + u._u = e, + p[++d] = u); + else if (y < 69) + if (y < 65) + if (y < 62) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c; + else { + if (62 !== y) + throw s = p[d--]; + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c + } + else if (y < 67) + if (65 === y) + if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s); + else { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } + else if (67 === y) + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l); + else { + for (c = i[r++], + b = [void 0], + l = c; l > 0; --l) + b[l] = p[d--]; + u = p[d--], + l = new (s = Function.bind.apply(u, b)), + p[++d] = l + } + else if (y < 73) + y < 71 ? r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : 71 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + s = p[d--], + p[d] === s && (--d, + r += c)); + else if (y < 75) + 73 === y ? --d : (s = p[d], + p[++d] = s); + else if (75 === y) { + for (b in s = i[r++], + u = p[d--], + c = [], + u) + c.push(b); + g[s] = c + } else + s = i[r++], + u = p[d--], + b = p[d--], + (c = g[s].shift()) ? (b[u] = c, + p[++d] = !0) : p[++d] = !1 + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300330300994b01390000136b4f0e1781000013a9070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a4205000003cd3b0314000905000004093b0414000a050000046f3b0314000b05000004a43b0014000d05000004a63b0014000e05000004a83b0014000f05000004ac3b0114001405000004ec3b0214001505000006643b0314001605000007fe3b02140017050000097a3b0114001805000009d33b011400190500000a003b0114001a0500000a2b3b0114001b0500000aec3b0014001c0700064905000003ba3c001401020d14000111020112000514000211000212000714000311020112000834000705000003be3b031400040700011102003a234700061102004500010d14000511000512000334000307000a14000611000512000b34000307000c14000711000512000d34000307000e1400083e000e14001d05000003fe3c03140009413d000c021100090d0700124302494111000a11000115001a0d14000c0d1400100211000911001011000605000004aa3b0043034911020112001b14001111001133001502110011021100110211001b0c00004301430143011400121100123300071100121100022633000f1100034a120019110012110006430233000711001217001035491102014a120013110010430111000d0700053511000f0700053514001311000f11000e0700053549021100041100130700040d11000f0e00090300320e00104303490211000411000f0700040d11000e0e00090300320e00104303490211000911000f11000807003e430311000e07003f35490500000af83b0111000107004135490500000b323b0111000107004435490500000b803b01110001070045354902110014110015120005430149021100091100151200051100070500000b883b0043034911001511000107004635490500000b8a3b0511000107004735490211001411001343014902110009110013110008070048430349021100091100131100060500000c013b00430349021100091100130700490500000c033b004303490500000c073b0111000107004d354911001b11000107004e35490d11001a0e00040500000c933c010e003c0500000d333c000e00540500000d603c010e002b0500000ed13c020e002c0500000fc03c020e0059050000104e3c010e005a05000010a83c010e005c05000011163c030e005d11001a070005354911000142110201421100031200091100011100021608421103014a1200081100011100020d1100030e00090300320e000f0300320e00100300320e00114303491100011100021342110003110001110002354211000233000a11000212000511010d3747000611000245000311010d1400051103014a120013110005120005430114000611011a1100043400030c00004401140007021101041100060700140d0211011611000111000311000743030e0009430349110006423e00121400040d0700150e00161100040e001742413d001b0d0700180e00161100014a12001911000211000343020e0017424108420842084208420b4207001c07001507001d0c00034a12001e05000004c83b0143014908420211020911010111000105000004de3b0143034908420b4a120014110101110001430242050000050e3b04140003021101040b0700140d05000006153c020e000943034908420211020b1101011100011311010111000243031400050700151100051200162647008111000512001714000611000612000914000711000733000d07001f0211030111000743012333000f1102034a12001911000707002043024700261101024a12002111000712002043014a12002205000005c13b0105000005d63b0143024500201101024a12002111000743014a12002205000005eb3b0105000006023b014302420211000411000512001743014908420211020307001c110001110103110104430449084202110203070015110001110103110104430449084211000111010607000935490211010311010643014908420211020307001511000111010311010443044205000006423b001400031102044700121102044a12002211000311000343024500060211000343001702043542110302050000064f3b0244014202110403110201110202110001110002430449084207002314000405000006723b0242070024110104254700091104020700254401400700261101042547001507001511000125470004110002400211021c4300421100011101030700273549110002110103070017354911010312002814000311000347002602110217110003110103430214000411000447001111000411020c2547000345010e1100044207001c110103120027254700161101031200171101030700293511010315002a4500590700151101031200272547002c0700231101042547000f0700261701043549110103120017401101034a12002b11010312001743014945002007001d110103120027253300121101034a12002c07001d1101031200174302490700241401040211020b11010111010211010343031400050700181100051200162547003b11010312002d47000607002645000307002e170104354911000512001711020c254700034500420d1100051200170e000911010312002d0e002d420700151100051200162533002007002617010435490700151101030700273549110005120017110103070017354945febe084211000212002714000311000112000311000313140004081100042547007e0211000207002835490700151100032533000911000112000312001d33002b07001d1100020700273549081100020700173549021101171100011100024302490700151100021200272534002c07001d11000326330022070015110002070027354911030307002f11000318070030184401110002070017354911010c420211010b1100041100011200031100021200174303140005070015110005120016254700260700151100020700273549110005120017110002070017354902110002070028354911010c4211000512001714000611000647005e11000612002d47004f110006120009110002110001120031354911000112003211000207001c354907001d1100021200272633001307001c110002070027354908110002070017354902110002070028354911010c45000311000645002707001511000207002735491103030700334401110002070017354902110002070028354911010c420d1100010300130e003414000203011100013633000d110001030113110002070035354903021100013633001b110001030213110002070036354911000103031311000207003735490b1200384a120039110002430149084211000112003a3400010d1400020700181100020700163549110002070017394911000211000107003a354908420d07003b0e00340c00010b07003835491100014a12001e1101180b4302490b4a12003c030032430149084211000147005a1100011101061314000211000247000d1100024a12001911000143014207000111000112001c3a23470004110001420211030411000112003d43013247001b03011d1400030500000a933c0014000411000411000407001c35420d11011c0e001c421702031f11020112003d274700331103034a120019110201110203430247001e11020111020313110100070009354903013211010007002d35491101004245ffbf08110100070009354903003211010007002d3549110100420d080e00090300320e002d420700011100013a23330006110001120004140002110002323233001d11000211010e2534001307003e11000212003f34000611000212004025421103011200424700121103014a12004211000111010f430245001a11010f11000107004335490211010911000111010807003e4303491103014a12001311011343011100010700053549110001420d1100010e0020420b420300381100052533000711030517000535491101150211010a110001110002110003110004430411000544021400061101014a12004111000243014700061100064500161100064a12001c43004a1200220500000be53b0143014211000112002d4700091100011200094500091101064a12001c4300420b4207004a420211030111000143011400020c00001400031100024b051700044c054700101100034a12003911000443014945ffe81100034a12004b4300490500000c483c004211020312003d4700331102034a12004c43001400011100011102023647001a110001110100070009354903013211010007002d35491101004245ffc403003211010007002d35491101004203000b07004f354903000b07001c3549080b070029350b07002a35490301320b07002d3549020b070028354907001c0b0700273549080b07001735490b1200384a12001e1102194301491100013247004d0b4b031700024c034700420700501100024a120051030043012533000d1102034a1200190b1100024302330013021104041100024a120052030143011e430132330006080b110002354945ffb608420300320b15002d0b12003803001312003a14000107001511000112001625470007110001120017400b120053420500000e903b021400030b12002d470004110001400b1400020b12003812003d03011914000411000403002a4700ff0b1200381100041314000511000512003a14000607003b1100051200342547000a021100030700554301421100051200340b12004f284700be1102034a12001911000507003543021400071102034a120019110005070036430214000811000733000311000847003c0b12004f11000512003527470010021100031100051200350300324302420b12004f1100051200362747000d021100031100051200364301424500521100074700210b12004f110005120035274700100211000311000512003503003243024245002b110008324700091104020700564401400b12004f1100051200362747000d02110003110005120036430142170004204945fef808420700151101060700163549110101110106070017354911000111010207001c354911000233001307001c11010207002735490811010207001735491100023232420b12003812003d03011914000311000303002a47004a0b120038110003131400041100041200340b12004f2833000f1102034a120019110004070036430233000b0b12004f11000412003627470009110004140005450008170003204945ffad110005330011070057110001253400070700581100012533000a1100051200341100022833000a1100021100051200362833000502170005354911000547000911000512003a4500010d1400061100011100060700163549110002110006070017354911000547001b07001c0b07002735491100051200360b07001c354911020c45000a0b4a12005911000643014207001511000112001625470007110001120017400700571100011200162534000a0700581100011200162547000e1100011200170b07001c3545004d07001d110001120016254700251100011200170b070017350b070053354907001d0b07002735490700550b07001c3545001b070018110001120016253300031100023300081100020b07001c354911020c420b12003812003d03011914000211000203002a4700420b12003811000213140003110003120036110001254700220b4a12005911000312003a1100031200374302490211021911000343014911020c42170002204945ffb508420b12003812003d03011914000211000203002a47004d0b120038110002131400031100031200341100012547002d11000312003a140004070015110004120016254700131100041200171400050211021911000343014911000542170002204945ffaa11040207005b44014008420d0211021b11000143010e00031100020e00311100030e00320b070028354907001c0b12002725330006080b070017354911020c423e001014000a0211000311000a4301490842413d001a1100014a1100061311000743011400081100081200091400094111000812002d47000d021100021100094301494500191102054a12002111000943014a120022110004110005430249084205000011b43b00420b14000111000014000211030505000011cb3b0244014205000011fb3b0114000405000012193b011400051102014a12005e1101011101024302140003021100040843014908420211040311010311010111010211010411010507001c11000143074908420211040311010311010111010211010411010507001511000143074908421101054a12005e0b110000430242021101040211010243004a120044050000126f3c00430143011401051101054a12005e0b1100004302420211030243004a12001a05000012913c0111010002030003070c00020c000143044203014700d311000112001c11000107004f350300480019030348002e0307480082030a4800a507005548009f494500a5030011000115004f030311000115001c1106064a12005f43004211000112002a1402011100014a12002c07001d0d110201120060470005030145000203020e0060110201120061070012180e0061110201120062070012180e00621106074a12006311020112006403641a43010e0064430242030711000115004f1100014a07005c13030043011100011500651100014a12002c07001d0d4302421100014a12005443004245ff28084205000000003b0114000105000000783b00140002050000114b3b0714000305000011ac3b0114000405000012373b0014010805000012453b0014000508420066171d3f3c3f3831723538312d382f2e7d707d29242d38323b083b28333e29343233062e24303f3231083429382f3c29322f0b3e32332e292f283e29322f092d2f32293229242d380a282e387d2e292f343e290e353c2e122a330d2f322d382f29240e39383b3433380d2f322d382f2924052b3c3128380a1d1d3429382f3c29322f0d3c2e24333e1429382f3c29322f0f1d1d3c2e24333e1429382f3c29322f0b29320e292f34333a093c3a0d1d1d29320e292f34333a093c3a0a38332830382f3c3f31380c3e32333b343a282f3c3f3138082a2f34293c3f313800063e2f383c2938070234332b3236380529352f322a0429242d38033c2f3a0633322f303c31043e3c3131042a2f3c2d0e3a38290d2f32293229242d38123b0433382529062f3829282f33073b322f183c3e3506323f37383e290702023c2a3c3429072f382e32312b3804293538330e2e282e2d38333938390e293c2f29093825383e282934333a1c1a3833382f3c29322f7d342e7d3c312f383c39247d2f28333334333a093e32302d31382938390630382935323908393831383a3c293805022e383329042e3833291139342e2d3c293e3518253e382d29343233063c3f2f282d2904393233380e2e282e2d38333938390434383139210935387d3429382f3c29322f7d3932382e7d3332297d2d2f322b3439387d3c7d7a087a7d3038293532390a2f382e283129133c3038073338252911323e203429382f3c29322f7d2f382e2831297d342e7d3332297d3c337d323f37383e2906292f2411323e083e3c293e3511323e0a3b34333c31312411323e083c3b29382f11323e0a292f241833292f34382e042d282e350a3e32302d313829343233042f323229052f382e3829063138333a2935111a3833382f3c29322f1b28333e293432330b39342e2d313c24133c303804333c303813342e1a3833382f3c29322f1b28333e293432330e2e38290d2f32293229242d38123b0902022d2f322932020204303c2f36053c2a2f3c2d0d1c2e24333e1429382f3c29322f053c2e24333e091a3833382f3c29322f0829320e292f34333a1206323f37383e297d1a3833382f3c29322f00072f382b382f2e38032d322d043638242e062b3c3128382e042d2f382b0129063e353c2f1c29052e31343e38042f2b3c31042e29322d0338333926292f247d2e293c2938303833297d2a3429353228297d3e3c293e357d322f7d3b34333c313124053f2f383c36083e32332934332838083e32302d31382938063b3433342e3515343131383a3c317d3e3c293e357d3c292938302d29053e3c293e350d393831383a3c29380434383139053c2d2d31240a3a38291f3c2929382f24083e353c2f3a34333a0c3e353c2f3a34333a093430380f39342e3e353c2f3a34333a09343038052f322833390531382b383102296d", { + 0: Symbol, + 1: Object, + 2: Error, + 3: TypeError, + 4: isNaN, + 5: Promise, + get 6() { + return navigator + }, + 7: Math, + get 8() { + return q + }, + set 8(e) { + q = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var o, c, s, u, b = -1, l = [], d = null, p = [t]; + for (c = Math.min(t.length, n), + s = 0; s < c; ++s) + p.push(t[s]); + p.p = a; + for (var h = []; ; ) + try { + var v = i[r++]; + if (v < 20) + 5 === v ? (o = ((o = ((o = i[r++]) << 8) + i[r++]) << 8) + i[r++], + l[++b] = (o << 8) + i[r++]) : l[++b] = void 0; + else if (v < 59) { + for (c = i[r++], + s = i[r++], + u = p; c > 0; --c) + u = u.p; + u[s] = l[b--] + } else if (59 === v) + o = i[r++], + c = l[b--], + (s = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [c, o, p], + s._u = e, + l[++b] = s; + else { + for (c = l[b--], + s = null; u = h.pop(); ) + if (2 === u[0] || 3 === u[0]) { + s = u; + break + } + if (s) + r = s[2], + s[0] = 0, + h.push(s); + else { + if (!d) + return c; + r = d[1], + d[2], + p = d[3], + h = d[4], + l[++b] = c, + d = d[0] + } + } + } catch (e) { + for (; (o = h.pop()) && !o[0]; ) + ; + if (!o) { + e: for (; d; ) { + for (c = d[4]; o = c.pop(); ) + if (o[0]) + break e; + d = d[0] + } + if (!d) + throw e; + r = d[1], + d[2], + p = d[3], + h = d[4], + d = d[0] + } + 1 === (c = o[0]) ? (r = o[2], + o[0] = 0, + h.push(o), + l[++b] = e) : 2 === c ? (r = o[2], + o[0] = 0, + h.push(o)) : (r = o[3], + o[0] = 2, + h.push(o), + l[++b] = e) + } + }(u, [], 0, r) + }("484e4f4a403f52430028202d59c3c979000000027fe7c43a0000000e084205000000003b0014010008420000", { + get 0() { + return z + }, + set 0(e) { + z = e + } + }), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 35) + if (y < 14) + y < 5 ? y < 3 ? p[++d] = 0 === y || null : 3 === y ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : y < 8 ? 5 === y ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = 8 === y ? void 0 : {}; + else if (y < 20) + if (y < 18) + if (14 === y) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else + 18 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]) : (s = p[d--], + p[d] = p[d][s]); + else if (y < 24) + if (20 === y) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else { + for (s = i[r++], + u = i[r++], + b = g, + b = g; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else + 24 === y ? (s = p[d--], + p[d] += s) : p[d] = -p[d]; + else if (y < 62) + y < 53 ? y < 38 ? 35 === y ? (s = p[d--], + p[d] = p[d] == s) : (s = p[d--], + p[d] = p[d] === s) : 38 === y ? (s = p[d--], + p[d] = p[d] !== s) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : y < 59 ? 53 === y ? (s = p[d--], + (u = p[d--])[s] = p[d]) : p[d] = typeof p[d] : 59 === y ? (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c); + else if (y < 69) + if (y < 66) + if (62 === y) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c; + else if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s); + else if (66 === y) { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l); + else + y < 73 ? 69 === y ? r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === y ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300051f175991b419000001b9934d03a4000001d9070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a420d1400033e000814000504019442413d000b11000111000213140003411102011200051200064a120007110003430114000411000407000825470010110003002547000503014500020302421100040700092547000303034211000407000a2547000303044211000407000b2547000303054211000407000c2547001211000307000d25470005030745000203084211000407000e2547001411000312000f0300254700050309450002030a4211000407001025470003030b4211000407001125470003030c4211000407001225470003030d420211010111000343010700132547000303634203011d420d0211020311020207001443020e001411020212001507000d180e001511020212001607000d180e001611020212001707000d180e00170211020311020207001843020e00180211020311020207001943020e00194205000000003b0114000105000000783b0214010305000001633b001401040842001a170527242720296a2d202935203736656865313c35202a230823302b26312c2a2b06363c28272a29082c31203724312a370b262a2b3631373026312a370935372a312a313c352008312a1631372c2b220426242929101e2a272f20263165072a2a2920242b18111e2a272f2026316503302b26312c2a2b18121e2a272f20263165102b2120232c2b2021180f1e2a272f202631650b3028272037180f1e2a272f202631651631372c2b2218000e1e2a272f20263165043737243c180629202b22312d0f1e2a272f202631650a272f202631181a1e2a272f202631650d110809042929062a29292026312c2a2b18101e2a272f2026316516312a3724222018062a272f202631032429290c262d243724263120371620310a262a28352431082a21200c212a263028202b31082a2120062c28242220360629243c203736", { + 0: Symbol, + 1: Object, + get 2() { + return document + }, + get 3() { + return G + }, + set 3(e) { + G = e + }, + get 4() { + return V + }, + set 4(e) { + V = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 40) + if (y < 21) + if (y < 12) + y < 5 ? y < 2 ? p[++d] = !1 : 2 === y ? p[++d] = null : (c = i[r++], + p[++d] = c << 24 >> 24) : y < 8 ? 5 === y ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = 8 === y ? void 0 : f; + else if (y < 17) + y < 13 ? (c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s) : 13 === y ? p[++d] = {} : (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u); + else if (y < 19) + if (17 === y) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (19 === y) + s = p[d--], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (y < 30) + if (y < 24) + if (y < 22) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + b = p[d--], + u[s] = b; + else if (22 === y) + s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b; + else { + for (s = i[r++], + u = i[r++], + b = g, + b = g; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else + y < 27 ? 24 === y ? (s = p[d--], + p[d] += s) : (s = p[d--], + p[d] -= s) : 27 === y ? (s = p[d--], + p[d] /= s) : p[d] = -p[d]; + else + y < 35 ? y < 32 ? 30 === y ? p[d] = +p[d] : (s = p[d--], + b = ++(u = p[d--])[s], + p[++d] = b) : 32 === y ? (s = p[d--], + b = --(u = p[d--])[s], + p[++d] = b) : (s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b) : y < 38 ? 35 === y ? (s = p[d--], + p[d] = p[d] == s) : (s = p[d--], + p[d] = p[d] === s) : 38 === y ? (s = p[d--], + p[d] = p[d] !== s) : (s = p[d--], + p[d] = p[d] < s); + else if (y < 60) + y < 52 ? y < 43 ? y < 41 ? (s = p[d--], + p[d] = p[d] <= s) : 41 === y ? (s = p[d--], + p[d] = p[d] > s) : (s = p[d--], + p[d] = p[d] >= s) : y < 50 ? 43 === y ? (s = p[d--], + p[d] = p[d] << s) : (s = p[d--], + p[d] = p[d] | s) : 50 === y ? p[d] = !p[d] : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : y < 56 ? y < 54 ? 52 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : (s = p[d--], + (u = p[d--])[s] = p[d]) : 54 === y ? (s = p[d--], + p[d] = p[d]in s) : (s = p[d--], + p[d] = p[d]instanceof s) : y < 58 ? 56 === y ? p[d] = void 0 : (s = p[d--], + b = delete (u = p[d--])[s], + p[++d] = b) : 58 === y ? p[d] = typeof p[d] : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u); + else if (y < 68) + if (y < 64) + y < 61 ? (c = i[r++], + s = p[d--], + (b = [u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + ]).p = g, + u._v = [s, c, b], + u._u = e, + p[++d] = u) : 61 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c); + else if (y < 66) { + if (64 === y) + throw s = p[d--]; + if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s) + } else if (66 === y) { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l); + else if (y < 73) + if (y < 71) + if (68 === y) { + for (c = i[r++], + b = [void 0], + l = c; l > 0; --l) + b[l] = p[d--]; + u = p[d--], + l = new (s = Function.bind.apply(u, b)), + p[++d] = l + } else + r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16); + else + 71 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + s = p[d--], + p[d] === s && (--d, + r += c)); + else if (y < 75) + 73 === y ? --d : (s = p[d], + p[++d] = s); + else if (75 === y) { + for (b in s = i[r++], + u = p[d--], + c = [], + u) + c.push(b); + g[s] = c + } else + s = i[r++], + u = p[d--], + b = p[d--], + (c = g[s].shift()) ? (b[u] = c, + p[++d] = !0) : p[++d] = !1 + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f52430004293e063ad9f50000188226a3cfc9000019b9070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a4205000003cd3b0314000905000004093b0414000a050000046f3b0314000b05000004a43b0014000d05000004a63b0014000e05000004a83b0014000f05000004ac3b0114001405000004ec3b0214001505000006643b0314001605000007fe3b02140017050000097a3b0114001805000009d33b011400190500000a003b0114001a0500000a2b3b0114001b0500000aec3b0014001c0700064905000003ba3c001401020d14000111020112000514000211000212000714000311020112000834000705000003be3b031400040700011102003a234700061102004500010d14000511000512000334000307000a14000611000512000b34000307000c14000711000512000d34000307000e1400083e000e14001d05000003fe3c03140009413d000c021100090d0700124302494111000a11000115001a0d14000c0d1400100211000911001011000605000004aa3b0043034911020112001b14001111001133001502110011021100110211001b0c00004301430143011400121100123300071100121100022633000f1100034a120019110012110006430233000711001217001035491102014a120013110010430111000d0700053511000f0700053514001311000f11000e0700053549021100041100130700040d11000f0e00090300320e00104303490211000411000f0700040d11000e0e00090300320e00104303490211000911000f11000807003e430311000e07003f35490500000af83b0111000107004135490500000b323b0111000107004435490500000b803b01110001070045354902110014110015120005430149021100091100151200051100070500000b883b0043034911001511000107004635490500000b8a3b0511000107004735490211001411001343014902110009110013110008070048430349021100091100131100060500000c013b00430349021100091100130700490500000c033b004303490500000c073b0111000107004d354911001b11000107004e35490d11001a0e00040500000c933c010e003c0500000d333c000e00540500000d603c010e002b0500000ed13c020e002c0500000fc03c020e0059050000104e3c010e005a05000010a83c010e005c05000011163c030e005d11001a070005354911000142110201421100031200091100011100021608421103014a1200081100011100020d1100030e00090300320e000f0300320e00100300320e00114303491100011100021342110003110001110002354211000233000a11000212000511010d3747000611000245000311010d1400051103014a120013110005120005430114000611011a1100043400030c00004401140007021101041100060700140d0211011611000111000311000743030e0009430349110006423e00121400040d0700150e00161100040e001742413d001b0d0700180e00161100014a12001911000211000343020e0017424108420842084208420b4207001c07001507001d0c00034a12001e05000004c83b0143014908420211020911010111000105000004de3b0143034908420b4a120014110101110001430242050000050e3b04140003021101040b0700140d05000006153c020e000943034908420211020b1101011100011311010111000243031400050700151100051200162647008111000512001714000611000612000914000711000733000d07001f0211030111000743012333000f1102034a12001911000707002043024700261101024a12002111000712002043014a12002205000005c13b0105000005d63b0143024500201101024a12002111000743014a12002205000005eb3b0105000006023b014302420211000411000512001743014908420211020307001c110001110103110104430449084202110203070015110001110103110104430449084211000111010607000935490211010311010643014908420211020307001511000111010311010443044205000006423b001400031102044700121102044a12002211000311000343024500060211000343001702043542110302050000064f3b0244014202110403110201110202110001110002430449084207002314000405000006723b0242070024110104254700091104020700254401400700261101042547001507001511000125470004110002400211021c4300421100011101030700273549110002110103070017354911010312002814000311000347002602110217110003110103430214000411000447001111000411020c2547000345010e1100044207001c110103120027254700161101031200171101030700293511010315002a4500590700151101031200272547002c0700231101042547000f0700261701043549110103120017401101034a12002b11010312001743014945002007001d110103120027253300121101034a12002c07001d1101031200174302490700241401040211020b11010111010211010343031400050700181100051200162547003b11010312002d47000607002645000307002e170104354911000512001711020c254700034500420d1100051200170e000911010312002d0e002d420700151100051200162533002007002617010435490700151101030700273549110005120017110103070017354945febe084211000212002714000311000112000311000313140004081100042547007e0211000207002835490700151100032533000911000112000312001d33002b07001d1100020700273549081100020700173549021101171100011100024302490700151100021200272534002c07001d11000326330022070015110002070027354911030307002f11000318070030184401110002070017354911010c420211010b1100041100011200031100021200174303140005070015110005120016254700260700151100020700273549110005120017110002070017354902110002070028354911010c4211000512001714000611000647005e11000612002d47004f110006120009110002110001120031354911000112003211000207001c354907001d1100021200272633001307001c110002070027354908110002070017354902110002070028354911010c45000311000645002707001511000207002735491103030700334401110002070017354902110002070028354911010c420d1100010300130e003414000203011100013633000d110001030113110002070035354903021100013633001b110001030213110002070036354911000103031311000207003735490b1200384a120039110002430149084211000112003a3400010d1400020700181100020700163549110002070017394911000211000107003a354908420d07003b0e00340c00010b07003835491100014a12001e1101180b4302490b4a12003c030032430149084211000147005a1100011101061314000211000247000d1100024a12001911000143014207000111000112001c3a23470004110001420211030411000112003d43013247001b03011d1400030500000a933c0014000411000411000407001c35420d11011c0e001c421702031f11020112003d274700331103034a120019110201110203430247001e11020111020313110100070009354903013211010007002d35491101004245ffbf08110100070009354903003211010007002d3549110100420d080e00090300320e002d420700011100013a23330006110001120004140002110002323233001d11000211010e2534001307003e11000212003f34000611000212004025421103011200424700121103014a12004211000111010f430245001a11010f11000107004335490211010911000111010807003e4303491103014a12001311011343011100010700053549110001420d1100010e0020420b420300381100052533000711030517000535491101150211010a110001110002110003110004430411000544021400061101014a12004111000243014700061100064500161100064a12001c43004a1200220500000be53b0143014211000112002d4700091100011200094500091101064a12001c4300420b4207004a420211030111000143011400020c00001400031100024b051700044c054700101100034a12003911000443014945ffe81100034a12004b4300490500000c483c004211020312003d4700331102034a12004c43001400011100011102023647001a110001110100070009354903013211010007002d35491101004245ffc403003211010007002d35491101004203000b07004f354903000b07001c3549080b070029350b07002a35490301320b07002d3549020b070028354907001c0b0700273549080b07001735490b1200384a12001e1102194301491100013247004d0b4b031700024c034700420700501100024a120051030043012533000d1102034a1200190b1100024302330013021104041100024a120052030143011e430132330006080b110002354945ffb608420300320b15002d0b12003803001312003a14000107001511000112001625470007110001120017400b120053420500000e903b021400030b12002d470004110001400b1400020b12003812003d03011914000411000403002a4700ff0b1200381100041314000511000512003a14000607003b1100051200342547000a021100030700554301421100051200340b12004f284700be1102034a12001911000507003543021400071102034a120019110005070036430214000811000733000311000847003c0b12004f11000512003527470010021100031100051200350300324302420b12004f1100051200362747000d021100031100051200364301424500521100074700210b12004f110005120035274700100211000311000512003503003243024245002b110008324700091104020700564401400b12004f1100051200362747000d02110003110005120036430142170004204945fef808420700151101060700163549110101110106070017354911000111010207001c354911000233001307001c11010207002735490811010207001735491100023232420b12003812003d03011914000311000303002a47004a0b120038110003131400041100041200340b12004f2833000f1102034a120019110004070036430233000b0b12004f11000412003627470009110004140005450008170003204945ffad110005330011070057110001253400070700581100012533000a1100051200341100022833000a1100021100051200362833000502170005354911000547000911000512003a4500010d1400061100011100060700163549110002110006070017354911000547001b07001c0b07002735491100051200360b07001c354911020c45000a0b4a12005911000643014207001511000112001625470007110001120017400700571100011200162534000a0700581100011200162547000e1100011200170b07001c3545004d07001d110001120016254700251100011200170b070017350b070053354907001d0b07002735490700550b07001c3545001b070018110001120016253300031100023300081100020b07001c354911020c420b12003812003d03011914000211000203002a4700420b12003811000213140003110003120036110001254700220b4a12005911000312003a1100031200374302490211021911000343014911020c42170002204945ffb508420b12003812003d03011914000211000203002a47004d0b120038110002131400031100031200341100012547002d11000312003a140004070015110004120016254700131100041200171400050211021911000343014911000542170002204945ffaa11040207005b44014008420d0211021b11000143010e00031100020e00311100030e00320b070028354907001c0b12002725330006080b070017354911020c423e001014000a0211000311000a4301490842413d001a1100014a1100061311000743011400081100081200091400094111000812002d47000d021100021100094301494500191102054a12002111000943014a120022110004110005430249084205000011b43b00420b14000111000014000211030505000011cb3b0244014205000011fb3b0114000405000012193b011400051102014a12005e1101011101024302140003021100040843014908420211040311010311010111010211010411010507001c110001430749084202110403110103110101110102110104110105070015110001430749084211020612005f32321400021102061200603a07006126140003110206120062170001350226330007110001030038263300061100011200633232140004013400081102071200643232140005110206120062323233000411000232330004110004321400061102061200653232140007110002110003110004110005110006011100070c00071400081100084a12006605000012d33b03030043024211000247000f11000103011100032b2f17000135491100014211020732470004070084421102071200853234000a11020712008512008632470004070087420300140001030014000211000211010612003d2747002d1102071200854a12008611010611000213430147000f11000103011100022b2f1700013549170002214945ffc61100014a12004903104301420700884211010a4a12005e0b110000430242021101040211010243004a120044050000139e3c004301430114010a11010a4a12005e0b1100004302420211030243004a12001a05000013b53c01110100430242030147004711000112001c11000107004f35030048000f030148002307005548001d494500231100014a12002c07001d11060505000014033b0144014302421100014a12005443004245ffb40842110708440014000205000014303b0011000215009005000014ab3b0011000215009107009211000215009308423e000d140003021101010301430149413d00661108074a12008907008a43011400011100014a12008b07008c43011400021100023247000b02110101030143014908421100024a12008d110102030003004303490211010103021100024a12008e0300030003010301430412008f03031303002518430149410842021101010301430149084203001400013e0004140002413d00291102094a1200940700950700124302491102094a12009607009543014911000103012f1700013549413e0004140003413d002911020a4a12009407009507001243024911020a4a12009607009543014911000103022f1700013549411100014211010e4a12005e0b110000430242021101040211010243004a120044050000155d3c004301430114010e11010e4a12005e0b1100004302420211030243004a12001a050000157f3c0111010002030203090c00020c000143044203014700d711000112001c11000107004f35030048001e030248003d0306480068030948007f030c4800a407005548009e494500a411060b1200aa47000b030211000115001c4500901100014a12002c07001d0700ab430242030211000115004f11050c4a1200ac050000165d3b014301140201030611000115001c1106054a1200b91102014301421100014a12002c07001d11000112002a4a1200ba0700124301430242030911000115004f1100014a07005c13030243011100011500bb1100014a12002c07001d0700bc4302421100014a12005443004245ff24084211070b1200aa4a1200ad0d1100010e004043014a120022050000168b3b0143014a12005c05000016b93b014301421100011200ae0700af4800100700b048000e0700b148000c4945000c0700b24207008442070087420700b34208421100011200b44a1200b50700b643010300294700060700b74500030700b8421102061200bd4a120049430012003d421101104a12005e0b110000430242021101040211010243004a12004405000017203c00430143011401101101104a12005e0b1100004302420211030243004a12001a05000017373c01110100430242030147014411000112001c11000107004f35030048001903054800470309480069030e480116070055480110494501160211050543001100011500bb0211050743001100011500be0211050843001100011500bf030511000115001c0211050943004211000112002a1100011500c00211050b43001100011500c1030911000115001c0211050d43004211000112002a1100011500c20211050f43001100011500c311060c4a1200c44300070012181100011500c511060d4a1200c611060c44004a1200c74300033c1b43011d1100011500c81100014a12002c07001d0d1100011200bb0e00c91100011200be0e00ca1100011200bf0e00cb1100011200c00e00cc1100011200c10e00cd03010e00ce1100011200c20e00cf1100011200c30e00d003000e00d11100011200c50e00d21100011200c80e00d34302421100014a12005443004245feb7084205000000003b0114000105000000783b00140002050000114b3b0714000305000011ac3b0114000405000012373b0014000505000012ec3b0014000705000013623b0014000805000013663b0014000905000013743b0014000a05000014b63b0014000b05000015253b0014000d05000015333b0014000e05000016d83b0014000f05000016e83b0014010e05000016f63b0014001007006707006807006907006a07006b07006c07006d07006e07006f07007007007107007207007307007407007507007607007707007807007907007a07007b07007c07007d07007e07007f0700800700810700820700830c001d14000607009707009807003907009907009a07009b07009c07009d07009e07009f0700a00700a10700a20700a30700a40700a50700a60700a70700a80700a90c001414000c084200d4171a383b383f3675323f362a3f28297a777a2e232a3f353c083c2f34392e3335340629233738353608332e3f283b2e35280b393534292e282f392e3528092a28352e352e232a3f0a2f293f7a292e2833392e0e323b29152d340a28352a3f282e230e3e3f3c33343f0a28352a3f282e23052c3b362f3f0a1a1a332e3f283b2e35280d3b29233439132e3f283b2e35280f1a1a3b29233439132e3f283b2e35280b2e35092e2833343d0e3b3d0d1a1a2e35092e2833343d0e3b3d0a3f342f373f283b38363f0c3935343c333d2f283b38363f082d28332e3b38363f000639283f3b2e3f070533342c35313f052e3228352d042e232a3f033b283d06343528373b3604393b3636042d283b2a0e3d3f2e0a28352e352e232a3f153c04343f222e06283f2e2f2834073c35281f3b3932063538303f392e0705053b2d3b332e07283f2935362c3f042e323f340e292f292a3f343e3f3e092e3b282e093f223f392f2e33343d1c1d3f343f283b2e35287a33297a3b36283f3b3e237a282f343433343d093935372a363f2e3f3e06373f2e32353e083e3f363f3d3b2e3f0505293f342e04293f342e113e33292a3b2e39321f22393f2a2e333534063b38282f2a2e043e35343f0e292f292a3f343e3f3e03333f363e210e323f7a332e3f283b2e35287a3e353f297a34352e7a2a28352c333e3f7a3b7a7d087d7a373f2e32353e0a283f292f362e143b373f07343f222e16353920332e3f283b2e35287a283f292f362e7a33297a34352e7a3b347a3538303f392e062e282316353908393b2e39321635390a3c33343b363623163539083b3c2e3f281635390a2e28231f342e28333f29042a2f29320a3935372a363f2e333534042835352e05283f293f2e06363f343d2e32111d3f343f283b2e35281c2f34392e3335340b3e33292a363b23143b373f04343b373f1333291d3f343f283b2e35281c2f34392e3335340e293f2e0a28352e352e232a3f153c0905052a28352e35050504373b2831053b2d283b2a0d1b29233439132e3f283b2e3528053b29233439091d3f343f283b2e3528082e35092e2833343d12013538303f392e7a1d3f343f283b2e35280707283f2c3f28293f032a352a04313f2329062c3b362f3f29042a283f2c012e0639323b281b2e05293633393f04282c3b3604292e352a033f343e262e28237a292e3b2e3f373f342e7a2d332e32352f2e7a393b2e39327a35287a3c33343b3636230538283f3b31083935342e33342f3f083935372a363f2e3f063c3334332932153336363f3d3b367a393b2e39327a3b2e2e3f372a2e05393b2e39320d3e3f363f3d3b2e3f03333f363e053b2a2a362303352a280e1334292e3b36360e28333d3d3f28092f343e3f3c33343f3e0639322835373f143f3e3d3f142f282e2f2833343d0a28332c3b2e3f0c3e35392f373f342e17353e3f0f1b2a2a363f0a3b23093f292933353406283f3e2f393f116d682a227a0e283f382f39323f2e7a17090e6d682a227a0d33343d3e33343d290c6d682a227a0923363c3b3f340d6d682a227a093f3d353f7a0f130f6d682a227a193534292e3b342e333b106d682a227a093337092f34771f222e180d6d682a227a170e7a1f222e283b0a6d682a227a1d2f3633370f6d682a227a163f3f363b2d3b3e3f3f0a6d682a227a0e2f343d3b0b6d682a227a173f332823350b6d682a227a0c2833343e3b0e6d682a227a1935283e333b0f0a190e6d682a227a1b2a3b283b30332e3b0c6d682a227a132833290f0a190d6d682a227a0a3b363b2e3334350f6d682a227a1935363534343b7a170e0d6d682a227a0a363b23383336360d6d682a227a1035313f28373b340e6d682a227a0a3b283932373f342e0f6d682a227a17097a152f2e363535310e6d682a227a0e2d7a193f347a170e0b6d682a227a150a0e13171b0b6d682a227a1c2f2e2f283b0b6d682a227a1b0c1f141308116d682a227a1b28333b367a123f38283f2d0f6d682a227a093b2c35233f7a161f0e0e6d682a227a193b292e3f36363b280f6d682a227a170308131b1e7a0a0815016a053c35342e290539323f3931016b036b746f0d39283f3b2e3f1f363f373f342e06393b342c3b290a3d3f2e1935342e3f222e02683e093e283b2d13373b3d3f0c3d3f2e13373b3d3f1e3b2e3b043e3b2e3b06353436353b3e0735343f282835284e3e3b2e3b6033373b3d3f753d333c61383b293f6c6e76086a361d151e36321b0b1b181b131b1b1b1b1b1b1b0a75757523126f181b1f1b1b1b1b1b161b1b1b1b1b1b181b1b1f1b1b1b1318081b1b6d0329283907293f2e132e3f3704383e37290a283f37352c3f132e3f370b3d3f353635393b2e3335340d34352e333c33393b2e333534290437333e3306393b373f283b0a37333928352a3235343f07292a3f3b313f280b3e3f2c33393f7733343c350f383b39313d28352f343e77292334390938362f3f2e35352e32122a3f282933292e3f342e77292e35283b3d3f143b3738333f342e7736333d322e77293f342935280d3b39393f363f2835373f2e3f28093d2328352939352a3f0c373b3d343f2e35373f2e3f28093936332a38353b283e143b39393f292933383336332e23773f2c3f342e290e3936332a38353b283e77283f3b3e0f3936332a38353b283e772d28332e3f0f2a3b23373f342e77323b343e363f280b2a3f283733292933353429016c03373b2a052b2f3f282305292e3b2e3f073d283b342e3f3e063e3f34333f3e062a2835372a2e0168016f07373f29293b3d3f0733343e3f22153c3033297a34352e7a3b7a2c3b36333e7a3f342f377a2c3b362f3f7a353c7a2e232a3f7a0a3f2837332929333534143b373f016e0169033b36360430353334022e6a016d043f2c3b36022e6b022e68022e69022e6e022e6f022e6c0334352d022e6d053c36353528113d3f2e0e33373f2035343f153c3c293f2e022e620b3828352d293f280e232a3f0b30291c35342e291633292e0330292c0436353b3e05373b3d33390737293d0e232a3f03343b2a0c343b2e332c3f163f343d2e320b2a28332c3b392317353e3f092e33373f292e3b372a082e33373f2035343f", { + 0: Symbol, + 1: Object, + 2: Error, + 3: TypeError, + 4: isNaN, + 5: Promise, + get 6() { + return window + }, + get 7() { + return document + }, + get 8() { + return Image + }, + get 9() { + return localStorage + }, + get 10() { + return sessionStorage + }, + get 11() { + return navigator + }, + 12: Date, + 13: Math, + get 14() { + return J + }, + set 14(e) { + J = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 29) + if (y < 13) + y < 5 ? 2 === y ? p[++d] = null : (c = i[r++], + p[++d] = c << 24 >> 24) : y < 7 ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : 7 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = void 0; + else if (y < 18) + if (y < 14) + p[++d] = {}; + else if (14 === y) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (y < 20) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (20 === y) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else + s = p[d--], + p[d] += s; + else if (y < 66) + if (y < 61) + y < 54 ? p[d] = -p[d] : 54 === y ? (s = p[d--], + p[d] = p[d]in s) : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u); + else if (y < 62) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c; + else if (62 === y) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c; + else if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s); + else if (y < 71) + if (y < 67) { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } else + 67 === y ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l)) : r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16); + else + y < 73 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === y ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f5243001635322cd5ae68000001f663f6b2b3000002163e0007140001030242413d00111102004a1200000700014301490301424108423e0007140001030242413d00130700021102013647000503014500020302424108420d110202120003070004180e0003110202120005070004180e0005110202120006070004180e0006110202120007070004180e00070211020411020207000843020e0008110202120009070004180e00090211020411020207000a43020e000a11020212000b070004180e000b0211020411020207000c43020e000c11020212000d070004180e000d11020212000e070004180e000e11020212000f4700121102034a12001011020212000f430145000303011d0e000f110202120011070004180e0011110202120012070004180e00121102021200134700121102034a120010110202120013430145000303011d0e0013110202120014070004180e0014110202120015070004180e0015110202120016070004180e0016110202120017070004180e0017110202120018070004180e00180211020411020207001943020e00190211020411020207001a43020e001a11020212001b070004180e001b0211010143000e001c0211010243000e001d11020212001e070004180e001e11020212001f070004180e001f110202120020070004180e00200211020411020207002143020e0021110202120022070004180e00224205000000003b0014000105000000203b0014000205000000423b00140105084200230b4756414550416152414a500a704b51474c6152414a500c4b4a504b51474c57504556500b455454674b40416a454941000f455454694d4a4b56724156574d4b4a074554546a4549410a455454724156574d4b4a0946485141504b4b504c0746514d48406d600d474b4b4f4d41614a45464841400847545167484557570b47564140414a504d4548570c4041524d47416941494b565d0a404b6a4b50705645474f134c45564053455641674b4a47515656414a475d0542484b4b560848454a43514543410948454a4351454341570e49455c704b51474c744b4d4a50570c4957604b6a4b50705645474f054b574754510854484550424b56490754564b405147500a54564b405147507751461b564155514157506941404d456f415d775d575041496547474157570757504b564543410e575d5750414968454a43514543410a504b51474c6152414a500a504b51474c57504556500c5157415668454a43514543410652414a404b560952414a404b5677514607524d46564550410953414640564d524156", { + get 0() { + return document + }, + get 1() { + return window + }, + get 2() { + return navigator + }, + 3: Math, + get 4() { + return G + }, + get 5() { + return Z + }, + set 5(e) { + Z = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 39) + if (y < 14) + y < 8 ? y < 5 ? (c = i[r++], + p[++d] = c << 24 >> 24) : 5 === y ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : y < 12 ? p[++d] = void 0 : 12 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s) : p[++d] = {}; + else if (y < 20) + if (y < 17) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else if (17 === y) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (y < 23) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else if (23 === y) { + for (s = i[r++], + u = i[r++], + b = g, + b = g; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } else + s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b; + else if (y < 66) + if (y < 61) + y < 51 ? (s = p[d--], + p[d] = p[d] < s) : 51 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u); + else if (y < 62) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c; + else if (62 === y) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c; + else if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s); + else if (y < 71) + if (y < 67) { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } else + 67 === y ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l)) : r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16); + else + y < 73 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === y ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f5243002a0336c3484950000000d8f7d3bb05000000e40c00001400013e0004140006413d00ba1102001200003300091102001200001200014700a403001400021100021102001200001200012747008f1102001200004a12000211000243011400031100033300061100031200014700660300140004110004110003120001274700541100034a12000211000443011400051100054700371100014a1200030700044a12000511000312000607000743024a12000511000512000807000743024a1200051100051200094301430149170004214945ff9f170002214945ff61410d1100010e000a07000b0e000c4205000000003b001401010842000d07637f66747a7d60067f767d74677b047a67767e046366607b0006707c7d70726708757a7f767d727e76016f04676a637608606675757a6b766006637f66747a7d0123026365", { + get 0() { + return navigator + }, + get 1() { + return Y + }, + set 1(e) { + Y = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 37) + if (m < 18) + if (m < 7) + m < 3 ? p[++d] = 0 === m || null : 3 === m ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]); + else if (m < 13) + 7 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = void 0; + else if (m < 14) + p[++d] = {}; + else if (14 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (m < 28) + if (m < 20) + 18 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]) : (s = p[d--], + p[d] = p[d][s]); + else if (m < 22) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else if (22 === m) + s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b; + else { + for (s = i[r++], + u = i[r++], + b = v, + b = v; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else + m < 33 ? 28 === m ? (s = p[d--], + p[d] %= s) : p[d] = -p[d] : m < 35 ? (s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b) : 35 === m ? (s = p[d--], + p[d] = p[d] == s) : (s = p[d--], + p[d] = p[d] != s); + else if (m < 58) + m < 51 ? m < 39 ? 37 === m ? (s = p[d--], + p[d] = p[d] === s) : (s = p[d--], + p[d] = p[d] !== s) : m < 44 ? (s = p[d--], + p[d] = p[d] < s) : 44 === m ? (s = p[d--], + p[d] = p[d] >> s) : p[d] = !p[d] : m < 53 ? 51 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : m < 54 ? (s = p[d--], + (u = p[d--])[s] = p[d]) : 54 === m ? (s = p[d--], + p[d] = p[d]in s) : p[d] = void 0; + else if (m < 68) + if (m < 64) + 58 === m ? p[d] = typeof p[d] : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u); + else { + if (m < 66) + throw s = p[d--]; + if (66 === m) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l) + } + else if (m < 71) + if (68 === m) { + for (c = i[r++], + b = [void 0], + l = c; l > 0; --l) + b[l] = p[d--]; + u = p[d--], + l = new (s = Function.bind.apply(u, b)), + p[++d] = l + } else + r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16); + else + m < 73 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === m ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300033604d6dbeab10000045d18187bdf000004af070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a421102014a120006110001430114000311020112000747003d1102014a12000711000143011400041100023300141100044a12000805000000d13b014301170004354911000312000b4a12000c110003110004430249110003421103014a120009110101110001430212000a42030114000211000211000012000d2747008e02110000110002132447000a110000110002134500010d14000311000203021c4700220211010202110201110003430103003243024a12000e05000001883b01430145004011020112000f47001b1102014a1200101100011102014a12000f1100034301430245001c0211010202110201110003430143014a12000e050000019e3b01430149170002214945ff6511000142021102041101011100011101031100011343034908421103014a1200111101011100011103014a12000911010311000143024303490842021101051100024301140002110002110001364700261102014a1200111100011100020d1100030e0012000e000a000e0013000e001443034945000a11000311000111000216110001420211010611000107001543021400020211010111000243010700022547000611000245000902110202110002430142021101011100014301070016263400051100010225470004110001421100011102001200171314000311000308264700351100034a1200181100011100023400030700194302140004021101011100044301070016264700041100044211020307001a440140021100020700152547000611020245000311020411000143014202110103021101030d02110208430043020d0d11020512001b1700013502253400071100010300382547000603003845002511000112001c1700023502253400071100020300382547000603003845000611000212001d34000307001e0e001f11020512001b1700033502253400071100030300382547000603003845002511000312001c1700043502253400071100040300382547000603003845000611000412002003002c0e00214303420d11020512002203002c0e002211020512002303002c0e002311020512002403002c0e002411020512002503002c0e002511020512002603002c0e002611020512002703002c0e002711020512002803002c0e002911020512002803002c0e002811020512001b12002a03002c0e002a11020512001b12002b03002c0e002b11020512001b12002c03002c0e002d11020512001b12002e03002c0e002f11020612003047000f11020612003012003103002c45000303011d0e003111020612003047000f11020612003012003203002c45000303011d0e003211020512001b12003303002c0e003311020512001b12003403002c0e00344205000000003b0114000105000000783b0214000205000000e43b0114000305000001bf3b0314000405000002093b0114000505000002383b0214000605000002b83b0014010705000003653b0014010808420035172e0c0f0c0b0241060b021e0b1c1d4e434e1a171e0b010808081b000d1a070100061d17030c010208071a0b1c0f1a011c0b0d01001d1a1c1b0d1a011c091e1c011a011a171e0b04050b171d15090b1a2119003e1c011e0b1c1a173d17030c01021d060807021a0b1c18090b1a2119003e1c011e0b1c1a172a0b1d0d1c071e1a011c0a0b001b030b1c0f0c020b041e1b1d06050f1e1e021706020b00091a060708011c2b0f0d0619090b1a2119003e1c011e0b1c1a172a0b1d0d1c071e1a011c1d100a0b0807000b3e1c011e0b1c1a070b1d0e0a0b0807000b3e1c011e0b1c1a1705180f021b0b0c0d01000807091b1c0f0c020b08191c071a0f0c020b061d1a1c07000906010c040b0d1a0b1a013e1c0703071a07180b040d0f0202070a0b080f1b021a2c2e2e1a013e1c0703071a07180b4e031b1d1a4e1c0b1a1b1c004e0f4e1e1c0703071a07180b4e180f021b0b40061d0d1c0b0b000b011c070b001a0f1a070100041a171e0b000e011c070b001a0f0701003a171e0b050f0009020b0f011c070b001a0f0701002f0009020b0a0700000b1c39070a1a060b0700000b1c260b0709061a0a011b1a0b1c39070a1a060b011b1a0b1c260b0709061a071d0d1c0b0b0036071d0d1c0b0b00370b1e0f090b372108081d0b1a0b1e0f090b362108081d0b1a0a0f180f070239070a1a060b0f180f0702260b0709061a0519070a1a06091d07140b39070a1a0606060b0709061a0a1d07140b260b0709061a040c010a170b0d02070b001a39070a1a060c0d02070b001a260b0709061a0a0d0102011c2a0b1e1a060a1e07160b022a0b1e1a06", { + 0: Symbol, + 1: Object, + 2: String, + 3: TypeError, + 4: Number, + get 5() { + return window + }, + get 6() { + return document + }, + get 7() { + return Q + }, + set 7(e) { + Q = e + }, + get 8() { + return X + }, + set 8(e) { + X = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 38) + if (y < 14) + y < 7 ? y < 3 ? p[++d] = null : 3 === y ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : y < 8 ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = 8 === y ? void 0 : {}; + else if (y < 20) + if (y < 17) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else if (17 === y) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (y < 23) + if (20 === y) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + b = p[d--], + u[s] = b; + else if (23 === y) { + for (s = i[r++], + u = i[r++], + b = g, + b = g; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } else + s = p[d--], + p[d] = p[d] === s; + else if (y < 62) + y < 53 ? y < 50 ? (s = p[d--], + p[d] = p[d] !== s) : 50 === y ? p[d] = !p[d] : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : y < 59 ? 53 === y ? (s = p[d--], + (u = p[d--])[s] = p[d]) : p[d] = void 0 : 59 === y ? (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c); + else if (y < 67) + if (y < 65) + c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c; + else if (65 === y) + if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s); + else { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } + else + y < 71 ? 67 === y ? (d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l)) : r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : 71 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (s = p[d], + p[++d] = s) + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300010126c581d3390000020817afe814000002143e00061400080d42413d00281102004a12000007000143011400031100034a1200020700034301140002110002324700020d42410d1100024a120004430017000135022633000711000103003826330006110001120005470005030145000203020e00051100024a12000611000212000743010e00081100024a12000611000212000943010e000a1100024a12000611000212000b43010e000c1100024a12000611000212000d43010e000e1100024a12000611000212000f43010e00101100024a12000611000212001143010e00121100024a12000611000212001343010e00141100024a12000611000212001543010e00161100024a12000611000212001743010e00181100024a12000611000212001943010e001a1100024a12000611000212001b43010e001c1100024a12000611000212001d43010e001e1100024a12000611000212001f43010e00201100024a12000611000212002143010e00221100024a12000611000212002343010e00241100024a12000611000212002543010e00261400041100024a12002707002843011400051100054700291100024a1200061100051200294301140006110006030025470005030245000311000611000415002a1100024a12002707002b430114000711000747002a1100024a12000611000712002c430111000415002d1100024a12000611000712002e430111000415002f1100044205000000003b00140101084200300d16071014011030191018101b010616141b0314060a121001361a1b01100d0105021017121914121001361a1b01100d01340101071c170001100609141b011c14191c14060c12100125140714181001100709373920302a373c21260817190010371c01060a313025213d2a373c212609111005011d371c01060a322730303b2a373c212609120710101b371c01062038342d2a363a38373c3b30312a21302d212027302a3c383432302a203b3c21261c18140d361a18171c1b101121100d010007103c18141210201b1c01061938342d2a362037302a3834252a21302d212027302a263c2f301518140d3600171038140521100d01000710261c0f101c38342d2a3327343238303b212a203b3c333a27382a233036213a27261918140d3307141218101b01201b1c131a0718231016011a07061538342d2a27303b3130273720333330272a263c2f301318140d27101b111007170013131007261c0f101738342d2a21302d212027302a3c383432302a203b3c21261418140d21100d010007103c18141210201b1c01061038342d2a21302d212027302a263c2f300e18140d21100d01000710261c0f101338342d2a2334272c3c3b322a233036213a27261118140d2314070c1c1b12231016011a07061238342d2a23302721302d2a342121273c37261018140d23100701100d340101071c17061e38342d2a23302721302d2a21302d212027302a3c383432302a203b3c21261a18140d23100701100d21100d010007103c18141210201b1c01061a38342d2a23302721302d2a203b3c333a27382a233036213a27261718140d23100701100d201b1c131a0718231016011a070618263d34313c3b322a39343b32203432302a233027263c3a3b16061d14111c1b1239141b1200141210231007061c1a1b0c2621303b363c392a373c21260b0601101b161c19371c010607233027263c3a3b07031007061c1a1b0c121001300d01101b061c1a1b1e302d212a01100d010007102a131c190110072a141b1c061a01071a051c161e38342d2a21302d212027302a38342d2a343b3c263a21273a252c2a302d210d18140d341b1c061a01071a050c1922303732392a11101700122a07101b11100710072a1c1b131a17203b3834263e30312a27303b31302730272a22303732390807101b111007100715203b3834263e30312a23303b313a272a22303732390603101b111a07", { + get 0() { + return document + }, + get 1() { + return K + }, + set 1(e) { + K = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 29) + if (m < 13) + m < 5 ? 2 === m ? p[++d] = null : (c = i[r++], + p[++d] = c << 24 >> 24) : m < 7 ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : 7 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = void 0; + else if (m < 18) + if (m < 14) + p[++d] = {}; + else if (14 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (m < 20) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (20 === m) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else { + for (s = i[r++], + u = i[r++], + b = v, + b = v; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else if (m < 59) + m < 52 ? 29 === m ? p[d] = -p[d] : (s = p[d--], + p[d] = p[d] === s) : m < 53 ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : 53 === m ? (s = p[d--], + (u = p[d--])[s] = p[d]) : p[d] = void 0; + else if (m < 69) + if (m < 66) + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u; + else if (66 === m) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l); + else + m < 71 ? r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : 71 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300393226547fae09000001238cdabed00000012f0d0211020211020007000043020e00000211020211020007000143020e00011102001200024700121102014a120003110200120002430145000303011d0e00020211020211020007000443020e00040211020211020007000543020e00050211020211020007000643020e00060211020211020007000743020e00070211020211020007000843020e00081102001200091700013502253400071100010300382547000603003845000611000112000a34000307000b0e00090211020211020007000c43020e000c0211020211020007000d43020e000d0211020211020007000e43020e000e0211020211020007000f43020e000f0211020211020007001043020e00100211020211020007001143020e00110211020211020007001243020e00124205000000003b00140103084200130d2d0f18051a0934230e06090f180d2e0019091803031804393925281008091a050f093c051409003e0d180503050a0003031e08091418091e020d000525010d0b09070502080914282e0f051f3f090f191e092f0302180914180c00030f0d003f18031e0d0b090800030f0d1805030204041e090a000b00030f0d180503020e0d1e140103163e382f3c09091e2f030202090f18050302080209181f0f0d1c090b1c031f1821091f1f0d0b090e1f091f1f0503023f18031e0d0b0907180303000e0d1e1b1b090e0705183e091d19091f182d0205010d180503022a1e0d0109", { + get 0() { + return window + }, + 1: Math, + get 2() { + return G + }, + get 3() { + return $ + }, + set 3(e) { + $ = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function(e, r, t, n, a) { + var f, o, c, s, u = -1, b = [], l = null, d = [r]; + for (o = Math.min(r.length, 0), + c = 0; c < o; ++c) + d.push(r[c]); + d.p = n; + for (var p = []; ; ) + try { + if (8 === i[e++]) + b[++u] = void 0; + else { + for (o = b[u--], + c = null; s = p.pop(); ) + if (2 === s[0] || 3 === s[0]) { + c = s; + break + } + if (c) + e = c[2], + c[0] = 0, + p.push(c); + else { + if (!l) + return o; + e = l[1], + l[2], + d = l[3], + p = l[4], + b[++u] = o, + l = l[0] + } + } + } catch (r) { + for (; (f = p.pop()) && !f[0]; ) + ; + if (!f) { + e: for (; l; ) { + for (o = l[4]; f = o.pop(); ) + if (f[0]) + break e; + l = l[0] + } + if (!l) + throw r; + e = l[1], + l[2], + d = l[3], + p = l[4], + l = l[0] + } + 1 === (o = f[0]) ? (e = f[2], + f[0] = 0, + p.push(f), + b[++u] = r) : 2 === o ? (e = f[2], + f[0] = 0, + p.push(f)) : (e = f[3], + f[0] = 2, + p.push(f), + b[++u] = r) + } + }(u, [], 0, r) + }("484e4f4a403f5243003204091ee2db8c000000002e445de60000000208420000", {}), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 24) + if (m < 17) + m < 7 ? m < 4 ? (c = i[r++], + p[++d] = c << 24 >> 24) : 4 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : m < 8 ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : 8 === m ? p[++d] = void 0 : (c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s); + else if (m < 20) + if (m < 18) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else + 18 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]) : (s = p[d--], + p[d] = p[d][s]); + else if (m < 22) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else if (22 === m) + s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b; + else { + for (s = i[r++], + u = i[r++], + b = v, + b = v; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else if (m < 59) + m < 39 ? m < 28 ? (s = p[d--], + p[d] += s) : 28 === m ? (s = p[d--], + p[d] %= s) : (s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b) : m < 49 ? (s = p[d--], + p[d] = p[d] < s) : 49 === m ? (s = p[d--], + p[d] = p[d] ^ s) : (s = p[d--], + (u = p[d--])[s] = p[d]); + else if (m < 69) + if (m < 66) + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u; + else if (66 === m) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l); + else + m < 73 ? 69 === m ? r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === m ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300212c23aad3f80400000130439ce1f60000013c0c0000140003030014000407000014000603001400071100070401002747001211000711000311000716170007214945ffe403001400081100080401002747005011000411000311000813181100014a1200011100081100011200021c4301180401001c14000411000311000813140005110003110004131100031100081611000511000311000416170008214945ffa603001400090300140004030014000a11000a1100021200022747007f1100090301180401001c14000911000411000311000913180401001c140004110003110009131400051100031100041311000311000916110005110003110004161100061102004a1200031100024a12000111000a43011100031100031100091311000311000413180401001c1331430118170006354917000a214945ff741100064205000000003b0214010108420004000a6d666f7c4d616a6b4f7a06626b60697a660c687c61634d666f7c4d616a6b", { + 0: String, + get 1() { + return ee + }, + set 1(e) { + ee = e + } + }, void 0), + function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 26) + if (m < 17) + m < 5 ? m < 3 ? p[++d] = null : 3 === m ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : m < 8 ? 5 === m ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : p[++d] = 8 === m ? void 0 : {}; + else if (m < 22) + if (m < 19) + if (17 === m) { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } else + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (19 === m) + s = p[d--], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (m < 24) + if (22 === m) + s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b; + else { + for (s = i[r++], + u = i[r++], + b = v, + b = v; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } + else + 24 === m ? (s = p[d--], + p[d] += s) : (s = p[d--], + p[d] -= s); + else if (m < 53) + m < 43 ? m < 41 ? 26 === m ? (s = p[d--], + p[d] *= s) : (s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b) : 41 === m ? (s = p[d--], + p[d] = p[d] > s) : (s = p[d--], + p[d] = p[d] >= s) : m < 46 ? 43 === m ? (s = p[d--], + p[d] = p[d] << s) : (s = p[d--], + p[d] = p[d] >> s) : 46 === m ? (s = p[d--], + p[d] = p[d] & s) : (s = p[d--], + p[d] = p[d] | s); + else if (m < 69) + if (m < 66) + 53 === m ? (s = p[d--], + (u = p[d--])[s] = p[d]) : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u); + else if (66 === m) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l); + else + m < 73 ? 69 === m ? r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === m ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f52430011130c75fc413d000002408a4cb2cc000002560700001400030d1400040700011100040700021607000311000407000416070005110004070006160700071100040700081607000911000407000a161100041100021314000507000b140006030014000811000112000c1100080303182a4700b11100014a12000d1700082143010400ff2e03102b1100014a12000d1700082143010400ff2e03082b2f1100014a12000d1700082143010400ff2e2f1400071100061100054a12000e1100070500fc00002e03122c43011817000635491100061100054a12000e110007050003f0002e030c2c43011817000635491100061100054a12000e110007040fc02e03062c43011817000635491100061100054a12000e110007033f2e430118170006354945ff3f11000112000c110008190300294700b41100014a12000d1700082143010400ff2e03102b11000112000c110008294700161100014a12000d11000843010400ff2e03082b45000203002f1400071100061100054a12000e1100070500fc00002e03122c43011817000635491100061100054a12000e110007050003f0002e030c2c430118170006354911000611000112000c110008294700161100054a12000e110007040fc02e03062c43014500031100031817000635491100061100031817000635491100064203011400021102004a12000f030103062b1100022f43011400031102004a12000f1102014a1200101102014a12001143000401001a4301430114000402110202110004110001430214000511000311000418110005181400060211020311000607000443024205000000003b0214010305000001da3b0114010408420012016c411013121514171619181b1a1d1c1f1e010003020504070609080b3033323534373639383b3a3d3c3f3e212023222524272629282b616063626564676669687a7e6c02226141153a35213639650b1a22001369617e1c37272662670918600363647a0604103d1438661f1d333e2008051e01242b3c173b1b3f232829681907163230022512346c02226041153a35213639650b1a22001369617e1c37272662670918600363647c0604103d1438661f1d333e2008051e01242b3c173b1b3f232829681907163230022512346c02226340323a35216039650b1a22041369617e1c37272662670918360363647a0600103d1438661f1d333e2008051e01242b3c173b1b3f2328296819071615300225123402226240153a35213639630b3c22001369617e1c37270762670918600365647c0604103d1438291f1d263e2008051e01242b1a173b1b3f2328666819331632300225123402226500063d343f3625390a32393023123e35341025063239302310250c37233e3c12393023123e353405373d3e3e230623303f353e3c", { + 0: String, + 1: Math, + get 2() { + return ee + }, + get 3() { + return re + }, + set 3(e) { + re = e + }, + get 4() { + return te + }, + set 4(e) { + te = e + } + }, void 0), + function(e, r) { + for (var t = le, n = ae, a = e(); ; ) + try { + if (302182 === -parseInt(n(400, "tX7f")) / 1 + parseInt(t(376)) / 2 * (-parseInt(n(359, "tEoW")) / 3) + parseInt(t(428)) / 4 * (-parseInt(t(413)) / 5) + -parseInt(n(412, "Zyxv")) / 6 + parseInt(n(365, "q!tX")) / 7 + parseInt(n(368, "tTVY")) / 8 * (parseInt(n(411, "Dc*0")) / 9) + parseInt(t(352)) / 10 * (parseInt(n(401, "dCjN")) / 11)) + break; + a.push(a.shift()) + } catch (e) { + a.push(a.shift()) + } + }(oe); + var ue, be = function() { + var e = ae + , r = le; + function t() { + var e = ae; + if (function(e, r) { + if (!(e instanceof r)) + throw new TypeError(le(405)) + }(this, t), + !(this instanceof t)) + return new t; + this[e(363, "3kkD")] = new Array(8), + this[e(389, "lkcl")] = [], + this[e(432, "%AeA")] = 0, + this[e(396, "76aY")]() + } + return function(e, r, t) { + var n = ae; + r && ie(e.prototype, r), + t && ie(e, t), + Object[n(422, "N8eI")](e, "prototype", { + writable: !1 + }) + }(t, [{ + key: r(356), + value: function() { + var e = r + , t = ae; + this.reg[0] = 1937774191, + this.reg[1] = 1226093241, + this[t(379, "xRc%")][2] = 388252375, + this[e(419)][3] = 3666478592, + this[e(419)][4] = 2842636476, + this.reg[5] = 372324522, + this.reg[6] = 3817729613, + this[e(419)][7] = 2969243214, + this[e(353)] = [], + this[t(416, "m6jK")] = 0 + } + }, { + key: "write", + value: function(e) { + var t = ae + , n = r + , a = "string" == typeof e ? function(e) { + var r = le + , t = ae + , n = encodeURIComponent(e)[t(369, "UaSu")](/%([0-9A-F]{2})/g, (function(e, r) { + return String[le(381)]("0x" + r) + } + )) + , a = new Array(n[t(426, "j7Jq")]); + return Array.prototype[r(373)][r(434)](n, (function(e, t) { + var n = r; + a[t] = e[n(382)](0) + } + )), + a + }(e) : e; + this.size += a[n(406)]; + var f = 64 - this[t(374, "Dc*0")][n(406)]; + if (a[n(406)] < f) + this.chunk = this[n(353)][t(361, "!3eZ")](a); + else + for (this[n(353)] = this.chunk[n(403)](a.slice(0, f)); this.chunk.length >= 64; ) + this[t(415, "tEoW")](this[n(353)]), + f < a[n(406)] ? this[t(429, "MVtl")] = a[n(355)](f, Math.min(f + 64, a[t(417, "[al8")])) : this.chunk = [], + f += 64 + } + }, { + key: e(367, "!3eZ"), + value: function(t, n) { + var a = r + , f = e; + t && (this.reset(), + this[f(371, "xRc%")](t)), + this[f(397, "$$27")](); + for (var i = 0; i < this[a(353)][a(406)]; i += 64) + this._compress(this[f(387, "dUqJ")].slice(i, i + 64)); + var o = null; + if (n == a(404)) { + o = ""; + for (i = 0; i < 8; i++) + o += se(this[a(419)][i][a(385)](16), 8, "0") + } else + for (o = new Array(32), + i = 0; i < 8; i++) { + var c = this[f(349, "Dc*0")][i]; + o[4 * i + 3] = (255 & c) >>> 0, + c >>>= 8, + o[4 * i + 2] = (255 & c) >>> 0, + c >>>= 8, + o[4 * i + 1] = (255 & c) >>> 0, + c >>>= 8, + o[4 * i] = (255 & c) >>> 0 + } + return this.reset(), + o + } + }, { + key: e(383, "I*Tp"), + value: function(t) { + var n = e + , a = r; + if (t < 64) + console[a(360)](a(398)); + else { + for (var f = function(e) { + for (var r = new Array(132), t = 0; t < 16; t++) + r[t] = e[4 * t] << 24, + r[t] |= e[4 * t + 1] << 16, + r[t] |= e[4 * t + 2] << 8, + r[t] |= e[4 * t + 3], + r[t] >>>= 0; + for (var n = 16; n < 68; n++) { + var a = r[n - 16] ^ r[n - 9] ^ de(r[n - 3], 15); + a = a ^ de(a, 15) ^ de(a, 23), + r[n] = (a ^ de(r[n - 13], 7) ^ r[n - 6]) >>> 0 + } + for (n = 0; n < 64; n++) + r[n + 68] = (r[n] ^ r[n + 4]) >>> 0; + return r + }(t), i = this[a(419)][n(420, "MpV]")](0), o = 0; o < 64; o++) { + var c = de(i[0], 12) + i[4] + de(pe(o), o) + , s = ((c = de(c = (4294967295 & c) >>> 0, 7)) ^ de(i[0], 12)) >>> 0 + , u = he(o, i[0], i[1], i[2]); + u = (4294967295 & (u = u + i[3] + s + f[o + 68])) >>> 0; + var b = ve(o, i[4], i[5], i[6]); + b = (4294967295 & (b = b + i[7] + c + f[o])) >>> 0, + i[3] = i[2], + i[2] = de(i[1], 9), + i[1] = i[0], + i[0] = u, + i[7] = i[6], + i[6] = de(i[5], 19), + i[5] = i[4], + i[4] = (b ^ de(b, 9) ^ de(b, 17)) >>> 0 + } + for (var l = 0; l < 8; l++) + this[n(407, "$$27")][l] = (this[a(419)][l] ^ i[l]) >>> 0 + } + } + }, { + key: r(390), + value: function() { + var t = r + , n = e + , a = 8 * this.size + , f = this[n(433, "V1cZ")][t(427)](128) % 64; + for (64 - f < 8 && (f -= 64); f < 56; f++) + this.chunk[n(378, "xRc%")](0); + for (var i = 0; i < 4; i++) { + var o = Math[n(386, "%AeA")](a / 4294967296); + this[n(408, "@LWr")][n(402, "UMk5")](o >>> 8 * (3 - i) & 255) + } + for (i = 0; i < 4; i++) + this[n(433, "V1cZ")].push(a >>> 8 * (3 - i) & 255) + } + }]), + t + }(); + function le(e, r) { + var t = oe(); + return le = function(r, n) { + var a = t[r -= 349]; + if (void 0 === le.IDtnCf) { + le.QYGvow = function(e) { + for (var r, t, n = "", a = "", f = 0, i = 0; t = e.charAt(i++); ~t && (r = f % 4 ? 64 * r + t : t, + f++ % 4) ? n += String.fromCharCode(255 & r >> (-2 * f & 6)) : 0) + t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t); + for (var o = 0, c = n.length; o < c; o++) + a += "%" + ("00" + n.charCodeAt(o).toString(16)).slice(-2); + return decodeURIComponent(a) + } + , + e = arguments, + le.IDtnCf = !0 + } + var f = r + t[0] + , i = e[f]; + return i ? a = i : (a = le.QYGvow(a), + e[f] = a), + a + } + , + le(e, r) + } + function de(e, r) { + return (e << (r %= 32) | e >>> 32 - r) >>> 0 + } + function pe(e) { + var r = le; + return 0 <= e && e < 16 ? 2043430169 : 16 <= e && e < 64 ? 2055708042 : void console[ae(421, "Np2^")](r(395)) + } + function he(e, r, t, n) { + var a = le; + return 0 <= e && e < 16 ? (r ^ t ^ n) >>> 0 : 16 <= e && e < 64 ? (r & t | r & n | t & n) >>> 0 : (console.error(a(388)), + 0) + } + function ve(e, r, t, n) { + return 0 <= e && e < 16 ? (r ^ t ^ n) >>> 0 : 16 <= e && e < 64 ? (r & t | ~r & n) >>> 0 : (console.error("invalid j for bool function GG"), + 0) + } + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = null, v = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + v.push(t[u]); + v.p = a; + for (var g = []; ; ) + try { + var m = i[r++]; + if (m < 37) + if (m < 18) + if (m < 7) + m < 3 ? p[++d] = m < 1 || 1 !== m && null : m < 4 ? (c = i[r++], + p[++d] = c << 24 >> 24) : 4 === m ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]); + else if (m < 13) + m < 8 ? (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]) : 8 === m ? p[++d] = void 0 : (c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s); + else if (m < 14) + p[++d] = {}; + else if (14 === m) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else if (m < 26) + if (m < 22) + if (m < 19) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]; + else if (19 === m) + s = p[d--], + p[d] = p[d][s]; + else { + for (s = i[r++], + u = i[r++], + b = v; s > 0; --s) + b = b.p; + b[u] = p[d--] + } + else if (m < 23) + s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b; + else if (23 === m) { + for (s = i[r++], + u = i[r++], + b = v, + b = v; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } else + s = p[d--], + p[d] += s; + else + m < 29 ? m < 27 ? (s = p[d--], + p[d] *= s) : 27 === m ? (s = p[d--], + p[d] /= s) : (s = p[d--], + p[d] %= s) : m < 35 ? 29 === m ? p[d] = -p[d] : (s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b) : 35 === m ? (s = p[d--], + p[d] = p[d] == s) : (s = p[d--], + p[d] = p[d] != s); + else if (m < 53) + m < 47 ? m < 41 ? m < 38 ? (s = p[d--], + p[d] = p[d] === s) : 38 === m ? (s = p[d--], + p[d] = p[d] !== s) : (s = p[d--], + p[d] = p[d] < s) : m < 44 ? (s = p[d--], + p[d] = p[d] > s) : 44 === m ? (s = p[d--], + p[d] = p[d] >> s) : (s = p[d--], + p[d] = p[d] & s) : m < 50 ? m < 48 ? (s = p[d--], + p[d] = p[d] | s) : 48 === m ? p[d] = ~p[d] : (s = p[d--], + p[d] = p[d] ^ s) : m < 51 ? p[d] = !p[d] : 51 === m ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d); + else if (m < 66) + if (m < 58) + m < 54 ? (s = p[d--], + (u = p[d--])[s] = p[d]) : 54 === m ? (s = p[d--], + p[d] = p[d]in s) : p[d] = void 0; + else if (m < 59) + p[d] = typeof p[d]; + else { + if (59 !== m) + throw s = p[d--]; + c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, v], + u._u = e, + p[++d] = u + } + else if (m < 69) + if (m < 67) { + for (s = p[d--], + u = null; b = g.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + r = u[2], + u[0] = 0, + g.push(u); + else { + if (!h) + return s; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + p[++d] = s, + h = h[0] + } + } else if (67 === m) + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + h = [h, r, f, v, g], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (v = [u].concat(u)).length = Math.min(s[1], c) + 1, + v.p = s[2], + g = []) : (l = s.apply(b, u), + p[++d] = l); + else { + for (c = i[r++], + b = [void 0], + l = c; l > 0; --l) + b[l] = p[d--]; + u = p[d--], + l = new (s = Function.bind.apply(u, b)), + p[++d] = l + } + else + m < 73 ? 69 === m ? r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : 73 === m ? --d : (s = p[d], + p[++d] = s) + } catch (e) { + for (; (c = g.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; h; ) { + for (s = h[4]; c = s.pop(); ) + if (c[0]) + break e; + h = h[0] + } + if (!h) + throw e; + r = h[1], + f = h[2], + v = h[3], + g = h[4], + h = h[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + g.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + g.push(c)) : (r = c[3], + c[0] = 2, + g.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f5243002d043727fa02c900000bb436a408fe00000c70070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a420211010611000143013400090211010511000143013400090211010411000143013400060211010343004211020107000644014008421100013247000208421100013a0700072547000d021101071100011100024302421102021200051200084a12000911000143014a12000a030803011d430214000311000307000b2533000611000112000447000c11000112000412000c14000311000307000d2534000711000307000e2547000d1102034a12000f1100014301421100030700102534001111021107001144014a120012110003430147000d0211010711000111000243024208421102003a0700132633000c11000111020012000313022434000911000107001413022447000d1102034a12000f11000143014208421102034a120015110001430147000a021101071100014301420842110002022334000a1100021100011200162947000911000112001614000203001400031102031100024401140004110003110002274700161100011100031311000411000316170003214945ffe0110004421102024a120017110001430114000311020212001847003d1102024a12001811000143011400041100023300141100044a12001905000002573b014301170004354911000312001c4a12001d110003110004430249110003421103024a12001a110101110001430212001b4203011400021100021100001200162747008e02110000110002132447000a110000110002134500010d14000311000203021c4700220211010802110202110003430103003243024a12001e050000030e3b01430145004011020212001f47001b1102024a1200201100011102024a12001f1100034301430245001c0211010802110202110003430143014a12001e05000003243b01430149170002214945ff65110001420211020a1101011100011101031100011343034908421103024a1200211101011100011103024a12001a110103110001430243034908420211010b1100024301140002110002110001364700261102024a1200211100011100020d1100030e0022000e001b000e0023000e002443034945000a11000311000111000216110001420211010c11000107000743021400020211010111000243010700022547000611000245000902110204110002430142021101011100014301070025263400051100010225470004110001421100011102001200261314000311000308264700351100034a1200091100011100023400030700274302140004021101011100044301070025264700041100044211020107002844014002110002070007254700061102044500031102051100014301420c00001400020300140004110004110001120016274700541100014a12002a1100044301140003110003050000ff002e4700241100024a12001c11000303082c4301491100024a12001c1100030400ff2e43014945000d1100024a12001c110003430149170004214945ff9f1100024207002b1400021102024a12001711000143014a12001e05000004d23b02430149110002421100020300254700131101021101011100011318170102354945001911010207002c4a12002d11010111000113430118170102354908421100034a12002e4300140004110203030344011400051100010401001b1100050300161100010401001c1100050301161100020401001c11000503021611020412002f4a12001d0211000543021400060211020d1100061100044302420400aa14000203551400031102064a12003043000427101a1400041100040400ff2e14000511000403082c0400ff2e1400061100051100022e1100010300131100032e2f1400071100051100032e1100010300131100022e2f1400081100061100022e1100010301131100032e2f1400091100061100032e1100010301131100022e2f14000a1102044a12002f11000711000811000911000a430442021101111100010300131100010301130c00024301021101111100010302131100010303130c000243011842030b1400081102070700311333000b11020707003113070032134700411102024a12001a1102070700311307003243021700093502253400071100090300382547000603003845000611000912002401254700050303450002030c1400081102084a120033430014000a11020e440014000b11000b4a12003411000411010d18430114000c11000b4a12003411000c430114000c11000b4a12003411000511010d18430114000d11000b4a12003411000d430114000d02110110110002110003110006430314000e0211020c11000e070035430214000e11000b4a12003411000e430114000f11020912003617000735022534000711000703003825470006030038450007110007070037133400030403e81400100303032d0c0002140011032c14001211020a4a12003807003943014a12003a0500000bae3b01430114001311000a03182c0400ff2e14001411000a03102c0400ff2e14001511000a03082c0400ff2e14001611000a0400ff2e14001711000a0401001b0401001b0401001b0401001b03002c14001811000a0401001b0401001b0401001b0401001b0401001b03002c14001911000103182c0400ff2e14001a11000103102c0400ff2e14001b11000103082c0400ff2e14001c1100010400ff2e14001d1100020401001b0400ff2e14001e1100020401001c0400ff2e14001f11000203182c0400ff2e14002011000203102c0400ff2e14002111000303182c0400ff2e14002211000303102c0400ff2e14002311000303082c0400ff2e1400241100030400ff2e14002511000c03151314002611000c03161314002711000d03151314002811000d03161314002911000f03171314002a11000f03181314002b11001003182c0400ff2e14002c11001003102c0400ff2e14002d11001003082c0400ff2e14002e1100100400ff2e14002f1100081400301100100401001b0401001b0401001b0401001b03002c1400311100100401001b0401001b0401001b0401001b0401001b03002c14003211020f12003b14003311003303182c0400ff2e14003411003303102c0400ff2e14003511003303082c0400ff2e1400361100330400ff2e14003711020f12003c1400381100380400ff2e14003911003803082c0400ff2e14003a11003803102c0400ff2e14003b11003803182c0400ff2e14003c02110109021101090d0211020b430043020d0d11020912003d0e003d430314003d0211010f11003d430114003e0211010e11003e430114003f11003f1200161400401100400400ff2e14004111004003082c0400ff2e14004207002b1400430211010e11004343011400441100441200161400451100450400ff2e14004611004503082c0400ff2e1400471100121100143111001a3111001e3111002231110026311100283111002a311100153111001b3111001f3111002331110027311100293111002b311100163111001c3111002031110024311100173111001d31110021311100253111002c3111002d3111002e3111002f311100303111003131110032311100183111001931110034311100353111003631110037311100393111003a3111003b3111003c311100413111004231110046311100473114004811001211001411003411001a11001e11002211003a11002611002811003511002a11001511001b11003611003711001f11002311003911002711002911002b11001611001c11002011003c11002411001711001d11002111002511002c11002d11003b11002e11002f1100301100311100321100181100191100411100421100461100470c002c4a12002d0211010211003f43010211010211004443011100480c00014303140049021101111100114301021101121100134301180211020d1102044a12002f0379430111020412002f4a12001d02110049430243021814004a0211020c11004a07003e43024211000130304205000000003b0114000105000000783b0114000205000000a33b0014000305000000ae3b02140004050000015c3b0114000505000001913b0114000605000001ac3b0214000705000001fe3b02140008050000026a3b0114000905000003453b0314000a050000038f3b0114000b05000003be3b0214000c050000043e3b0114000e05000004ae3b0114000f05000005093b0314001005000005663b0114001105000006023b01140012050000062e3b0614011007002914000d0842003f172b090a090e0744030e071b0e19184b464b1f121b0e040d080d1e05081f0204050618120609040708021f0e190a1f04190b080405181f191e081f0419091b19041f041f121b0e808322051d0a07020f4b0a1f1f0e061b1f4b1f044b181b190e0a0f4b05040546021f0e190a09070e4b0205181f0a05080e456122054b04190f0e194b1f044b090e4b021f0e190a09070e474b050405460a19190a124b0409010e081f184b061e181f4b030a1d0e4b0a4b3038120609040745021f0e190a1f04193643424b060e1f03040f4506181f1902050c081f04381f1902050c04080a070705180702080e062409010e081f04050a060e03260a1b03380e1f040d190406092a190c1e060e051f1828354354513e02172242051f43545153175a5d1758594243545128070a061b0e0f42542a19190a124f041f0e181f091e050f0e0d02050e0f0a2b2b021f0e190a1f04190702182a19190a1206070e050c1f0304000e1218150c0e1f241c053b19041b0e191f1238120609040718060d02071f0e19180c0e1f241c053b19041b0e191f122f0e180819021b1f04190a0e051e060e190a09070e041b1e1803050a1b1b0712070d04192e0a0803190c0e1f241c053b19041b0e191f122f0e180819021b1f041918100f0e0d02050e3b19041b0e191f020e180e0f0e0d02050e3b19041b0e191f12051d0a071e0e0c0804050d020c1e190a09070e081c19021f0a09070e060409010e081f0b1f043b190206021f021d0e070f0e0d0a1e071f2c2b2b1f043b190206021f021d0e4b061e181f4b190e1f1e19054b0a4b1b190206021f021d0e4b1d0a071e0e4503081e180a08030a1928040f0e2a1f00011706080405080a1f041f1902060c0d19040628030a1928040f0e06190a050f04060804051c030e0e071303342a130305041c03181e060218580a1d0e050f0419381e09180302050005181b07021f014503060a1b061b0a0c0e220f030a020f081b070a1f0d04190602185f", { + 0: Symbol, + 1: TypeError, + 2: Object, + 3: Array, + 4: String, + 5: Number, + 6: Math, + get 7() { + return window + }, + 8: Date, + get 9() { + return navigator + }, + get 10() { + return "1.0.1.5" + }, + get 11() { + return X + }, + get 12() { + return re + }, + get 13() { + return ee + }, + get 14() { + return be + }, + get 15() { + return ge + }, + get 16() { + return ue + }, + set 16(e) { + ue = e + }, + 17: RegExp + }, void 0); + var ge, me, ye = ue; + !function(e, r, t) { + function n(e, r) { + var t = parseInt(e.slice(r, r + 2), 16); + return t >>> 7 == 0 ? [1, t] : t >>> 6 == 2 ? (t = (63 & t) << 8, + [2, t += parseInt(e.slice(r + 2, r + 4), 16)]) : (t = (63 & t) << 16, + [3, t += parseInt(e.slice(r + 2, r + 6), 16)]) + } + var a, f = 0, i = [], o = [], c = parseInt(e.slice(0, 8), 16), s = parseInt(e.slice(8, 16), 16); + if (1213091658 !== c || 1077891651 !== s) + throw new Error("mhe"); + if (0 !== parseInt(e.slice(16, 18), 16)) + throw new Error("ve"); + for (a = 0; a < 4; ++a) + f += (3 & parseInt(e.slice(24 + 2 * a, 26 + 2 * a), 16)) << 2 * a; + var u = parseInt(e.slice(32, 40), 16) + , b = 2 * parseInt(e.slice(48, 56), 16); + for (a = 56; a < b + 56; a += 2) + i.push(parseInt(e.slice(a, a + 2), 16)); + var l = b + 56 + , d = parseInt(e.slice(l, l + 4), 16); + for (l += 4, + a = 0; a < d; ++a) { + var p = n(e, l); + l += 2 * p[0]; + for (var h = "", v = 0; v < p[1]; ++v) { + var g = n(e, l); + h += String.fromCharCode(f ^ g[1]), + l += 2 * g[0] + } + o.push(h) + } + r.p = null, + function e(r, t, n, a, f) { + var c, s, u, b, l, d = -1, p = [], h = [0, null], v = null, g = [t]; + for (s = Math.min(t.length, n), + u = 0; u < s; ++u) + g.push(t[u]); + g.p = a; + for (var m = []; ; ) + try { + var y = i[r++]; + if (y < 38) + if (y < 20) + if (y < 8) + y < 3 ? p[++d] = y < 1 || 1 !== y && null : y < 5 ? 3 === y ? (c = i[r++], + p[++d] = c << 24 >> 24) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = c << 16 >> 16) : 5 === y ? (c = ((c = ((c = i[r++]) << 8) + i[r++]) << 8) + i[r++], + p[++d] = (c << 8) + i[r++]) : (c = (i[r] << 8) + i[r + 1], + r += 2, + p[++d] = o[c]); + else if (y < 14) + y < 12 ? p[++d] = 8 === y ? void 0 : f : 12 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + d = d - c + 1, + s = p.slice(d, d + c), + p[d] = s) : p[++d] = {}; + else if (y < 18) + if (14 === y) + c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + p[d][s] = u; + else { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + p[++d] = b[u] + } + else + 18 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + p[d] = p[d][s]) : (s = p[d--], + p[d] = p[d][s]); + else if (y < 29) + if (y < 23) + if (y < 21) { + for (s = i[r++], + u = i[r++], + b = g; s > 0; --s) + b = b.p; + b[u] = p[d--] + } else + 21 === y ? (c = (i[r] << 8) + i[r + 1], + r += 2, + s = o[c], + u = p[d--], + b = p[d--], + u[s] = b) : (s = p[d--], + u = p[d--], + b = p[d--], + u[s] = b); + else if (y < 25) + if (23 === y) { + for (s = i[r++], + u = i[r++], + b = g, + b = g; s > 0; --s) + b = b.p; + p[++d] = b, + p[++d] = u + } else + s = p[d--], + p[d] += s; + else + 25 === y ? (s = p[d--], + p[d] -= s) : (s = p[d--], + p[d] *= s); + else + y < 33 ? y < 31 ? p[d] = 29 === y ? -p[d] : +p[d] : 31 === y ? (s = p[d--], + b = ++(u = p[d--])[s], + p[++d] = b) : (s = p[d--], + b = --(u = p[d--])[s], + p[++d] = b) : y < 36 ? 33 === y ? (s = p[d--], + b = (u = p[d--])[s]++, + p[++d] = b) : (s = p[d--], + p[d] = p[d] == s) : 36 === y ? (s = p[d--], + p[d] = p[d] != s) : (s = p[d--], + p[d] = p[d] === s); + else if (y < 60) + y < 52 ? y < 41 ? y < 39 ? (s = p[d--], + p[d] = p[d] !== s) : 39 === y ? (s = p[d--], + p[d] = p[d] < s) : (s = p[d--], + p[d] = p[d] <= s) : y < 50 ? 41 === y ? (s = p[d--], + p[d] = p[d] > s) : (s = p[d--], + p[d] = p[d] >= s) : 50 === y ? p[d] = !p[d] : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? --d : r += c) : y < 56 ? y < 54 ? 52 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + p[d] ? r += c : --d) : (s = p[d--], + (u = p[d--])[s] = p[d]) : 54 === y ? (s = p[d--], + p[d] = p[d]in s) : (s = p[d--], + p[d] = p[d]instanceof s) : y < 58 ? 56 === y ? p[d] = void 0 : (s = p[d--], + b = delete (u = p[d--])[s], + p[++d] = b) : 58 === y ? p[d] = typeof p[d] : (c = i[r++], + s = p[d--], + (u = function e() { + var r = e._v; + console.log((0,e._u)(r[0], arguments, r[1], r[2], this)); + return (0,e._u)(r[0], arguments, r[1], r[2], this) + } + )._v = [s, c, g], + u._u = e, + p[++d] = u); + else if (y < 68) + if (y < 64) + y < 61 ? (c = i[r++], + s = p[d--], + (b = [u = function e() { + var r = e._v; + return (0, + e._u)(r[0], arguments, r[1], r[2], this) + } + ]).p = g, + u._v = [s, c, b], + u._u = e, + p[++d] = u) : 61 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1])[1] = r + c) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = m[m.length - 1]) && !s[1] ? (s[0] = 3, + s.push(r)) : m.push([1, 0, r]), + r += c); + else if (y < 66) { + if (64 === y) + throw s = p[d--]; + if (u = (s = m.pop())[0], + b = h[0], + 1 === u) + r = s[1]; + else if (0 === u) + if (0 === b) + r = s[1]; + else { + if (1 !== b) + throw h[1]; + if (!v) + return h[1]; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = h[1], + h = [0, null], + v = v[0] + } + else + r = s[2], + s[0] = 0, + m.push(s) + } else if (66 === y) { + for (s = p[d--], + u = null; b = m.pop(); ) + if (2 === b[0] || 3 === b[0]) { + u = b; + break + } + if (u) + h = [1, s], + r = u[2], + u[0] = 0, + m.push(u); + else { + if (!v) + return s; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + p[++d] = s, + h = [0, null], + v = v[0] + } + } else + d -= c = i[r++], + u = p.slice(d + 1, d + c + 1), + s = p[d--], + b = p[d--], + s._u === e ? (s = s._v, + v = [v, r, f, g, m], + r = s[0], + null == b && (b = function() { + return this + }()), + f = b, + (g = [u].concat(u)).length = Math.min(s[1], c) + 1, + g.p = s[2], + m = []) : (l = s.apply(b, u), + p[++d] = l); + else if (y < 73) + if (y < 71) + if (68 === y) { + for (c = i[r++], + b = [void 0], + l = c; l > 0; --l) + b[l] = p[d--]; + u = p[d--], + l = new (s = Function.bind.apply(u, b)), + p[++d] = l + } else + r += 2 + (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16); + else + 71 === y ? (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + (s = p[d--]) || (r += c)) : (c = (c = (i[r] << 8) + i[r + 1]) << 16 >> 16, + r += 2, + s = p[d--], + p[d] === s && (--d, + r += c)); + else if (y < 75) + 73 === y ? --d : (s = p[d], + p[++d] = s); + else if (75 === y) { + for (b in s = i[r++], + u = p[d--], + c = [], + u) + c.push(b); + g[s] = c + } else + s = i[r++], + u = p[d--], + b = p[d--], + (c = g[s].shift()) ? (b[u] = c, + p[++d] = !0) : p[++d] = !1 + } catch (e) { + for (h = [0, null]; (c = m.pop()) && !c[0]; ) + ; + if (!c) { + e: for (; v; ) { + for (s = v[4]; c = s.pop(); ) + if (c[0]) + break e; + v = v[0] + } + if (!v) + throw e; + r = v[1], + f = v[2], + g = v[3], + m = v[4], + v = v[0] + } + 1 === (s = c[0]) ? (r = c[2], + c[0] = 0, + m.push(c), + p[++d] = e) : 2 === s ? (r = c[2], + c[0] = 0, + m.push(c), + h = [3, e]) : (r = c[3], + c[0] = 2, + m.push(c), + p[++d] = e) + } + }(u, [], 0, r, t) + }("484e4f4a403f524300092d24b1e4f79100002433229b6b0b000025c3070000490700011102003a2333000b0700021102001200033a2347000a050000003d3b0145000705000000423b011701013549021101011100014301421100013a421100013300080700011103003a2333000a1100011200041103002533000a110001110300120005264700060700024500041100013a420211010611000143013400090211010511000143013400090211010411000143013400060211010343004211020107000644014008421100013247000208421100013a0700072547000d021101071100011100024302421102021200051200084a12000911000143014a12000a030803011d430214000311000307000b2533000611000112000447000c11000112000412000c14000311000307000d2534000711000307000e2547000d1102034a12000f1100014301421100030700102534001111021607001144014a120012110003430147000d0211010711000111000243024208421102003a0700132633000c11000111020012000313022434000911000107001413022447000d1102034a12000f11000143014208421102034a120015110001430147000a021101071100014301420842110002022334000a1100021100011200162947000911000112001614000203001400031102031100024401140004110003110002274700161100011100031311000411000316170003214945ffe01100044205000005533b03140009050000058f3b0414000a05000005f53b0314000b050000062a3b0014000d050000062c3b0014000e050000062e3b0014000f05000006323b0114001405000006723b0214001505000007ea3b0314001605000009843b021400170500000b003b011400180500000b593b011400190500000b863b0114001a0500000bb13b0114001b0500000c723b0014001c0700174905000005403c001401080d14000111020212000514000211000212001814000311020212001934000705000005443b031400040700011102003a234700061102004500010d14000511000512000334000307001414000611000512001b34000307001c14000711000512001d34000307001e1400083e000e14001d05000005843c03140009413d000c021100090d0700224302494111000a1100011500290d14000c0d1400100211000911001011000605000006303b0043034911020212002a14001111001133001502110011021100110211001b0c00004301430143011400121100123300071100121100022633000f1100034a120009110012110006430233000711001217001035491102024a120023110010430111000d0700053511000f0700053514001311000f11000e0700053549021100041100130700040d11000f0e001a0300320e00204303490211000411000f0700040d11000e0e001a0300320e00204303490211000911000f11000807004c430311000e07004d35490500000c7e3b0111000107004e35490500000cb83b0111000107005135490500000d063b01110001070052354902110014110015120005430149021100091100151200051100070500000d0e3b0043034911001511000107005335490500000d103b0511000107005435490211001411001343014902110009110013110008070055430349021100091100131100060500000d873b00430349021100091100130700080500000d893b004303490500000d8d3b01110001070059354911001b11000107005a35490d11001a0e00040500000e193c010e004b0500000eb93c000e005f0500000ee63c010e003a05000010573c020e003b05000011463c020e006405000011d43c010e0065050000122e3c010e0067050000129c3c030e006811001a0700053549110001421102014211000312001a1100011100021608421103024a1200191100011100020d1100030e001a0300320e001f0300320e00200300320e00214303491100011100021342110003110001110002354211000233000a11000212000511010d3747000611000245000311010d1400051103024a120023110005120005430114000611011a1100043400030c00004401140007021101041100060700240d0211011611000111000311000743030e001a430349110006423e00121400040d0700250e00261100040e002742413d001b0d0700280e00261100014a12000911000211000343020e0027424108420842084208420b4207002b07002507002c0c00034a12002d050000064e3b0143014908420211020911010111000105000006643b0143034908420b4a12002411010111000143024205000006943b04140003021101040b0700240d050000079b3c020e001a43034908420211020b1101011100011311010111000243031400050700251100051200262647008111000512002714000611000612001a14000711000733000d07002e0211030111000743012333000f1102034a12000911000707002f43024700261101024a12003011000712002f43014a12003105000007473b01050000075c3b0143024500201101024a12003011000743014a12003105000007713b0105000007883b014302420211000411000512002743014908420211020307002b110001110103110104430449084202110203070025110001110103110104430449084211000111010607001a35490211010311010643014908420211020307002511000111010311010443044205000007c83b001400031102044700121102044a1200311100031100034302450006021100034300170204354211030205000007d53b0244014202110403110201110202110001110002430449084207003214000405000007f83b0242070033110104254700091104040700344401400700351101042547001507002511000125470004110002400211021c4300421100011101030700363549110002110103070027354911010312003714000311000347002602110217110003110103430214000411000447001111000411020c2547000345010e1100044207002b11010312003625470016110103120027110103070038351101031500394500590700251101031200362547002c0700321101042547000f0700351701043549110103120027401101034a12003a11010312002743014945002007002c110103120036253300121101034a12003b07002c1101031200274302490700331401040211020b11010111010211010343031400050700281100051200262547003b11010312003c47000607003545000307003d170104354911000512002711020c254700034500420d1100051200270e001a11010312003c0e003c420700251100051200262533002007003517010435490700251101030700363549110005120027110103070027354945febe084211000212003614000311000112000311000313140004081100042547007e0211000207003735490700251100032533000911000112000312002c33002b07002c1100020700363549081100020700273549021101171100011100024302490700251100021200362534002c07002c11000326330022070025110002070036354911030107003e1100031807003f184401110002070027354911010c420211010b1100041100011200031100021200274303140005070025110005120026254700260700251100020700363549110005120027110002070027354902110002070037354911010c4211000512002714000611000647005e11000612003c47004f11000612001a110002110001120040354911000112004111000207002b354907002c1100021200362633001307002b110002070036354908110002070027354902110002070037354911010c45000311000645002707002511000207003635491103010700424401110002070027354902110002070037354911010c420d1100010300130e004314000203011100013633000d110001030113110002070044354903021100013633001b110001030213110002070045354911000103031311000207004635490b1200474a12004811000243014908421100011200493400010d14000207002811000207002635491100020700273949110002110001070049354908420d07004a0e00430c00010b07004735491100014a12002d1101180b4302490b4a12004b030032430149084211000147005a1100011101061314000211000247000d1100024a12000911000143014207000111000112002b3a23470004110001420211030511000112001643013247001b03011d1400030500000c193c0014000411000411000407002b35420d11011c0e002b421702031f110201120016274700331103034a120009110201110203430247001e1102011102031311010007001a354903013211010007003c35491101004245ffbf0811010007001a354903003211010007003c3549110100420d080e001a0300320e003c420700011100013a23330006110001120004140002110002323233001d11000211010e2534001307004c11000212004d34000611000212000c254211030212004f4700121103024a12004f11000111010f430245001a11010f11000107005035490211010911000111010807004c4303491103024a12002311011343011100010700053549110001420d1100010e002f420b420300381100052533000711030617000535491101150211010a110001110002110003110004430411000544021400061101014a12004e11000243014700061100064500161100064a12002b43004a1200310500000d6b3b0143014211000112003c47000911000112001a4500091101064a12002b4300420b42070056420211030211000143011400020c00001400031100024b051700044c054700101100034a12004811000443014945ffe81100034a1200574300490500000dce3c00421102031200164700331102034a12005843001400011100011102023647001a11000111010007001a354903013211010007003c35491101004245ffc403003211010007003c35491101004203000b07005b354903000b07002b3549080b070038350b07003935490301320b07003c3549020b070037354907002b0b0700363549080b07002735490b1200474a12002d1102194301491100013247004d0b4b031700024c0347004207005c1100024a12005d030043012533000d1102034a1200090b1100024302330013021104051100024a12000a030143011e430132330006080b110002354945ffb608420300320b15003c0b12004703001312004914000107002511000112002625470007110001120027400b12005e4205000010163b021400030b12003c470004110001400b1400020b12004712001603011914000411000403002a4700ff0b1200471100041314000511000512004914000607004a1100051200432547000a021100030700604301421100051200430b12005b284700be1102034a12000911000507004443021400071102034a120009110005070045430214000811000733000311000847003c0b12005b11000512004427470010021100031100051200440300324302420b12005b1100051200452747000d021100031100051200454301424500521100074700210b12005b110005120044274700100211000311000512004403003243024245002b110008324700091104040700614401400b12005b1100051200452747000d02110003110005120045430142170004204945fef808420700251101060700263549110101110106070027354911000111010207002b354911000233001307002b11010207003635490811010207002735491100023232420b12004712001603011914000311000303002a47004a0b120047110003131400041100041200430b12005b2833000f1102034a120009110004070045430233000b0b12005b11000412004527470009110004140005450008170003204945ffad110005330011070062110001253400070700631100012533000a1100051200431100022833000a110002110005120045283300050217000535491100054700091100051200494500010d1400061100011100060700263549110002110006070027354911000547001b07002b0b07003635491100051200450b07002b354911020c45000a0b4a12006411000643014207002511000112002625470007110001120027400700621100011200262534000a0700631100011200262547000e1100011200270b07002b3545004d07002c110001120026254700251100011200270b070027350b07005e354907002c0b07003635490700600b07002b3545001b070028110001120026253300031100023300081100020b07002b354911020c420b12004712001603011914000211000203002a4700420b12004711000213140003110003120045110001254700220b4a1200641100031200491100031200464302490211021911000343014911020c42170002204945ffb508420b12004712001603011914000211000203002a47004d0b120047110002131400031100031200431100012547002d110003120049140004070025110004120026254700131100041200271400050211021911000343014911000542170002204945ffaa11040407006644014008420d0211021b11000143010e00031100020e00401100030e00410b070037354907002b0b12003625330006080b070027354911020c423e001014000a0211000311000a4301490842413d001a1100014a11000613110007430114000811000812001a1400094111000812003c47000d021100021100094301494500191102064a12003011000943014a1200311100041100054302490842050000133a3b00420b14000111000014000211030605000013513b0244014205000013813b01140004050000139f3b011400051102014a1200691101011101024302140003021100040843014908420211040911010311010111010211010411010507002b11000143074908420211040911010311010111010211010411010507002511000143074908420d0700220e00781400013e000814000211000142413d001d1102094a12007907007a43013400030700221100011500781100014241084211020a12000512007b14000111020a12000512007c14000211020a12000512007d14000307007e14000405000014263c014211000012001603012933000811000003011308264700091100000301134500010114000211040a440014000311042b12006e47000607007f45000307008014000411042b12007747000911042b1200771400041100041102041814000511040b110005440114000611030c1200784700161100061200814a12008207008311030c12007843024911040c4a1200840d05202004220e008503010e008603080e00870211042911040c4a120084110001430143010e008811040d4a12008943000e008a110002470005030145000203000e008b43011400071100024700203e000414000b413d001411040e4a12008c11000612008d1100074302494108420011000315008e07008f05000015c93b000c000214000807009311000612008d000c00031400091100070c000114000a3e003d14000c11000312007d4a12006911000311000843024911000312007b4a12006911000311000943024911000312007c4a12006911000311000a430249413d00311102034a1200691100031100084302491102014a1200691100031100094302491102024a12006911000311000a43024941084211040c12007832321400011101034a12009007009143011400021100024700353e0004140003413d00111105094a12009207007a1100024302494111000211040c1500781100013247000a0211050f11040f43014908421102104a12007d07009405000016363b00430249084211020b324700920014020b0d0d03020e009503000e009611030d4a1200894300070022180e00970e00980d11031f4a12009943000e009a1103194a12009943000e009b1103184a12009943000e009c11031d4a12009943000e009d11031b4a12009943000e009e1103204a12009943000e009f11031c4a12009943000e00a00211032643000e00a10e00a21400010211020d1100010043024908421101104a1200690b1100004302420211010a0211010843004a12005105000017093c00430143011401101101104a1200690b1100004302420211030843004a12002905000017203c01110100430242030147015411000112002b11000107005b3503004800190302480023030b480081031248012607006048012049450126030211000115002b021106214300421100011200391100011500a30211062243001100011500a40211062443001100011500a50211062543001100011500a60211062643001100011500a70211062743001100011500a80211062843001100011500a9030b11000115002b021106234300421100011200391100011500aa0211061743001100011500ab0211061a43001100011500ac0d1100011200a30e00ad1100011200a40e00ae1100011200a50e00af1100011200a60e00b01100011200a70e00a11100011200a80e00b11100011200a90e00b21100011200aa0e00981100011200ab0e00b31100011200ac0e00b414020111062b12006c11020112009815006c11062b12006d11020112009815006d0211050d1102014301491100014a12005f43004245fea708421102114a1200894300140001050000188f3b00421103114a120089430014000111000111010119040bb82a34000411020b3247009b0014020b1100011401010d0d03020e009503000e009611030d4a1200894300070022180e00970e00980d11031f4a12009943000e009a1103194a12009943000e009b1103184a12009943000e009c11031d4a12009943000e009d11031b4a12009943000e009e1103204a12009943000e009f11031c4a12009943000e00a00211032643000e00a10e00a21400020211030f050000194d3b0043014908420211030d110102430149084211020b3a0700132633000711000111020b37421102123a07001326330007110001110212374211022b1200721400021100021200701400031100021200711400041100044a1200b505000019bf3b014301323300101100034a1200b505000019cc3b014301421100014a1200121101014301421100014a12001211010143014211022b1200751200724a1200b505000019f03b014301421100014a1200121101014301420d11020d4a12008943000301190e00b611020e1200500700b716030014000402110217430014000511022b12007512007303002647000503004500060211021a43001400061100011400071100021400081100023a070007263400161100033300101100034a1200b80700b9430103011d2447000607002214000811020e1200ba1400091100094a1200b80700bb430103002a4700171100094a1200bc1102160700bd440107002243021400091100094a1200b80700be430103002a4700171100094a1200bc1102160700bf440107002243021400090211022a11000411000511000611000711000811000943064211020a12000514000111000112007b14000211000112007c1400031100011200c01400040500001b393b0011000115007b0500001be83b001100011500c00500001c523b0111000115007c08420b0700c1394911000012001614000111030311000144011400020300140003110003110001274700161100001100031311000211000316170003214945ffe01100020301131400040211021211000443014700091100041200c245001111030b11000411031312008d44021200c2140005021102141100054301324700101101024a1200690b11000243024908420c00000b1500c10b1200c14a1200480d1101020e00c31100020e00c4430149084211000012001614000111030311000144011400020300140003110003110001274700161100001100031311000211000316170003214945ffe00b1200c147001a0b1200c14a1200480d1101040e00c31100020e00c443014908421101044a1200690b11000243024908420b1400020b1200c14700f60b1200c10300131400031100031200c414000411000403011314000502110212110005430114000611000647000611000545000e11030b11000511031312008d44021400071100071200814a1200c507008343013233000611020c1200784700161100071200814a12008207008311020c1200784302491100071200814a1200c50700c643013247002b021102161100071200814a120008430011000143021400081100071200814a1200820700c61100084302491100063247000c11000712008d1100040301160b1200c14a12002d0500001d663b01430149021102151100071200c24301470007021102114300490b0700c139491101034a1200690b1100010c000143024908421100011200c34a1200691101021100011200c443024908421102071200c73a0700012647000208421102071200c7140001020500001da93b0043001102071500c708420211020a0211020843004a1200510500001dcd3c0143014301140001050000214d3b01421100001400090211040843004a1200290500001dea3c0111010043024203014701f811000112002b11000107005b35030048001903074800f0030b48016e030e4801ca0700604801c4494501ca11020912001603012933000811020903011308264700091102090301134500010d14020302110613110201430114020402110612110201430114020511071312008d14020611020447001411070b1102011200c8110206440214020745001d11020547000911020114020745000e11070b1102011102064402140207021106141102071200c24301323400281107071200c91702023502263300071102020300382633000f1102024a1200ca1102071200c243013247000b030711000115002b4501071100014a12003b07002c021105011102011102034302430242021106151102071200c243014700070211061143004911060c1200783300101102071200814a1200c50700834301324700161102071200814a12008207008311060c1200784302491102043247000b030b11000115002b4500941100014a12003b07002c1102014a1200cb43004a1200cc43004a1200310500001fe93b014301430242021106161102071200d04a12000a030143011102031200d143021402081102071200814a1200820700c61102084302491100014a12003b07002c11020547000f02110501110207110203430245000f0211050111020712008d11020343024302421100014a12005f43004245fe0308421103011200cd1700023502253400071100020300382547000603003845000c1100024a1200ce0700cf430134000108140004021107161103071200d04a12000a030143011103031200d11700033502263300071100030300382647000611000345000311000111000443031400051103071200814a1200820700c61100054302490d1103011200d20e00d21103011200d30e00d31103011200cd0e00cd1103011200d40e00d41103011200360e00361103011200730e00731103011200d50e00d51103011200d60e00d61103011200d70e00d71400061103011200d147000c1100011100061500d145005b1103031200d1170007350226330007110007030038264700061100074500031100011103031500d11103031200363400061100061200363400030700d84a1200d943000700d82533000711000107002225470007021103031500d111081211030712008d1100064402140008021106011100081103034302421101014a1200690b110000430242050000218d3b0014000405000021ae3b0014000505000021d93b0014000601140001011400020114000305000021ed3c004211010132470018001401010211031411020f11032b12006f0403e81a430249084211010232470022001401020211031e4300490211031511021111032b1200751200740403e81a43024908421101033247000b001401030211020e430049084211042b1200764700070211020643004911042b120075120073030125470002084211042b12007512007303022547000902110204430049084211042b12007512007303002547000e021102044300490211020543004908421100014a1200da05000022563b014301421103161100014401420d0700db0e00dc1102070700dd1611022b12006c3247001111000112006c340002030011022b15006c11022b12006d3247001111000112006d340002030011022b15006d11000112006e3400010111022b15006e11000112006f340002030311022b15006f1100011200763400010011022b15007611000112007734000307002211022b1500771100011200723400030c00001400040c00001400050c00001400061102034a120015110004430147000f0211011a110004430114000545002a0211011a1100041200703400030c000043011400050211011a1100041200713400030c0000430114000611022b120072120070170002351200484a12006911000202110102110005430143024911022b120072120071170003351200484a120069110003021101021100064301430249110001120075470079110001120075120073340002030011022b12007515007311000112007512007434000304012c11022b12007515007411022b12007512007303002533000911000112007512007247002f11022b120075120072170007351200484a120069110007021101020211011a110001120075120072430143014302491102024a1200191102070700dd130700dc0d010e002143034902110119430049084205000000003b0114000105000000783b0114000205000000a33b0014000305000000ae3b02140004050000015c3b0114000505000001913b0114000605000001ac3b0214000705000001fe3b0014000805000012d13b0714000905000013323b0114000a05000016203b0014000e05000016d13b0014000f05000016df3b0014001005000019593b01140012050000196c3b01140013050000197f3b0114001405000019d93b0114001505000019fd3b031400160500001aec3b001400170500001d7e3b0014001805000022453b0114001a050000225f3b0114012c0114000b11010712006a324700100d1101080e006b11010715006a45000c11010811010712006a15006b0d03000e006c03000e006d010e006e03030e006f0d0c00000e00700c00000e00710e00720d03000e007304012c0e00740c00000e00720e0075000e00760700220e007714012b0205000013bd3b00430014000c0205000013f43b00430014000d02050000187b3b004300140011021100174300490211001843004902050000215b3b004300140019084200de1731131013141d5e19141d01140302515c51050801141e170817041f1205181e1f0602081c131e1d081805140310051e030b121e1f0205030412051e030901031e051e050801148083381f07101d181551100505141c010551051e51020103141015511f1e1f5c1805140310131d1451181f0205101f12145f7b381f511e0315140351051e511314511805140310131d145d511f1e1f5c1003031008511e131b14120502511c04020551191007145110512a22081c131e1d5f1805140310051e032c5958511c1405191e155f06020503181f1608051e220503181f160412101d1d05021d181214063e131b141205041f101c14033c1001032214050417031e1c09300316041c141f0502282f594e4b24180d38581f05594e4b490d40470d424358594e4b321d101c011415584e300303100855040514020509041f151417181f14150a31311805140310051e030718023003031008061d141f1605190a040214510205031812050e1910023e061f21031e01140305080e151417181f1421031e01140305080507101d04140d1002081f123805140310051e030f31311002081f123805140310051e030b051e220503181f162510160d3131051e220503181f162510160a141f041c140310131d140c121e1f171816040310131d14080603180510131d140006120314100514072e181f071e1a14050519031e06040508011403100316061f1e031c101d04060310010e16140521031e051e050801143e17041f1409050603140504031f07171e0334101219061e131b141205072e2e1006101805070314021e1d0714040519141f0e02040201141f151415220510030509140914120405181f161c36141f140310051e0351180251101d03141015085103041f1f181f1609121e1c011d14051415061c1405191e150815141d1416100514052e02141f050402141f05111518020110051219340912140105181e1f0610130304010504151e1f140e02040201141f1514152818141d1521251914511805140310051e0351151e1402511f1e055101031e07181514511051560856511c1405191e150a031402041d053f101c14071f1409053d1e12201805140310051e0351031402041d05511802511f1e0551101f511e131b141205060503083d1e120812100512193d1e120a17181f101d1d083d1e120810170514033d1e120a050308341f050318140204010402190a121e1c011d1405181e1f04031e1e050503140214051136141f140310051e0337041f1205181e1f0b151802011d10083f101c1413180236141f140310051e0337041f1205181e1f0e02140521031e051e050801143e17092e2e01031e051e2e2e041c10031a0510060310010d3002081f123805140310051e03051002081f120936141f140310051e03122a1e131b1412055136141f140310051e032c070314071403021403011e01041a1408020607101d0414020401031407010506121910033005040307101d0402051e0103141f15260503085102051005141c141f0551061805191e0405511210051219511e035117181f101d1d0805130314101a08121e1f05181f041408121e1c011d1405140617181f18021915181d1d1416101d51121005121951100505141c01050512100512190d15141d14161005142818141d15051001011d08122e02151a361d041427140302181e1f3c10010b13151c0227140302181e1f031018150601101614381503131e14041515030507181f121d041514071409121d041514050110051902041c1e15140515141d100805050310121a0415041c010303012405181f1f1403071614053805141c04091c0205041e01141f0402141f15101015153407141f053d180205141f14030b5e0614135e121e1c1c1e1f1f19050501024b5e5e1c0202151a5c131e145f1308051415101f12145f1f14051b19050501024b5e5e1c0202151a5f1308051415101f12145f121e1c0c021410031219211003101c0206100101141f15071c02251e1a141f09020503181f16181708051c101618120707140302181e1f0815100510250801140702050335100510031f1e060d05020137031e1c321d18141f0503041d030a02141f15331410121e1f04190314170f0618051932031415141f0518101d02041d1e101511161405231402011e1f02143914101514030a095c1c025c051e1a141f070214053805141c04213e2225100718021813181d1805081219101f1614071c0216250801140b010318071012083c1e15140905181c140205101c010306383504151005100613143c1e0714071314321d18121a0a1314321d18121a341f150a13143a1408131e1003150b06181f151e062205100514041608031e05171e1204020602120314141f081314191007181e03020541020540020543020542020545020544020547020546020549020548071310050514030808151e12041c141f05091f1007181610051e0307011d0416181f0205061413161d0606181f151e0607141f07321e1514060413321e151404021e1c1403181f1a0a07141f151e032204130207181f1514093e17131c041d0518011003055e171e031c5c1510051009040214033016141f050b1310181504131e09100101070314011d101214292d02593410020833031e06021403584e2a26062c1413321e03144c41092a105c0b415c482c0a480c550c301d18011008321d18141f05122d023219101f1f141d38152d592d155a2d5810021405231400041402053914101514030e13151c02381f071e1a143d18020508011005191f101c140417041f1204100316020319100207102e131e1604020517140512190304031d122e22151a361d04143d1e1015181f163c100113180227140318170832141f051403331d1e121a05121d1e1f1404051409050719141015140302031614050c121e1f05141f055c050801140602141003121904131e15080512101219140b12031415141f0518101d0209181f051416031805080803141518031412050803141714030314030e0314171403031403211e1d181208033634250b051e240101140332100214031c10010441294340032e3009081e1f061914141d09", { + 0: Symbol, + 1: TypeError, + 2: Object, + 3: Array, + 4: Error, + 5: isNaN, + 6: Promise, + get 7() { + return window + }, + get 8() { + return "1.0.1.5" + }, + get 9() { + return localStorage + }, + get 10() { + return XMLHttpRequest + }, + get 11() { + return "undefined" != typeof URL ? URL : void 0 + }, + 12: JSON, + 13: Date, + get 14() { + return navigator + }, + get 15() { + return requestAnimationFrame + }, + get 16() { + return document + }, + get 17() { + return performance + }, + get 18() { + return "undefined" != typeof Request ? Request : void 0 + }, + get 19() { + return location + }, + get 20() { + return setTimeout + }, + get 21() { + return setInterval + }, + 22: RegExp, + get 23() { + return M + }, + get 24() { + return W + }, + get 25() { + return T + }, + get 26() { + return H + }, + get 27() { + return B + }, + get 28() { + return N + }, + get 29() { + return U + }, + get 30() { + return F + }, + get 31() { + return L + }, + get 32() { + return D + }, + get 33() { + return q + }, + get 34() { + return V + }, + get 35() { + return J + }, + get 36() { + return Z + }, + get 37() { + return Y + }, + get 38() { + return Q + }, + get 39() { + return K + }, + get 40() { + return $ + }, + get 41() { + return te + }, + get 42() { + return ye + }, + get 43() { + return ge + }, + set 43(e) { + ge = e + }, + get 44() { + return me + }, + set 44(e) { + me = e + } + }, void 0) + }(), + window.bdms = n +}(); +// 保存原始的 Function.prototype.apply 方法 +function get_bogus(u){ + x=[0,1,0,u,'','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36'] + // window.bdms.init._v[2].p[42].apply(null, x) + // const a_bogus = window.bdms.init._v[18].p[42].apply("", s) + // console.log(window.bdms.init._v[2][18]._v[2].p[42]) + // console.log(window.bdms.init._v[2].p[42].apply("", x)) + // const a_bogus = window.bdms.init.apply("", s) + // console.log(window.bdms.init._v[2][18].apply('',x)) + console.log('获取a_bogus 参数:',u) + return encodeURIComponent(window.bdms.init._v[2][18]._v[2].p[42].apply("", x)) + +} + + +console.log(get_bogus("device_platform=webapp&aid=1128&channel=channel_pc_web&publish_video_strategy_type=2&app_id=1128&recent_sticker_type=2&update_version_code=170400&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=123.0.0.0&browser_online=true&engine_name=Blink&engine_version=123.0.0.0&os_name=Windows&os_version=10&cpu_core_num=12&device_memory=8&platform=PC&downlink=1.45&effective_type=3g&round_trip_time=1050&webid=7322772382790469129&msToken=TQ4dqpfnEL5frCJ4Z9J2MdCbECUj5jncZb0dOyqn0hw7yKaDMM_9EzE-KIlOIcnOHjaYWv14TfTDwaklQApht8VN8FYH0Li7WsbdxJ5ClTydC7NbG6K2gIkdgYZg")) + +// // 导出函数以便在外部调用 +// exports.get_bogus = get_bogus; \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/ChangeLog b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/ChangeLog new file mode 100644 index 0000000..a15f835 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/ChangeLog @@ -0,0 +1,401 @@ +Please see also http://phantomjs.org/releases.html. + +2016-01-23: Version 2.1.0 + + New features + + * Upgraded Qt to 5.5.1 (issue #13377) + * Added support for SSL Client Authentication (issue #11275) + * Added support for context menu event (issue #11429) + * Allow remote debugging to use random port assigned by the OS (issue #13432) + + Improvements + + * Allow outer context to access arbitrary URLs (issue #11217) + * Fixed --local-storage-path and localStoragePath config option (issue #11596) + * Restored --local-url-access=no regression (issue #13412) + * Fixed an issue with loading JS modules contains a last-line comment (issue #12868) + * Fixed an issue with returning binary content in WebServer module (issue #13026) + * Fixed encoded URL loading on Windows (issue #12953) + * Fixed building with GCC 5 (issue #13518) + * Fixed file upload (issue #12506) + * Fixed latest OS detection (issue #13829) + +2015-01-23: Version 2.0.0 + + New features + + * Switched to Qt 5 and updated WebKit (issue 10448) + * Implemented clearing of memory cache (issue 10357) + * Added support for HTTP header change for every request (issue 11299) + + Improvements + + * Fixed rendering of CJK text by always linking the codecs (issue 10249) + * Ensured onResourceReceived is still fired on an error (issue 11163) + * Fixed possible crash in handling network requests (issue 11252) + * Removed hardcoded GhostDriver launching message (issue 12681) + * Allowed disk cache more than 2 GB (issue 12303) + + Examples + + * Netsniff example should exit when fails to load (issue 11333) + +2014-01-25: Version 1.9.7 + + * Reverted to GhostDriver 1.1.0 instead of 1.1.1 (issue 11915) + * Fixed another warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2014-01-20: Version 1.9.6 + + * Updated GhostDriver to version 1.1.1 (issue 11877, 11893) + +2014-01-19: Version 1.9.3 + + * Fixed CoreText performance note on OS X 10.9 (issue 11418) + * Fixed warning of obsolete userSpaceScaleFactor on OS X 10.9 (issue 11612) + +2013-09-06: Version 1.9.2 + + * Fixed graphical artifacts with transparent background on Windows (issue 11276, 11007, 11366) + * Updated GhostDriver to version 1.0.4 (issue 11452) + +2013-06-04: Version 1.9.1 + + Critical bug fixes: + + * Fixed problems with specifying proxy server (issue 10811, 11117) + * Fixed UTF-8 encoding with system.stdout and system.stderr (issue 11162) + * Ensured that onResourceReceived will be always invoked (issue 11163) + * Fixed module loading from an absolute path on Windows (issue 11165) + * Fixed typo in the command-line option for setting the cache size (11219) + * Fixed possible crash when handling network requests (issue 11252, 11338) + +2013-03-20: Version 1.9.0 "Sakura" + + New features + + * Added spawn and execFile to execute external programs (issue 10219) + * Added the ability to abort network requests (issue 10230) + * Added system access to stdin, stdout, and stderr (issue 10333) + * Added support for custom CA certificates location (issue 10916) + * Added seek function to the File stream (issue 10937) + * Implemented file read for a specified number of bytes (issue 10938) + * Added a callback to handle network error (issue 10954, 10997) + * Added custom encoding support when opening a page (issue 11043) + * Implemented require.stub() support for a factory function (issue 11044) + * Added page loading indicator and progress (issue 11091) + * Added a timeout option for network requests (issue 11129) + + Improvements + + * Fixed the build on FreeBSD (issue 10597) + * Ensured a consistent 72 dpi for Linux headless rendering (issue 10659) + * Fixed possible PDF error due to invalid CreationDate field (issue 10663) + * Fixed crash when uploading non existing files (issue 10941) + * Improved the autocomplete internal of the interactive/REPL mode (issue 10943) + * Fixed possible crash when accessing inline frames (issue 10947) + * Changed Linux binary package setup to be built on CentOS 5 (issue 10963) + * Extended SSL ignore setting to synchronous XHR (issue 10985) + * Added convenient constants for modifier keys (issue 11056) + * Fixed incorrect date handling in the cookies (issue 11068) + * Updated GhostDriver to version 1.0.3 (issue 11146) + + Examples + + * Fixed invalid data URI in the netsniff example (issue 10740) + * Implemented a new weather example (issue 10794) + * Fixed rendering issues in render_multi_url (issue 11021) + * Fixed proper event sequence in page_events example (issue 11028) + * Miscellanous tweaks (issue 11082) + +2013-03-02: Version 1.8.2 + + Critical bug fixes: + + * Fixed possible PDF error due to invalid CreationDate field (issue 663) + * Fixed crash when uploading non existing files (issue 941) + * Fixed possible crash when accessing inline frames (issue 947) + * Extended SSL ignore setting to synchronous XHR (issue 985) + * Fixed incorrect date handling in the cookies (issue 1068) + +2013-01-06: Version 1.8.1 + + Critical bug fix: + + * Mac OS X: Fix possible crash when using some TrueType fonts (issue 690) + +2012-12-21: Version 1.8.0 "Blue Winter Rose" + + New features + + * Integrated GhostDriver as the WebDriver implementation (issue 49) + * Added an option to specify the SSL protocol (issue 174) + * Added encoding support for WebServer's response (issue 505) + * Added process ID (PID) to the System module (issue 769) + * Added properties to obtain page and frame title (issue 799) + * Added page navigation methods (issue 808) + * Added support for modifier keys in keyboard events (issue 835) + * Added onFilePicker callback for more generic file upload API (issue 843) + * Added the ability to set the page content and location (issue 909) + + Improvements + + * Fixed date parsing in ISO8601 format (issue 187, 267) + * Fixed window.location (issue 530, 632) + * Deregistered multiple callback handler (issue 807) + * Fixed sending of double-click events (issue 848) + * Increases maximum number of redirects (issue 849) + * Fixed keycodes sent for lowercase characters (issue 852) + * Fixed a regression in table row page break (issue 880) + * Completed the CoffeeScript version of the examples (issue 907) + * Updated Qt to version 4.8.4 (issue 918) + * Fixed potential hang in some example scripts (issue 922) + +2012-09-22: Version 1.7.0 "Blazing Star" + + New features + + * Added a module system modelled after CommonJS/Node.js (issue 47) + * Added support for window pop-up (issue 151) + * Static build on Linux (issue 413) + * Added run-time detection of SSL support (issue 484) + * Added more events support (issue 492, 712) + * Added support for disabling automatic proxy detection (issue 580) + * Provided page closing callback (issue 678) + * Added methods to access URL, frames URL, frame Content (issue 758) + * Added more cookies-related API (issue 761) + + Improvements + + * Refactored command-line options handling (issue 55) + * Improved the workflow for producing release builds (issue 599) + * Improved cookies API and implementation (issue 603, 761) + * Improved frame switching API (issue 654) + * Fixed iframe handling regression (issue 683) + * Fixed OS version number with Windows 8 and Mountain Lion (issue 684, 688) + * Fixed HAR navigation info in the netsniff example (issue 733) + * Fixed compile warnings with Visual Studio (issue 744) + * Removed hacks for static linking on Windows (issue 753) + * Added ICO image handling on Windows (issue 779) + * Fixed font antialiasing on Windows (issue 785) + * Improved Jasmine test runner for Jasmine 1.2 (issue 792) + +2012-07-22: Version 1.6.1 + + Bug fixes + + * Don't build the deploy in debug mode (issue 599) + * Fixed building on Windows (issue 424) + * Fixed remote inspector when building statically (issue 430) + +2012-06-20: Version 1.6.0 "Lavender" + + New features + + * Added support for passing arguments to WebPage's evaluate (issue 132) + * Added callbacks for JavaScript onConfirm and onPrompt (issue 133) + * Added stack trace when error occurs (issue 166) + * Added support for local storage path and quota (issue 300) + * Added initial support for cookies handling (issue 354) + * Added support for header footer when printing the page (issue 410, 512) + * Added headers support in the loading request (issue 452) + * Added support to render the web page as base64-encoded string (issue 547) + * Added hooks for navigation event (issue 562) + * Added command-line option to show debug messages (issue 575) + * Added support for the zoom factor for web page rendering (issue 579) + * Added crash reporter for Mac OS X and Linux, based on Google Breakpad (issue 576) + * Added 'os' object to the system module (issue 585) + * Added support for asynchronous evaluation (issue 593) + + Improvements + + * Fixed remote debugging to work on Mac OS X and Windows (issue 430) + * Fixed web server getting the dropped connection for empty response (issue 451) + * Fixed text rendered as boxes (squares) on headless Linux (issue 460) + * Updated Qt to version 4.8.2 (issue 495) + * Updated CoffeeScript compiler to version 1.3.3 (issue 496) + * Fixed the build script to detect and use MAKEFLAGS (issue 503) + * Fixed the build script to properly pass Qt config flags (issue 507) + * Changed Info.plist to be embedded in Mac OS X executable (issue 528) + * Fixed wrong module require in the imagebin example (issue 536) + * Fixed example scripts to exit with the right exit code (issue 544) + * Fixed build failure with glib 2.31.0+ (issue 559) + * Fixed error handler failures in some cases (issue 589) + * Fixed Twitter-related examples to work with the new site (issue 609) + +2012-03-20: Version 1.5.0 "Ghost Flower" + + New features + + * Added interactive mode, also known as REPL (issue 252) + * Added setting for web security, to allow cross domain XHR (issue 28) + * Added error handler for WebPage object (issue 166) + * Added support for custom HTTP header in the network request (issue 77) + * Added support for read write encoding in the file system module (issue 367) + * Added remote debugging support on Linux (issue 6) + * Added support for proxy authentication (issue 105) + * Added System module, to retrieve environment variables (issue 271) and arguments (issue 276) + * Added fs.readLink function (issue 329) + * Added support for reading and writing binary data (issue 400) + * Added support to retrieve request data in the WebServer? module (issue 340) + * Added support for individual top/bottom/left/right print margins (issue 388) + * Added command-line option --help (issue 347) + * Added short command-line options -v and -h (issue 408) + * Removed support for Flash and other plugins (issue 418) + + Bug fixes + + * Fixed multiple console.log arguments (issue 36) + * Fixed file upload (issue 307) + * Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416) + * Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365) + * Fixed a Content-Type problem where POST does not work (issue 337) + * Fixed reading body request in the web server even without specific Content-Type (issue 439) + * Fixed Jasmine test runner with Jasmine 1.1 (issue 402) + * Fixed request URL formatting in the web server (issue 437) + * Don't display debugging and warning messages (issue 323) + +2011-12-31: Version 1.4.1 + + Bug fixes + + * Fix setting the proxy type (issue 266) + * Workaround for file upload regression (issue 307) + * Fix extraneous messsages in non-debug mode (issue 323) + +2011-12-22: Version 1.4.0 "Glory of the Snow" + + New features + + * Added embedded HTTP server (issue 115) + * Added convenient build script for Linux (issue 197) + * Added support for SOCKS5 proxy (issue 266) + * Updated CoffeeScript compiler to version 1.2 (issue 312) + + Bug fixes + + * Fix potential crash in QUrl with Qt 4.8 (issue 304) + * Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10) + * Prevent showing the icon on Mac OS X Dock (issue 281) + + Examples + + * Added a new example to detect browsers sniffing (issue 263) + * Added HTTP server example (issue 115) + +2011-09-23: Version 1.3.0 "Water Lily" + + Bug fixes + + * Fixed open() and POST method, without specifying the finished handler + * Fixed script execution warning dialog (issue 165) + * Added WebPage.release() to free the web page from memory (issue 154) + * Added special handling of about:blank (issue 235) + * Made a separate network access manager for each page (issue 190) + + New features + + * Introduced file system API based on CommonJS Filesystem proposal (issue 129) + * Added support for persistent cookies (issue 91) + * Added event handling, currently only for mouse events (issue 234) + * Added page scroll position (issue 162) + * Added HTTP authentication support (issue 45) + * Added callback for page initialization (issue 143) + * Added support to specify script and output encoding (issue 186) + * Added option to allow local content to do cross-domain access (issue 28) + * Added support to apply configurations from a JSON file (issue 180) + * Added a convenient WebPage initialization construction (issue 206) + * Added option to limit the size of disk cache (issue 220) + + Examples + + * Added a new example on using Modernizr to detect features (issue 144) + * Fixed pizza.js example to use Mobile Yelp (issue 200) + * Fixed netsniff.coffee example due to wrong indentation (issue 225) + * Added an example to show live network traffic (issue 227) + * Added an example demonstrating different output encodings (issue 186) + +2011-06-21: Version 1.2.0 "Birds of Paradise" + + Version 1.2.0 is a major update. It introduces a whole set of new API. + + Bug fixes + + * Fixed rendering a very large web page (issue 54) + * Fixed reporting of CoffeeScript compile error (issue 125) + + New features + + * Added callback for console message (issue 12) + * Improved security model via WebPage object (issue 41) + * Added support for POST, HEAD, PUT, and DELETE (issue 88) + * Scripts filename is now passed as phantom.scriptName + * Added callback to capture resource requests and responses (issue 2) + * Added the ability to load external JavaScript (issue 32) + + Examples + + * Ported examples to use WebPage object + * Added a new example to upload an image to imagebin.org + * Added a new example to show HTTP POST feature + * Added a new example to sniff network traffic and save it in HAR format + + +2011-04-27: Version 1.1.0 "Cherry Blossom" + + Fixed the script loading to use UTF-8 encoding (Yasuhiro Matsumoto). + + Added check for system proxy setting (Yasuhiro Matsumoto). + + Fixed building with Cygwin and Qt 4.5 (John Dalton). + + Added a new example: driver for QUnit tests (Łukasz Korecki). + + Fixed issue #20: problem with JPG transparent color (Alessandro Portale). + + Fixed issue #9: ignore first line starting with #! (Matthias, aka fourplusone). + + Fixed issue #7: support for file upload for form submission (Matthias, aka fourplusone). + + Fixed issue #35: support for disabling images loading (Ariya Hidayat). + + Fixed issue #14: enable or disable plugins (Ariya Hidayat). + + Added a new example: using Canvas to produce the color wheel (Ariya Hidayat). + + Added support for rasterizing as GIF image (Ariya Hidayat). + + Added support for CoffeeScript (Ariya Hidayat). + + Fixed issue #19: option for setting the proxy (Clint Berry, Ariya Hidayat). + + Python implementation using PyQt (James Roe). + + Fixed issue #17: Specify paper size for PDF export (Alessandro Portale). + + Fixed issue #60: Win32 and OS/2 icon files (Salvador Parra Camacho). + + Added clipping rectangle to the render function (Wouter de Bie). + + Added an example on sychronous waiting (Gabor Torok). + + Added command line option to use disk cache (Jon Turner). + + Added text extracting example (Weston Ruter). + + Fixed issue #93: Build with Qt < 4.7 (Ariya Hidayat). + + Ported all examples to CoffeeScript (Robert Gieseke). + +2011-01-17: Version 1.0.0 + + Initial launch. + + The API is centralized at the 'phantom' object (as child of + window object) which has the properties: args, content, + loadStatus, state, userAgent, version, viewportSize, and + the following functions: exit, open, render, sleep. + + Several examples are included, among others: web page rasterizer, + weather service, headless test framework driver, and many others. diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/LICENSE.BSD b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/LICENSE.BSD new file mode 100644 index 0000000..d5dfdd1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/LICENSE.BSD @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/README.md b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/README.md new file mode 100644 index 0000000..3c9578c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/README.md @@ -0,0 +1,29 @@ +# [PhantomJS](http://phantomjs.org) - Scriptable Headless WebKit + +PhantomJS ([phantomjs.org](http://phantomjs.org)) is a headless WebKit scriptable with JavaScript. The latest [stable release](http://phantomjs.org/release-2.0.html) is version 2.0. + +**Note**: Please **do not** create a GitHub pull request **without** reading the [Contribution Guide](https://github.com/ariya/phantomjs/blob/master/CONTRIBUTING.md) first. Failure to do so may result in the rejection of the pull request. + +## Use Cases + +- **Headless web testing**. Lightning-fast testing without the browser is now possible! +- **Page automation**. [Access and manipulate](http://phantomjs.org/page-automation.html) web pages with the standard DOM API, or with usual libraries like jQuery. +- **Screen capture**. Programmatically [capture web contents](http://phantomjs.org/screen-capture.html), including CSS, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. +- **Network monitoring**. Automate performance analysis, track [page loading](http://phantomjs.org/network-monitoring.html) and export as standard HAR format. + +## Features + +- **Multiplatform**, available on major operating systems: Windows, Mac OS X, Linux, and other Unices. +- **Fast and native implementation** of web standards: DOM, CSS, JavaScript, Canvas, and SVG. No emulation! +- **Pure headless (no X11) on Linux**, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, and Iron.io. +- **Easy to install**: [Download](http://phantomjs.org/download.html), unpack, and start having fun in just 5 minutes. + +## Questions? + +- Explore the complete [documentation](http://phantomjs.org/documentation/). +- Read tons of [user articles](http://phantomjs.org/buzz.html) on using PhantomJS. +- Join the [mailing-list](http://groups.google.com/group/phantomjs) and discuss with other PhantomJS fans. + +PhantomJS is free software/open source, and is distributed under the [BSD license](http://opensource.org/licenses/BSD-3-Clause). It contains third-party code, see the included `third-party.txt` file for the license information on third-party code. + +PhantomJS is created and maintained by [Ariya Hidayat](http://ariya.ofilabs.com/about) (Twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)), with the help of [many contributors](https://github.com/ariya/phantomjs/contributors). Follow the official Twitter stream [@PhantomJS](http://twitter.com/PhantomJS) to get the frequent development updates. diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/bin/phantomjs.exe b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/bin/phantomjs.exe new file mode 100644 index 0000000..c644886 Binary files /dev/null and b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/bin/phantomjs.exe differ diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/arguments.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/arguments.js new file mode 100644 index 0000000..9c75974 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/arguments.js @@ -0,0 +1,10 @@ +"use strict"; +var system = require('system'); +if (system.args.length === 1) { + console.log('Try to pass some args when invoking this script!'); +} else { + system.args.forEach(function (arg, i) { + console.log(i + ': ' + arg); + }); +} +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/child_process-examples.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/child_process-examples.js new file mode 100644 index 0000000..19f9199 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/child_process-examples.js @@ -0,0 +1,28 @@ +"use strict"; +var spawn = require("child_process").spawn +var execFile = require("child_process").execFile + +var child = spawn("ls", ["-lF", "/rooot"]) + +child.stdout.on("data", function (data) { + console.log("spawnSTDOUT:", JSON.stringify(data)) +}) + +child.stderr.on("data", function (data) { + console.log("spawnSTDERR:", JSON.stringify(data)) +}) + +child.on("exit", function (code) { + console.log("spawnEXIT:", code) +}) + +//child.kill("SIGKILL") + +execFile("ls", ["-lF", "/usr"], null, function (err, stdout, stderr) { + console.log("execFileSTDOUT:", JSON.stringify(stdout)) + console.log("execFileSTDERR:", JSON.stringify(stderr)) +}) + +setTimeout(function () { + phantom.exit(0) +}, 2000) diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/colorwheel.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/colorwheel.js new file mode 100644 index 0000000..393e9e9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/colorwheel.js @@ -0,0 +1,52 @@ +"use strict"; +var page = require('webpage').create(); +page.viewportSize = { width: 400, height : 400 }; +page.content = ''; +page.evaluate(function() { + var el = document.getElementById('surface'), + context = el.getContext('2d'), + width = window.innerWidth, + height = window.innerHeight, + cx = width / 2, + cy = height / 2, + radius = width / 2.3, + imageData, + pixels, + hue, sat, value, + i = 0, x, y, rx, ry, d, + f, g, p, u, v, w, rgb; + + el.width = width; + el.height = height; + imageData = context.createImageData(width, height); + pixels = imageData.data; + + for (y = 0; y < height; y = y + 1) { + for (x = 0; x < width; x = x + 1, i = i + 4) { + rx = x - cx; + ry = y - cy; + d = rx * rx + ry * ry; + if (d < radius * radius) { + hue = 6 * (Math.atan2(ry, rx) + Math.PI) / (2 * Math.PI); + sat = Math.sqrt(d) / radius; + g = Math.floor(hue); + f = hue - g; + u = 255 * (1 - sat); + v = 255 * (1 - sat * f); + w = 255 * (1 - sat * (1 - f)); + pixels[i] = [255, v, u, u, w, 255, 255][g]; + pixels[i + 1] = [w, 255, 255, v, u, u, w][g]; + pixels[i + 2] = [u, u, w, 255, 255, v, u][g]; + pixels[i + 3] = 255; + } + } + } + + context.putImageData(imageData, 0, 0); + document.body.style.backgroundColor = 'white'; + document.body.style.margin = '0px'; +}); + +page.render('colorwheel.png'); + +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/countdown.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/countdown.js new file mode 100644 index 0000000..4dfd818 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/countdown.js @@ -0,0 +1,10 @@ +"use strict"; +var t = 10, + interval = setInterval(function(){ + if ( t > 0 ) { + console.log(t--); + } else { + console.log("BLAST OFF!"); + phantom.exit(); + } + }, 1000); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/detectsniff.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/detectsniff.js new file mode 100644 index 0000000..f30867b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/detectsniff.js @@ -0,0 +1,60 @@ +// Detect if a web page sniffs the user agent or not. + +"use strict"; +var page = require('webpage').create(), + system = require('system'), + sniffed, + address; + +page.onInitialized = function () { + page.evaluate(function () { + + (function () { + var userAgent = window.navigator.userAgent, + platform = window.navigator.platform; + + window.navigator = { + appCodeName: 'Mozilla', + appName: 'Netscape', + cookieEnabled: false, + sniffed: false + }; + + window.navigator.__defineGetter__('userAgent', function () { + window.navigator.sniffed = true; + return userAgent; + }); + + window.navigator.__defineGetter__('platform', function () { + window.navigator.sniffed = true; + return platform; + }); + })(); + }); +}; + +if (system.args.length === 1) { + console.log('Usage: detectsniff.js '); + phantom.exit(1); +} else { + address = system.args[1]; + console.log('Checking ' + address + '...'); + page.open(address, function (status) { + if (status !== 'success') { + console.log('FAIL to load the address'); + phantom.exit(); + } else { + window.setTimeout(function () { + sniffed = page.evaluate(function () { + return navigator.sniffed; + }); + if (sniffed) { + console.log('The page tried to sniff the user agent.'); + } else { + console.log('The page did not try to sniff the user agent.'); + } + phantom.exit(); + }, 1500); + } + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/echoToFile.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/echoToFile.js new file mode 100644 index 0000000..cfb8858 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/echoToFile.js @@ -0,0 +1,24 @@ +// echoToFile.js - Write in a given file all the parameters passed on the CLI +"use strict"; +var fs = require('fs'), + system = require('system'); + +if (system.args.length < 3) { + console.log("Usage: echoToFile.js DESTINATION_FILE "); + phantom.exit(1); +} else { + var content = '', + f = null, + i; + for ( i= 2; i < system.args.length; ++i ) { + content += system.args[i] + (i === system.args.length-1 ? '' : ' '); + } + + try { + fs.write(system.args[1], content, 'w'); + } catch(e) { + console.log(e); + } + + phantom.exit(); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/features.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/features.js new file mode 100644 index 0000000..4c2a14a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/features.js @@ -0,0 +1,30 @@ +"use strict"; +var feature, supported = [], unsupported = []; + +phantom.injectJs('modernizr.js'); +console.log('Detected features (using Modernizr ' + Modernizr._version + '):'); +for (feature in Modernizr) { + if (Modernizr.hasOwnProperty(feature)) { + if (feature[0] !== '_' && typeof Modernizr[feature] !== 'function' && + feature !== 'input' && feature !== 'inputtypes') { + if (Modernizr[feature]) { + supported.push(feature); + } else { + unsupported.push(feature); + } + } + } +} + +console.log(''); +console.log('Supported:'); +supported.forEach(function (e) { + console.log(' ' + e); +}); + +console.log(''); +console.log('Not supported:'); +unsupported.forEach(function (e) { + console.log(' ' + e); +}); +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/fibo.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/fibo.js new file mode 100644 index 0000000..7ee472a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/fibo.js @@ -0,0 +1,10 @@ +"use strict"; +var fibs = [0, 1]; +var ticker = window.setInterval(function () { + console.log(fibs[fibs.length - 1]); + fibs.push(fibs[fibs.length - 1] + fibs[fibs.length - 2]); + if (fibs.length > 10) { + window.clearInterval(ticker); + phantom.exit(); + } +}, 300); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/hello.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/hello.js new file mode 100644 index 0000000..82d2dbb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/hello.js @@ -0,0 +1,3 @@ +"use strict"; +console.log('Hello, world!'); +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/injectme.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/injectme.js new file mode 100644 index 0000000..18d9fda --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/injectme.js @@ -0,0 +1,26 @@ +// Use 'page.injectJs()' to load the script itself in the Page context + +"use strict"; +if ( typeof(phantom) !== "undefined" ) { + var page = require('webpage').create(); + + // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") + page.onConsoleMessage = function(msg) { + console.log(msg); + }; + + page.onAlert = function(msg) { + console.log(msg); + }; + + console.log("* Script running in the Phantom context."); + console.log("* Script will 'inject' itself in a page..."); + page.open("about:blank", function(status) { + if ( status === "success" ) { + console.log(page.injectJs("injectme.js") ? "... done injecting itself!" : "... fail! Check the $PWD?!"); + } + phantom.exit(); + }); +} else { + alert("* Script running in the Page context."); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/loadspeed.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/loadspeed.js new file mode 100644 index 0000000..626a51c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/loadspeed.js @@ -0,0 +1,24 @@ +"use strict"; +var page = require('webpage').create(), + system = require('system'), + t, address; + +if (system.args.length === 1) { + console.log('Usage: loadspeed.js '); + phantom.exit(1); +} else { + t = Date.now(); + address = system.args[1]; + page.open(address, function (status) { + if (status !== 'success') { + console.log('FAIL to load the address'); + } else { + t = Date.now() - t; + console.log('Page title is ' + page.evaluate(function () { + return document.title; + })); + console.log('Loading time ' + t + ' msec'); + } + phantom.exit(); + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/loadurlwithoutcss.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/loadurlwithoutcss.js new file mode 100644 index 0000000..12fc28a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/loadurlwithoutcss.js @@ -0,0 +1,26 @@ +"use strict"; +var page = require('webpage').create(), + system = require('system'); + +if (system.args.length < 2) { + console.log('Usage: loadurlwithoutcss.js URL'); + phantom.exit(); +} + +var address = system.args[1]; + +page.onResourceRequested = function(requestData, request) { + if ((/http:\/\/.+?\.css/gi).test(requestData['url']) || requestData.headers['Content-Type'] == 'text/css') { + console.log('The url of the request is matching. Aborting: ' + requestData['url']); + request.abort(); + } +}; + +page.open(address, function(status) { + if (status === 'success') { + phantom.exit(); + } else { + console.log('Unable to load the address!'); + phantom.exit(); + } +}); \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/modernizr.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/modernizr.js new file mode 100644 index 0000000..24de6cc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/modernizr.js @@ -0,0 +1,1406 @@ +/*! + * Modernizr v2.8.2 + * www.modernizr.com + * + * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton + * Available under the BSD and MIT licenses: www.modernizr.com/license/ + */ + +/* + * Modernizr tests which native CSS3 and HTML5 features are available in + * the current UA and makes the results available to you in two ways: + * as properties on a global Modernizr object, and as classes on the + * element. This information allows you to progressively enhance + * your pages with a granular level of control over the experience. + * + * Modernizr has an optional (not included) conditional resource loader + * called Modernizr.load(), based on Yepnope.js (yepnopejs.com). + * To get a build that includes Modernizr.load(), as well as choosing + * which tests to include, go to www.modernizr.com/download/ + * + * Authors Faruk Ates, Paul Irish, Alex Sexton + * Contributors Ryan Seddon, Ben Alman + */ + +window.Modernizr = (function( window, document, undefined ) { + + var version = '2.8.2', + + Modernizr = {}, + + /*>>cssclasses*/ + // option for enabling the HTML classes to be added + enableClasses = true, + /*>>cssclasses*/ + + docElement = document.documentElement, + + /** + * Create our "modernizr" element that we do most feature tests on. + */ + mod = 'modernizr', + modElem = document.createElement(mod), + mStyle = modElem.style, + + /** + * Create the input element for various Web Forms feature tests. + */ + inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ , + + /*>>smile*/ + smile = ':)', + /*>>smile*/ + + toString = {}.toString, + + // TODO :: make the prefixes more granular + /*>>prefixes*/ + // List of property values to set for css tests. See ticket #21 + prefixes = ' -webkit- -moz- -o- -ms- '.split(' '), + /*>>prefixes*/ + + /*>>domprefixes*/ + // Following spec is to expose vendor-specific style properties as: + // elem.style.WebkitBorderRadius + // and the following would be incorrect: + // elem.style.webkitBorderRadius + + // Webkit ghosts their properties in lowercase but Opera & Moz do not. + // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ + // erik.eae.net/archives/2008/03/10/21.48.10/ + + // More here: github.com/Modernizr/Modernizr/issues/issue/21 + omPrefixes = 'Webkit Moz O ms', + + cssomPrefixes = omPrefixes.split(' '), + + domPrefixes = omPrefixes.toLowerCase().split(' '), + /*>>domprefixes*/ + + /*>>ns*/ + ns = {'svg': 'http://www.w3.org/2000/svg'}, + /*>>ns*/ + + tests = {}, + inputs = {}, + attrs = {}, + + classes = [], + + slice = classes.slice, + + featureName, // used in testing loop + + + /*>>teststyles*/ + // Inject element with style element and some CSS rules + injectElementWithStyles = function( rule, callback, nodes, testnames ) { + + var style, ret, node, docOverflow, + div = document.createElement('div'), + // After page load injecting a fake body doesn't work so check if body exists + body = document.body, + // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it. + fakeBody = body || document.createElement('body'); + + if ( parseInt(nodes, 10) ) { + // In order not to give false positives we create a node for each test + // This also allows the method to scale for unspecified uses + while ( nodes-- ) { + node = document.createElement('div'); + node.id = testnames ? testnames[nodes] : mod + (nodes + 1); + div.appendChild(node); + } + } + + // '].join(''); + div.id = mod; + // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. + // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 + (body ? div : fakeBody).innerHTML += style; + fakeBody.appendChild(div); + if ( !body ) { + //avoid crashing IE8, if background image is used + fakeBody.style.background = ''; + //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible + fakeBody.style.overflow = 'hidden'; + docOverflow = docElement.style.overflow; + docElement.style.overflow = 'hidden'; + docElement.appendChild(fakeBody); + } + + ret = callback(div, rule); + // If this is done after page load we don't want to remove the body so check if body exists + if ( !body ) { + fakeBody.parentNode.removeChild(fakeBody); + docElement.style.overflow = docOverflow; + } else { + div.parentNode.removeChild(div); + } + + return !!ret; + + }, + /*>>teststyles*/ + + /*>>mq*/ + // adapted from matchMedia polyfill + // by Scott Jehl and Paul Irish + // gist.github.com/786768 + testMediaQuery = function( mq ) { + + var matchMedia = window.matchMedia || window.msMatchMedia; + if ( matchMedia ) { + return matchMedia(mq) && matchMedia(mq).matches || false; + } + + var bool; + + injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) { + bool = (window.getComputedStyle ? + getComputedStyle(node, null) : + node.currentStyle)['position'] == 'absolute'; + }); + + return bool; + + }, + /*>>mq*/ + + + /*>>hasevent*/ + // + // isEventSupported determines if a given element supports the given event + // kangax.github.com/iseventsupported/ + // + // The following results are known incorrects: + // Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative + // Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333 + // ... + isEventSupported = (function() { + + var TAGNAMES = { + 'select': 'input', 'change': 'input', + 'submit': 'form', 'reset': 'form', + 'error': 'img', 'load': 'img', 'abort': 'img' + }; + + function isEventSupported( eventName, element ) { + + element = element || document.createElement(TAGNAMES[eventName] || 'div'); + eventName = 'on' + eventName; + + // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those + var isSupported = eventName in element; + + if ( !isSupported ) { + // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element + if ( !element.setAttribute ) { + element = document.createElement('div'); + } + if ( element.setAttribute && element.removeAttribute ) { + element.setAttribute(eventName, ''); + isSupported = is(element[eventName], 'function'); + + // If property was created, "remove it" (by setting value to `undefined`) + if ( !is(element[eventName], 'undefined') ) { + element[eventName] = undefined; + } + element.removeAttribute(eventName); + } + } + + element = null; + return isSupported; + } + return isEventSupported; + })(), + /*>>hasevent*/ + + // TODO :: Add flag for hasownprop ? didn't last time + + // hasOwnProperty shim by kangax needed for Safari 2.0 support + _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp; + + if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { + hasOwnProp = function (object, property) { + return _hasOwnProperty.call(object, property); + }; + } + else { + hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ + return ((property in object) && is(object.constructor.prototype[property], 'undefined')); + }; + } + + // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js + // es5.github.com/#x15.3.4.5 + + if (!Function.prototype.bind) { + Function.prototype.bind = function bind(that) { + + var target = this; + + if (typeof target != "function") { + throw new TypeError(); + } + + var args = slice.call(arguments, 1), + bound = function () { + + if (this instanceof bound) { + + var F = function(){}; + F.prototype = target.prototype; + var self = new F(); + + var result = target.apply( + self, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return self; + + } else { + + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + + } + + }; + + return bound; + }; + } + + /** + * setCss applies given styles to the Modernizr DOM node. + */ + function setCss( str ) { + mStyle.cssText = str; + } + + /** + * setCssAll extrapolates all vendor-specific css strings. + */ + function setCssAll( str1, str2 ) { + return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); + } + + /** + * is returns a boolean for if typeof obj is exactly type. + */ + function is( obj, type ) { + return typeof obj === type; + } + + /** + * contains returns a boolean for if substr is found within str. + */ + function contains( str, substr ) { + return !!~('' + str).indexOf(substr); + } + + /*>>testprop*/ + + // testProps is a generic CSS / DOM property test. + + // In testing support for a given CSS property, it's legit to test: + // `elem.style[styleName] !== undefined` + // If the property is supported it will return an empty string, + // if unsupported it will return undefined. + + // We'll take advantage of this quick test and skip setting a style + // on our modernizr element, but instead just testing undefined vs + // empty string. + + // Because the testing of the CSS property names (with "-", as + // opposed to the camelCase DOM properties) is non-portable and + // non-standard but works in WebKit and IE (but not Gecko or Opera), + // we explicitly reject properties with dashes so that authors + // developing in WebKit or IE first don't end up with + // browser-specific content by accident. + + function testProps( props, prefixed ) { + for ( var i in props ) { + var prop = props[i]; + if ( !contains(prop, "-") && mStyle[prop] !== undefined ) { + return prefixed == 'pfx' ? prop : true; + } + } + return false; + } + /*>>testprop*/ + + // TODO :: add testDOMProps + /** + * testDOMProps is a generic DOM property test; if a browser supports + * a certain property, it won't return undefined for it. + */ + function testDOMProps( props, obj, elem ) { + for ( var i in props ) { + var item = obj[props[i]]; + if ( item !== undefined) { + + // return the property name as a string + if (elem === false) return props[i]; + + // let's bind a function + if (is(item, 'function')){ + // default to autobind unless override + return item.bind(elem || obj); + } + + // return the unbound function or obj or value + return item; + } + } + return false; + } + + /*>>testallprops*/ + /** + * testPropsAll tests a list of DOM properties we want to check against. + * We specify literally ALL possible (known and/or likely) properties on + * the element including the non-vendor prefixed one, for forward- + * compatibility. + */ + function testPropsAll( prop, prefixed, elem ) { + + var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), + props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); + + // did they call .prefixed('boxSizing') or are we just testing a prop? + if(is(prefixed, "string") || is(prefixed, "undefined")) { + return testProps(props, prefixed); + + // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) + } else { + props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); + return testDOMProps(props, prefixed, elem); + } + } + /*>>testallprops*/ + + + /** + * Tests + * ----- + */ + + // The *new* flexbox + // dev.w3.org/csswg/css3-flexbox + + tests['flexbox'] = function() { + return testPropsAll('flexWrap'); + }; + + // The *old* flexbox + // www.w3.org/TR/2009/WD-css3-flexbox-20090723/ + + tests['flexboxlegacy'] = function() { + return testPropsAll('boxDirection'); + }; + + // On the S60 and BB Storm, getContext exists, but always returns undefined + // so we actually have to call getContext() to verify + // github.com/Modernizr/Modernizr/issues/issue/97/ + + tests['canvas'] = function() { + var elem = document.createElement('canvas'); + return !!(elem.getContext && elem.getContext('2d')); + }; + + tests['canvastext'] = function() { + return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')); + }; + + // webk.it/70117 is tracking a legit WebGL feature detect proposal + + // We do a soft detect which may false positive in order to avoid + // an expensive context creation: bugzil.la/732441 + + tests['webgl'] = function() { + return !!window.WebGLRenderingContext; + }; + + /* + * The Modernizr.touch test only indicates if the browser supports + * touch events, which does not necessarily reflect a touchscreen + * device, as evidenced by tablets running Windows 7 or, alas, + * the Palm Pre / WebOS (touch) phones. + * + * Additionally, Chrome (desktop) used to lie about its support on this, + * but that has since been rectified: crbug.com/36415 + * + * We also test for Firefox 4 Multitouch Support. + * + * For more info, see: modernizr.github.com/Modernizr/touch.html + */ + + tests['touch'] = function() { + var bool; + + if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) { + bool = true; + } else { + injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) { + bool = node.offsetTop === 9; + }); + } + + return bool; + }; + + + // geolocation is often considered a trivial feature detect... + // Turns out, it's quite tricky to get right: + // + // Using !!navigator.geolocation does two things we don't want. It: + // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513 + // 2. Disables page caching in WebKit: webk.it/43956 + // + // Meanwhile, in Firefox < 8, an about:config setting could expose + // a false positive that would throw an exception: bugzil.la/688158 + + tests['geolocation'] = function() { + return 'geolocation' in navigator; + }; + + + tests['postmessage'] = function() { + return !!window.postMessage; + }; + + + // Chrome incognito mode used to throw an exception when using openDatabase + // It doesn't anymore. + tests['websqldatabase'] = function() { + return !!window.openDatabase; + }; + + // Vendors had inconsistent prefixing with the experimental Indexed DB: + // - Webkit's implementation is accessible through webkitIndexedDB + // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB + // For speed, we don't test the legacy (and beta-only) indexedDB + tests['indexedDB'] = function() { + return !!testPropsAll("indexedDB", window); + }; + + // documentMode logic from YUI to filter out IE8 Compat Mode + // which false positives. + tests['hashchange'] = function() { + return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7); + }; + + // Per 1.6: + // This used to be Modernizr.historymanagement but the longer + // name has been deprecated in favor of a shorter and property-matching one. + // The old API is still available in 1.6, but as of 2.0 will throw a warning, + // and in the first release thereafter disappear entirely. + tests['history'] = function() { + return !!(window.history && history.pushState); + }; + + tests['draganddrop'] = function() { + var div = document.createElement('div'); + return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); + }; + + // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10 + // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17. + // FF10 still uses prefixes, so check for it until then. + // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/ + tests['websockets'] = function() { + return 'WebSocket' in window || 'MozWebSocket' in window; + }; + + + // css-tricks.com/rgba-browser-support/ + tests['rgba'] = function() { + // Set an rgba() color and check the returned value + + setCss('background-color:rgba(150,255,150,.5)'); + + return contains(mStyle.backgroundColor, 'rgba'); + }; + + tests['hsla'] = function() { + // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally, + // except IE9 who retains it as hsla + + setCss('background-color:hsla(120,40%,100%,.5)'); + + return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla'); + }; + + tests['multiplebgs'] = function() { + // Setting multiple images AND a color on the background shorthand property + // and then querying the style.background property value for the number of + // occurrences of "url(" is a reliable method for detecting ACTUAL support for this! + + setCss('background:url(https://),url(https://),red url(https://)'); + + // If the UA supports multiple backgrounds, there should be three occurrences + // of the string "url(" in the return value for elemStyle.background + + return (/(url\s*\(.*?){3}/).test(mStyle.background); + }; + + + + // this will false positive in Opera Mini + // github.com/Modernizr/Modernizr/issues/396 + + tests['backgroundsize'] = function() { + return testPropsAll('backgroundSize'); + }; + + tests['borderimage'] = function() { + return testPropsAll('borderImage'); + }; + + + // Super comprehensive table about all the unique implementations of + // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance + + tests['borderradius'] = function() { + return testPropsAll('borderRadius'); + }; + + // WebOS unfortunately false positives on this test. + tests['boxshadow'] = function() { + return testPropsAll('boxShadow'); + }; + + // FF3.0 will false positive on this test + tests['textshadow'] = function() { + return document.createElement('div').style.textShadow === ''; + }; + + + tests['opacity'] = function() { + // Browsers that actually have CSS Opacity implemented have done so + // according to spec, which means their return values are within the + // range of [0.0,1.0] - including the leading zero. + + setCssAll('opacity:.55'); + + // The non-literal . in this regex is intentional: + // German Chrome returns this value as 0,55 + // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632 + return (/^0.55$/).test(mStyle.opacity); + }; + + + // Note, Android < 4 will pass this test, but can only animate + // a single property at a time + // goo.gl/v3V4Gp + tests['cssanimations'] = function() { + return testPropsAll('animationName'); + }; + + + tests['csscolumns'] = function() { + return testPropsAll('columnCount'); + }; + + + tests['cssgradients'] = function() { + /** + * For CSS Gradients syntax, please see: + * webkit.org/blog/175/introducing-css-gradients/ + * developer.mozilla.org/en/CSS/-moz-linear-gradient + * developer.mozilla.org/en/CSS/-moz-radial-gradient + * dev.w3.org/csswg/css3-images/#gradients- + */ + + var str1 = 'background-image:', + str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));', + str3 = 'linear-gradient(left top,#9f9, white);'; + + setCss( + // legacy webkit syntax (FIXME: remove when syntax not in use anymore) + (str1 + '-webkit- '.split(' ').join(str2 + str1) + + // standard syntax // trailing 'background-image:' + prefixes.join(str3 + str1)).slice(0, -str1.length) + ); + + return contains(mStyle.backgroundImage, 'gradient'); + }; + + + tests['cssreflections'] = function() { + return testPropsAll('boxReflect'); + }; + + + tests['csstransforms'] = function() { + return !!testPropsAll('transform'); + }; + + + tests['csstransforms3d'] = function() { + + var ret = !!testPropsAll('perspective'); + + // Webkit's 3D transforms are passed off to the browser's own graphics renderer. + // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in + // some conditions. As a result, Webkit typically recognizes the syntax but + // will sometimes throw a false positive, thus we must do a more thorough check: + if ( ret && 'webkitPerspective' in docElement.style ) { + + // Webkit allows this media query to succeed only if the feature is enabled. + // `@media (transform-3d),(-webkit-transform-3d){ ... }` + injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) { + ret = node.offsetLeft === 9 && node.offsetHeight === 3; + }); + } + return ret; + }; + + + tests['csstransitions'] = function() { + return testPropsAll('transition'); + }; + + + /*>>fontface*/ + // @font-face detection routine by Diego Perini + // javascript.nwbox.com/CSSSupport/ + + // false positives: + // WebOS github.com/Modernizr/Modernizr/issues/342 + // WP7 github.com/Modernizr/Modernizr/issues/538 + tests['fontface'] = function() { + var bool; + + injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) { + var style = document.getElementById('smodernizr'), + sheet = style.sheet || style.styleSheet, + cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; + + bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0; + }); + + return bool; + }; + /*>>fontface*/ + + // CSS generated content detection + tests['generatedcontent'] = function() { + var bool; + + injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) { + bool = node.offsetHeight >= 3; + }); + + return bool; + }; + + + + // These tests evaluate support of the video/audio elements, as well as + // testing what types of content they support. + // + // We're using the Boolean constructor here, so that we can extend the value + // e.g. Modernizr.video // true + // Modernizr.video.ogg // 'probably' + // + // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 + // thx to NielsLeenheer and zcorpan + + // Note: in some older browsers, "no" was a return value instead of empty string. + // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2 + // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5 + + tests['video'] = function() { + var elem = document.createElement('video'), + bool = false; + + // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 + try { + if ( bool = !!elem.canPlayType ) { + bool = new Boolean(bool); + bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,''); + + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,''); + + bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,''); + } + + } catch(e) { } + + return bool; + }; + + tests['audio'] = function() { + var elem = document.createElement('audio'), + bool = false; + + try { + if ( bool = !!elem.canPlayType ) { + bool = new Boolean(bool); + bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); + bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,''); + + // Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + // bit.ly/iphoneoscodecs + bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,''); + bool.m4a = ( elem.canPlayType('audio/x-m4a;') || + elem.canPlayType('audio/aac;')) .replace(/^no$/,''); + } + } catch(e) { } + + return bool; + }; + + + // In FF4, if disabled, window.localStorage should === null. + + // Normally, we could not test that directly and need to do a + // `('localStorage' in window) && ` test first because otherwise Firefox will + // throw bugzil.la/365772 if cookies are disabled + + // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem + // will throw the exception: + // QUOTA_EXCEEDED_ERRROR DOM Exception 22. + // Peculiarly, getItem and removeItem calls do not throw. + + // Because we are forced to try/catch this, we'll go aggressive. + + // Just FWIW: IE8 Compat mode supports these features completely: + // www.quirksmode.org/dom/html5.html + // But IE8 doesn't support either with local files + + tests['localstorage'] = function() { + try { + localStorage.setItem(mod, mod); + localStorage.removeItem(mod); + return true; + } catch(e) { + return false; + } + }; + + tests['sessionstorage'] = function() { + try { + sessionStorage.setItem(mod, mod); + sessionStorage.removeItem(mod); + return true; + } catch(e) { + return false; + } + }; + + + tests['webworkers'] = function() { + return !!window.Worker; + }; + + + tests['applicationcache'] = function() { + return !!window.applicationCache; + }; + + + // Thanks to Erik Dahlstrom + tests['svg'] = function() { + return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect; + }; + + // specifically for SVG inline in HTML, not within XHTML + // test page: paulirish.com/demo/inline-svg + tests['inlinesvg'] = function() { + var div = document.createElement('div'); + div.innerHTML = ''; + return (div.firstChild && div.firstChild.namespaceURI) == ns.svg; + }; + + // SVG SMIL animation + tests['smil'] = function() { + return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); + }; + + // This test is only for clip paths in SVG proper, not clip paths on HTML content + // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg + + // However read the comments to dig into applying SVG clippaths to HTML content here: + // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491 + tests['svgclippaths'] = function() { + return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); + }; + + /*>>webforms*/ + // input features and input types go directly onto the ret object, bypassing the tests loop. + // Hold this guy to execute in a moment. + function webforms() { + /*>>input*/ + // Run through HTML5's new input attributes to see if the UA understands any. + // We're using f which is the element created early on + // Mike Taylr has created a comprehensive resource for testing these attributes + // when applied to all input types: + // miketaylr.com/code/input-type-attr.html + // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + + // Only input placeholder is tested while textarea's placeholder is not. + // Currently Safari 4 and Opera 11 have support only for the input placeholder + // Both tests are available in feature-detects/forms-placeholder.js + Modernizr['input'] = (function( props ) { + for ( var i = 0, len = props.length; i < len; i++ ) { + attrs[ props[i] ] = !!(props[i] in inputElem); + } + if (attrs.list){ + // safari false positive's on datalist: webk.it/74252 + // see also github.com/Modernizr/Modernizr/issues/146 + attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement); + } + return attrs; + })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); + /*>>input*/ + + /*>>inputtypes*/ + // Run through HTML5's new input types to see if the UA understands any. + // This is put behind the tests runloop because it doesn't return a + // true/false like all the other tests; instead, it returns an object + // containing each input type with its corresponding true/false value + + // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/ + Modernizr['inputtypes'] = (function(props) { + + for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) { + + inputElem.setAttribute('type', inputElemType = props[i]); + bool = inputElem.type !== 'text'; + + // We first check to see if the type we give it sticks.. + // If the type does, we feed it a textual value, which shouldn't be valid. + // If the value doesn't stick, we know there's input sanitization which infers a custom UI + if ( bool ) { + + inputElem.value = smile; + inputElem.style.cssText = 'position:absolute;visibility:hidden;'; + + if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) { + + docElement.appendChild(inputElem); + defaultView = document.defaultView; + + // Safari 2-4 allows the smiley as a value, despite making a slider + bool = defaultView.getComputedStyle && + defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && + // Mobile android web browser has false positive, so must + // check the height to see if the widget is actually there. + (inputElem.offsetHeight !== 0); + + docElement.removeChild(inputElem); + + } else if ( /^(search|tel)$/.test(inputElemType) ){ + // Spec doesn't define any special parsing or detectable UI + // behaviors so we pass these through as true + + // Interestingly, opera fails the earlier test, so it doesn't + // even make it here. + + } else if ( /^(url|email)$/.test(inputElemType) ) { + // Real url and email support comes with prebaked validation. + bool = inputElem.checkValidity && inputElem.checkValidity() === false; + + } else { + // If the upgraded input compontent rejects the :) text, we got a winner + bool = inputElem.value != smile; + } + } + + inputs[ props[i] ] = !!bool; + } + return inputs; + })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); + /*>>inputtypes*/ + } + /*>>webforms*/ + + + // End of test definitions + // ----------------------- + + + + // Run through all tests and detect their support in the current UA. + // todo: hypothetically we could be doing an array of tests and use a basic loop here. + for ( var feature in tests ) { + if ( hasOwnProp(tests, feature) ) { + // run the test, throw the return value into the Modernizr, + // then based on that boolean, define an appropriate className + // and push it into an array of classes we'll join later. + featureName = feature.toLowerCase(); + Modernizr[featureName] = tests[feature](); + + classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); + } + } + + /*>>webforms*/ + // input tests need to run. + Modernizr.input || webforms(); + /*>>webforms*/ + + + /** + * addTest allows the user to define their own feature tests + * the result will be added onto the Modernizr object, + * as well as an appropriate className set on the html element + * + * @param feature - String naming the feature + * @param test - Function returning true if feature is supported, false if not + */ + Modernizr.addTest = function ( feature, test ) { + if ( typeof feature == 'object' ) { + for ( var key in feature ) { + if ( hasOwnProp( feature, key ) ) { + Modernizr.addTest( key, feature[ key ] ); + } + } + } else { + + feature = feature.toLowerCase(); + + if ( Modernizr[feature] !== undefined ) { + // we're going to quit if you're trying to overwrite an existing test + // if we were to allow it, we'd do this: + // var re = new RegExp("\\b(no-)?" + feature + "\\b"); + // docElement.className = docElement.className.replace( re, '' ); + // but, no rly, stuff 'em. + return Modernizr; + } + + test = typeof test == 'function' ? test() : test; + + if (typeof enableClasses !== "undefined" && enableClasses) { + docElement.className += ' ' + (test ? '' : 'no-') + feature; + } + Modernizr[feature] = test; + + } + + return Modernizr; // allow chaining. + }; + + + // Reset modElem.cssText to nothing to reduce memory footprint. + setCss(''); + modElem = inputElem = null; + + /*>>shiv*/ + /** + * @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed + */ + ;(function(window, document) { + /*jshint evil:true */ + /** version */ + var version = '3.7.0'; + + /** Preset options */ + var options = window.html5 || {}; + + /** Used to skip problem elements */ + var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; + + /** Not all elements can be cloned in IE **/ + var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; + + /** Detect whether the browser supports default html5 styles */ + var supportsHtml5Styles; + + /** Name of the expando, to work with multiple documents or to re-shiv one document */ + var expando = '_html5shiv'; + + /** The id for the the documents expando */ + var expanID = 0; + + /** Cached data for each document */ + var expandoData = {}; + + /** Detect whether the browser supports unknown elements */ + var supportsUnknownElements; + + (function() { + try { + var a = document.createElement('a'); + a.innerHTML = ''; + //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles + supportsHtml5Styles = ('hidden' in a); + + supportsUnknownElements = a.childNodes.length == 1 || (function() { + // assign a false positive if unable to shiv + (document.createElement)('a'); + var frag = document.createDocumentFragment(); + return ( + typeof frag.cloneNode == 'undefined' || + typeof frag.createDocumentFragment == 'undefined' || + typeof frag.createElement == 'undefined' + ); + }()); + } catch(e) { + // assign a false positive if detection fails => unable to shiv + supportsHtml5Styles = true; + supportsUnknownElements = true; + } + + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a style sheet with the given CSS text and adds it to the document. + * @private + * @param {Document} ownerDocument The document. + * @param {String} cssText The CSS text. + * @returns {StyleSheet} The style element. + */ + function addStyleSheet(ownerDocument, cssText) { + var p = ownerDocument.createElement('p'), + parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; + + p.innerHTML = 'x'; + return parent.insertBefore(p.lastChild, parent.firstChild); + } + + /** + * Returns the value of `html5.elements` as an array. + * @private + * @returns {Array} An array of shived element node names. + */ + function getElements() { + var elements = html5.elements; + return typeof elements == 'string' ? elements.split(' ') : elements; + } + + /** + * Returns the data associated to the given document + * @private + * @param {Document} ownerDocument The document. + * @returns {Object} An object of data. + */ + function getExpandoData(ownerDocument) { + var data = expandoData[ownerDocument[expando]]; + if (!data) { + data = {}; + expanID++; + ownerDocument[expando] = expanID; + expandoData[expanID] = data; + } + return data; + } + + /** + * returns a shived element for the given nodeName and document + * @memberOf html5 + * @param {String} nodeName name of the element + * @param {Document} ownerDocument The context document. + * @returns {Object} The shived element. + */ + function createElement(nodeName, ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createElement(nodeName); + } + if (!data) { + data = getExpandoData(ownerDocument); + } + var node; + + if (data.cache[nodeName]) { + node = data.cache[nodeName].cloneNode(); + } else if (saveClones.test(nodeName)) { + node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); + } else { + node = data.createElem(nodeName); + } + + // Avoid adding some elements to fragments in IE < 9 because + // * Attributes like `name` or `type` cannot be set/changed once an element + // is inserted into a document/fragment + // * Link elements with `src` attributes that are inaccessible, as with + // a 403 response, will cause the tab/window to crash + // * Script elements appended to fragments will execute when their `src` + // or `text` property is set + return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node; + } + + /** + * returns a shived DocumentFragment for the given document + * @memberOf html5 + * @param {Document} ownerDocument The context document. + * @returns {Object} The shived DocumentFragment. + */ + function createDocumentFragment(ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createDocumentFragment(); + } + data = data || getExpandoData(ownerDocument); + var clone = data.frag.cloneNode(), + i = 0, + elems = getElements(), + l = elems.length; + for(;i>shiv*/ + + // Assign private properties to the return object with prefix + Modernizr._version = version; + + // expose these for the plugin API. Look in the source for how to join() them against your input + /*>>prefixes*/ + Modernizr._prefixes = prefixes; + /*>>prefixes*/ + /*>>domprefixes*/ + Modernizr._domPrefixes = domPrefixes; + Modernizr._cssomPrefixes = cssomPrefixes; + /*>>domprefixes*/ + + /*>>mq*/ + // Modernizr.mq tests a given media query, live against the current state of the window + // A few important notes: + // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false + // * A max-width or orientation query will be evaluated against the current state, which may change later. + // * You must specify values. Eg. If you are testing support for the min-width media query use: + // Modernizr.mq('(min-width:0)') + // usage: + // Modernizr.mq('only screen and (max-width:768)') + Modernizr.mq = testMediaQuery; + /*>>mq*/ + + /*>>hasevent*/ + // Modernizr.hasEvent() detects support for a given event, with an optional element to test on + // Modernizr.hasEvent('gesturestart', elem) + Modernizr.hasEvent = isEventSupported; + /*>>hasevent*/ + + /*>>testprop*/ + // Modernizr.testProp() investigates whether a given style property is recognized + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testProp('pointerEvents') + Modernizr.testProp = function(prop){ + return testProps([prop]); + }; + /*>>testprop*/ + + /*>>testallprops*/ + // Modernizr.testAllProps() investigates whether a given style property, + // or any of its vendor-prefixed variants, is recognized + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testAllProps('boxSizing') + Modernizr.testAllProps = testPropsAll; + /*>>testallprops*/ + + + /*>>teststyles*/ + // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards + // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... }) + Modernizr.testStyles = injectElementWithStyles; + /*>>teststyles*/ + + + /*>>prefixed*/ + // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input + // Modernizr.prefixed('boxSizing') // 'MozBoxSizing' + + // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style. + // Return values will also be the camelCase variant, if you need to translate that to hypenated style use: + // + // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); + + // If you're trying to ascertain which transition end event to bind to, you might do something like... + // + // var transEndEventNames = { + // 'WebkitTransition' : 'webkitTransitionEnd', + // 'MozTransition' : 'transitionend', + // 'OTransition' : 'oTransitionEnd', + // 'msTransition' : 'MSTransitionEnd', + // 'transition' : 'transitionend' + // }, + // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; + + Modernizr.prefixed = function(prop, obj, elem){ + if(!obj) { + return testPropsAll(prop, 'pfx'); + } else { + // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame' + return testPropsAll(prop, obj, elem); + } + }; + /*>>prefixed*/ + + + /*>>cssclasses*/ + // Remove "no-js" class from element, if it exists: + docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') + + + // Add the new classes to the element. + (enableClasses ? ' js ' + classes.join(' ') : ''); + /*>>cssclasses*/ + + return Modernizr; + +})(this, this.document); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/module.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/module.js new file mode 100644 index 0000000..c3826e9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/module.js @@ -0,0 +1,5 @@ +"use strict"; +var universe = require('./universe'); +universe.start(); +console.log('The answer is ' + universe.answer); +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/netlog.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/netlog.js new file mode 100644 index 0000000..0418c23 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/netlog.js @@ -0,0 +1,26 @@ +"use strict"; +var page = require('webpage').create(), + system = require('system'), + address; + +if (system.args.length === 1) { + console.log('Usage: netlog.js '); + phantom.exit(1); +} else { + address = system.args[1]; + + page.onResourceRequested = function (req) { + console.log('requested: ' + JSON.stringify(req, undefined, 4)); + }; + + page.onResourceReceived = function (res) { + console.log('received: ' + JSON.stringify(res, undefined, 4)); + }; + + page.open(address, function (status) { + if (status !== 'success') { + console.log('FAIL to load the address'); + } + phantom.exit(); + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/netsniff.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/netsniff.js new file mode 100644 index 0000000..4655a36 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/netsniff.js @@ -0,0 +1,144 @@ +"use strict"; +if (!Date.prototype.toISOString) { + Date.prototype.toISOString = function () { + function pad(n) { return n < 10 ? '0' + n : n; } + function ms(n) { return n < 10 ? '00'+ n : n < 100 ? '0' + n : n } + return this.getFullYear() + '-' + + pad(this.getMonth() + 1) + '-' + + pad(this.getDate()) + 'T' + + pad(this.getHours()) + ':' + + pad(this.getMinutes()) + ':' + + pad(this.getSeconds()) + '.' + + ms(this.getMilliseconds()) + 'Z'; + } +} + +function createHAR(address, title, startTime, resources) +{ + var entries = []; + + resources.forEach(function (resource) { + var request = resource.request, + startReply = resource.startReply, + endReply = resource.endReply; + + if (!request || !startReply || !endReply) { + return; + } + + // Exclude Data URI from HAR file because + // they aren't included in specification + if (request.url.match(/(^data:image\/.*)/i)) { + return; + } + + entries.push({ + startedDateTime: request.time.toISOString(), + time: endReply.time - request.time, + request: { + method: request.method, + url: request.url, + httpVersion: "HTTP/1.1", + cookies: [], + headers: request.headers, + queryString: [], + headersSize: -1, + bodySize: -1 + }, + response: { + status: endReply.status, + statusText: endReply.statusText, + httpVersion: "HTTP/1.1", + cookies: [], + headers: endReply.headers, + redirectURL: "", + headersSize: -1, + bodySize: startReply.bodySize, + content: { + size: startReply.bodySize, + mimeType: endReply.contentType + } + }, + cache: {}, + timings: { + blocked: 0, + dns: -1, + connect: -1, + send: 0, + wait: startReply.time - request.time, + receive: endReply.time - startReply.time, + ssl: -1 + }, + pageref: address + }); + }); + + return { + log: { + version: '1.2', + creator: { + name: "PhantomJS", + version: phantom.version.major + '.' + phantom.version.minor + + '.' + phantom.version.patch + }, + pages: [{ + startedDateTime: startTime.toISOString(), + id: address, + title: title, + pageTimings: { + onLoad: page.endTime - page.startTime + } + }], + entries: entries + } + }; +} + +var page = require('webpage').create(), + system = require('system'); + +if (system.args.length === 1) { + console.log('Usage: netsniff.js '); + phantom.exit(1); +} else { + + page.address = system.args[1]; + page.resources = []; + + page.onLoadStarted = function () { + page.startTime = new Date(); + }; + + page.onResourceRequested = function (req) { + page.resources[req.id] = { + request: req, + startReply: null, + endReply: null + }; + }; + + page.onResourceReceived = function (res) { + if (res.stage === 'start') { + page.resources[res.id].startReply = res; + } + if (res.stage === 'end') { + page.resources[res.id].endReply = res; + } + }; + + page.open(page.address, function (status) { + var har; + if (status !== 'success') { + console.log('FAIL to load the address'); + phantom.exit(1); + } else { + page.endTime = new Date(); + page.title = page.evaluate(function () { + return document.title; + }); + har = createHAR(page.address, page.title, page.startTime, page.resources); + console.log(JSON.stringify(har, undefined, 4)); + phantom.exit(); + } + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/openurlwithproxy.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/openurlwithproxy.js new file mode 100644 index 0000000..30b6ffd --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/openurlwithproxy.js @@ -0,0 +1,25 @@ +"use strict"; +var page = require('webpage').create(), + system = require('system'), + host, port, address; + +if (system.args.length < 4) { + console.log('Usage: openurlwithproxy.js '); + phantom.exit(1); +} else { + host = system.args[1]; + port = system.args[2]; + address = system.args[3]; + phantom.setProxy(host, port, 'manual', '', ''); + page.open(address, function (status) { + if (status !== 'success') { + console.log('FAIL to load the address "' + + address + '" using proxy "' + host + ':' + port + '"'); + } else { + console.log('Page title is ' + page.evaluate(function () { + return document.title; + })); + } + phantom.exit(); + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/outputEncoding.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/outputEncoding.js new file mode 100644 index 0000000..82af244 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/outputEncoding.js @@ -0,0 +1,17 @@ +"use strict"; +function helloWorld() { + console.log(phantom.outputEncoding + ": こんにちは、世界!"); +} + +console.log("Using default encoding..."); +helloWorld(); + +console.log("\nUsing other encodings..."); + +var encodings = ["euc-jp", "sjis", "utf8", "System"]; +for (var i = 0; i < encodings.length; i++) { + phantom.outputEncoding = encodings[i]; + helloWorld(); +} + +phantom.exit() diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/page_events.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/page_events.js new file mode 100644 index 0000000..ef6563e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/page_events.js @@ -0,0 +1,147 @@ +// The purpose of this is to show how and when events fire, considering 5 steps +// happening as follows: +// +// 1. Load URL +// 2. Load same URL, but adding an internal FRAGMENT to it +// 3. Click on an internal Link, that points to another internal FRAGMENT +// 4. Click on an external Link, that will send the page somewhere else +// 5. Close page +// +// Take particular care when going through the output, to understand when +// things happen (and in which order). Particularly, notice what DOESN'T +// happen during step 3. +// +// If invoked with "-v" it will print out the Page Resources as they are +// Requested and Received. +// +// NOTE.1: The "onConsoleMessage/onAlert/onPrompt/onConfirm" events are +// registered but not used here. This is left for you to have fun with. +// NOTE.2: This script is not here to teach you ANY JavaScript. It's aweful! +// NOTE.3: Main audience for this are people new to PhantomJS. + +"use strict"; +var sys = require("system"), + page = require("webpage").create(), + logResources = false, + step1url = "http://en.wikipedia.org/wiki/DOM_events", + step2url = "http://en.wikipedia.org/wiki/DOM_events#Event_flow"; + +if (sys.args.length > 1 && sys.args[1] === "-v") { + logResources = true; +} + +function printArgs() { + var i, ilen; + for (i = 0, ilen = arguments.length; i < ilen; ++i) { + console.log(" arguments[" + i + "] = " + JSON.stringify(arguments[i])); + } + console.log(""); +} + +//////////////////////////////////////////////////////////////////////////////// + +page.onInitialized = function() { + console.log("page.onInitialized"); + printArgs.apply(this, arguments); +}; +page.onLoadStarted = function() { + console.log("page.onLoadStarted"); + printArgs.apply(this, arguments); +}; +page.onLoadFinished = function() { + console.log("page.onLoadFinished"); + printArgs.apply(this, arguments); +}; +page.onUrlChanged = function() { + console.log("page.onUrlChanged"); + printArgs.apply(this, arguments); +}; +page.onNavigationRequested = function() { + console.log("page.onNavigationRequested"); + printArgs.apply(this, arguments); +}; +page.onRepaintRequested = function() { + console.log("page.onRepaintRequested"); + printArgs.apply(this, arguments); +}; + +if (logResources === true) { + page.onResourceRequested = function() { + console.log("page.onResourceRequested"); + printArgs.apply(this, arguments); + }; + page.onResourceReceived = function() { + console.log("page.onResourceReceived"); + printArgs.apply(this, arguments); + }; +} + +page.onClosing = function() { + console.log("page.onClosing"); + printArgs.apply(this, arguments); +}; + +// window.console.log(msg); +page.onConsoleMessage = function() { + console.log("page.onConsoleMessage"); + printArgs.apply(this, arguments); +}; + +// window.alert(msg); +page.onAlert = function() { + console.log("page.onAlert"); + printArgs.apply(this, arguments); +}; +// var confirmed = window.confirm(msg); +page.onConfirm = function() { + console.log("page.onConfirm"); + printArgs.apply(this, arguments); +}; +// var user_value = window.prompt(msg, default_value); +page.onPrompt = function() { + console.log("page.onPrompt"); + printArgs.apply(this, arguments); +}; + +//////////////////////////////////////////////////////////////////////////////// + +setTimeout(function() { + console.log(""); + console.log("### STEP 1: Load '" + step1url + "'"); + page.open(step1url); +}, 0); + +setTimeout(function() { + console.log(""); + console.log("### STEP 2: Load '" + step2url + "' (load same URL plus FRAGMENT)"); + page.open(step2url); +}, 5000); + +setTimeout(function() { + console.log(""); + console.log("### STEP 3: Click on page internal link (aka FRAGMENT)"); + page.evaluate(function() { + var ev = document.createEvent("MouseEvents"); + ev.initEvent("click", true, true); + document.querySelector("a[href='#Event_object']").dispatchEvent(ev); + }); +}, 10000); + +setTimeout(function() { + console.log(""); + console.log("### STEP 4: Click on page external link"); + page.evaluate(function() { + var ev = document.createEvent("MouseEvents"); + ev.initEvent("click", true, true); + document.querySelector("a[title='JavaScript']").dispatchEvent(ev); + }); +}, 15000); + +setTimeout(function() { + console.log(""); + console.log("### STEP 5: Close page and shutdown (with a delay)"); + page.close(); + setTimeout(function(){ + phantom.exit(); + }, 100); +}, 20000); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/pagecallback.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/pagecallback.js new file mode 100644 index 0000000..a14b57e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/pagecallback.js @@ -0,0 +1,18 @@ +"use strict"; +var p = require("webpage").create(); + +p.onConsoleMessage = function(msg) { console.log(msg); }; + +// Calls to "callPhantom" within the page 'p' arrive here +p.onCallback = function(msg) { + console.log("Received by the 'phantom' main context: "+msg); + return "Hello there, I'm coming to you from the 'phantom' context instead"; +}; + +p.evaluate(function() { + // Return-value of the "onCallback" handler arrive here + var callbackResponse = window.callPhantom("Hello, I'm coming to you from the 'page' context"); + console.log("Received by the 'page' context: "+callbackResponse); +}); + +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/phantomwebintro.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/phantomwebintro.js new file mode 100644 index 0000000..6cb4e46 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/phantomwebintro.js @@ -0,0 +1,21 @@ +// Read the Phantom webpage '#intro' element text using jQuery and "includeJs" + +"use strict"; +var page = require('webpage').create(); + +page.onConsoleMessage = function(msg) { + console.log(msg); +}; + +page.open("http://phantomjs.org/", function(status) { + if (status === "success") { + page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { + page.evaluate(function() { + console.log("$(\".explanation\").text() -> " + $(".explanation").text()); + }); + phantom.exit(0); + }); + } else { + phantom.exit(1); + } +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/post.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/post.js new file mode 100644 index 0000000..4b998b8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/post.js @@ -0,0 +1,15 @@ +// Example using HTTP POST operation + +"use strict"; +var page = require('webpage').create(), + server = 'http://posttestserver.com/post.php?dump', + data = 'universe=expanding&answer=42'; + +page.open(server, 'post', data, function (status) { + if (status !== 'success') { + console.log('Unable to post!'); + } else { + console.log(page.content); + } + phantom.exit(); +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/postjson.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/postjson.js new file mode 100644 index 0000000..b02f430 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/postjson.js @@ -0,0 +1,19 @@ +// Example using HTTP POST operation + +"use strict"; +var page = require('webpage').create(), + server = 'http://posttestserver.com/post.php?dump', + data = '{"universe": "expanding", "answer": 42}'; + +var headers = { + "Content-Type": "application/json" +} + +page.open(server, 'post', data, headers, function (status) { + if (status !== 'success') { + console.log('Unable to post!'); + } else { + console.log(page.content); + } + phantom.exit(); +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/postserver.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/postserver.js new file mode 100644 index 0000000..e854701 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/postserver.js @@ -0,0 +1,35 @@ +// Example using HTTP POST operation + +"use strict"; +var page = require('webpage').create(), + server = require('webserver').create(), + system = require('system'), + data = 'universe=expanding&answer=42'; + +if (system.args.length !== 2) { + console.log('Usage: postserver.js '); + phantom.exit(1); +} + +var port = system.args[1]; + +service = server.listen(port, function (request, response) { + console.log('Request received at ' + new Date()); + + response.statusCode = 200; + response.headers = { + 'Cache': 'no-cache', + 'Content-Type': 'text/plain;charset=utf-8' + }; + response.write(JSON.stringify(request, null, 4)); + response.close(); +}); + +page.open('http://localhost:' + port + '/', 'post', data, function (status) { + if (status !== 'success') { + console.log('Unable to post!'); + } else { + console.log(page.plainText); + } + phantom.exit(); +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printenv.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printenv.js new file mode 100644 index 0000000..6baea03 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printenv.js @@ -0,0 +1,10 @@ +var system = require('system'), + env = system.env, + key; + +for (key in env) { + if (env.hasOwnProperty(key)) { + console.log(key + '=' + env[key]); + } +} +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printheaderfooter.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printheaderfooter.js new file mode 100644 index 0000000..286af2b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printheaderfooter.js @@ -0,0 +1,90 @@ +"use strict"; +var page = require('webpage').create(), + system = require('system'); + +function someCallback(pageNum, numPages) { + return "

someCallback: " + pageNum + " / " + numPages + "

"; +} + +if (system.args.length < 3) { + console.log('Usage: printheaderfooter.js URL filename'); + phantom.exit(1); +} else { + var address = system.args[1]; + var output = system.args[2]; + page.viewportSize = { width: 600, height: 600 }; + page.paperSize = { + format: 'A4', + margin: "1cm", + /* default header/footer for pages that don't have custom overwrites (see below) */ + header: { + height: "1cm", + contents: phantom.callback(function(pageNum, numPages) { + if (pageNum == 1) { + return ""; + } + return "

Header " + pageNum + " / " + numPages + "

"; + }) + }, + footer: { + height: "1cm", + contents: phantom.callback(function(pageNum, numPages) { + if (pageNum == numPages) { + return ""; + } + return "

Footer " + pageNum + " / " + numPages + "

"; + }) + } + }; + page.open(address, function (status) { + if (status !== 'success') { + console.log('Unable to load the address!'); + } else { + /* check whether the loaded page overwrites the header/footer setting, + i.e. whether a PhantomJSPriting object exists. Use that then instead + of our defaults above. + + example: + + + + +

asdfadsf

asdfadsfycvx

+ + */ + if (page.evaluate(function(){return typeof PhantomJSPrinting == "object";})) { + paperSize = page.paperSize; + paperSize.header.height = page.evaluate(function() { + return PhantomJSPrinting.header.height; + }); + paperSize.header.contents = phantom.callback(function(pageNum, numPages) { + return page.evaluate(function(pageNum, numPages){return PhantomJSPrinting.header.contents(pageNum, numPages);}, pageNum, numPages); + }); + paperSize.footer.height = page.evaluate(function() { + return PhantomJSPrinting.footer.height; + }); + paperSize.footer.contents = phantom.callback(function(pageNum, numPages) { + return page.evaluate(function(pageNum, numPages){return PhantomJSPrinting.footer.contents(pageNum, numPages);}, pageNum, numPages); + }); + page.paperSize = paperSize; + console.log(page.paperSize.header.height); + console.log(page.paperSize.footer.height); + } + window.setTimeout(function () { + page.render(output); + phantom.exit(); + }, 200); + } + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printmargins.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printmargins.js new file mode 100644 index 0000000..57c1acc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/printmargins.js @@ -0,0 +1,36 @@ +"use strict"; +var page = require('webpage').create(), + system = require('system'); + +if (system.args.length < 7) { + console.log('Usage: printmargins.js URL filename LEFT TOP RIGHT BOTTOM'); + console.log(' margin examples: "1cm", "10px", "7mm", "5in"'); + phantom.exit(1); +} else { + var address = system.args[1]; + var output = system.args[2]; + var marginLeft = system.args[3]; + var marginTop = system.args[4]; + var marginRight = system.args[5]; + var marginBottom = system.args[6]; + page.viewportSize = { width: 600, height: 600 }; + page.paperSize = { + format: 'A4', + margin: { + left: marginLeft, + top: marginTop, + right: marginRight, + bottom: marginBottom + } + }; + page.open(address, function (status) { + if (status !== 'success') { + console.log('Unable to load the address!'); + } else { + window.setTimeout(function () { + page.render(output); + phantom.exit(); + }, 200); + } + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/rasterize.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/rasterize.js new file mode 100644 index 0000000..c0950de --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/rasterize.js @@ -0,0 +1,49 @@ +"use strict"; +var page = require('webpage').create(), + system = require('system'), + address, output, size; + +if (system.args.length < 3 || system.args.length > 5) { + console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]'); + console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"'); + console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px'); + console.log(' "800px*600px" window, clipped to 800x600'); + phantom.exit(1); +} else { + address = system.args[1]; + output = system.args[2]; + page.viewportSize = { width: 600, height: 600 }; + if (system.args.length > 3 && system.args[2].substr(-4) === ".pdf") { + size = system.args[3].split('*'); + page.paperSize = size.length === 2 ? { width: size[0], height: size[1], margin: '0px' } + : { format: system.args[3], orientation: 'portrait', margin: '1cm' }; + } else if (system.args.length > 3 && system.args[3].substr(-2) === "px") { + size = system.args[3].split('*'); + if (size.length === 2) { + pageWidth = parseInt(size[0], 10); + pageHeight = parseInt(size[1], 10); + page.viewportSize = { width: pageWidth, height: pageHeight }; + page.clipRect = { top: 0, left: 0, width: pageWidth, height: pageHeight }; + } else { + console.log("size:", system.args[3]); + pageWidth = parseInt(system.args[3], 10); + pageHeight = parseInt(pageWidth * 3/4, 10); // it's as good an assumption as any + console.log ("pageHeight:",pageHeight); + page.viewportSize = { width: pageWidth, height: pageHeight }; + } + } + if (system.args.length > 4) { + page.zoomFactor = system.args[4]; + } + page.open(address, function (status) { + if (status !== 'success') { + console.log('Unable to load the address!'); + phantom.exit(1); + } else { + window.setTimeout(function () { + page.render(output); + phantom.exit(); + }, 200); + } + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/render_multi_url.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/render_multi_url.js new file mode 100644 index 0000000..9f7348d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/render_multi_url.js @@ -0,0 +1,74 @@ +// Render Multiple URLs to file + +"use strict"; +var RenderUrlsToFile, arrayOfUrls, system; + +system = require("system"); + +/* +Render given urls +@param array of URLs to render +@param callbackPerUrl Function called after finishing each URL, including the last URL +@param callbackFinal Function called after finishing everything +*/ +RenderUrlsToFile = function(urls, callbackPerUrl, callbackFinal) { + var getFilename, next, page, retrieve, urlIndex, webpage; + urlIndex = 0; + webpage = require("webpage"); + page = null; + getFilename = function() { + return "rendermulti-" + urlIndex + ".png"; + }; + next = function(status, url, file) { + page.close(); + callbackPerUrl(status, url, file); + return retrieve(); + }; + retrieve = function() { + var url; + if (urls.length > 0) { + url = urls.shift(); + urlIndex++; + page = webpage.create(); + page.viewportSize = { + width: 800, + height: 600 + }; + page.settings.userAgent = "Phantom.js bot"; + return page.open("http://" + url, function(status) { + var file; + file = getFilename(); + if (status === "success") { + return window.setTimeout((function() { + page.render(file); + return next(status, url, file); + }), 200); + } else { + return next(status, url, file); + } + }); + } else { + return callbackFinal(); + } + }; + return retrieve(); +}; + +arrayOfUrls = null; + +if (system.args.length > 1) { + arrayOfUrls = Array.prototype.slice.call(system.args, 1); +} else { + console.log("Usage: phantomjs render_multi_url.js [domain.name1, domain.name2, ...]"); + arrayOfUrls = ["www.google.com", "www.bbc.co.uk", "phantomjs.org"]; +} + +RenderUrlsToFile(arrayOfUrls, (function(status, url, file) { + if (status !== "success") { + return console.log("Unable to render '" + url + "'"); + } else { + return console.log("Rendered '" + url + "' at '" + file + "'"); + } +}), function() { + return phantom.exit(); +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/responsive-screenshot.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/responsive-screenshot.js new file mode 100644 index 0000000..35aac60 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/responsive-screenshot.js @@ -0,0 +1,181 @@ +/** + * Captures the full height document even if it's not showing on the screen or captures with the provided range of screen sizes. + * + * A basic example for taking a screen shot using phantomjs which is sampled for https://nodejs-dersleri.github.io/ + * + * usage : phantomjs responsive-screenshot.js {url} [output format] [doClipping] + * + * examples > + * phantomjs responsive-screenshot.js https://nodejs-dersleri.github.io/ + * phantomjs responsive-screenshot.js https://nodejs-dersleri.github.io/ pdf + * phantomjs responsive-screenshot.js https://nodejs-dersleri.github.io/ true + * phantomjs responsive-screenshot.js https://nodejs-dersleri.github.io/ png true + * + * @author Salih sagdilek + */ + +/** + * http://phantomjs.org/api/system/property/args.html + * + * Queries and returns a list of the command-line arguments. + * The first one is always the script name, which is then followed by the subsequent arguments. + */ +var args = require('system').args; +/** + * http://phantomjs.org/api/fs/ + * + * file system api + */ +var fs = require('fs'); + +/** + * http://phantomjs.org/api/webpage/ + * + * Web page api + */ +var page = new WebPage(); + +/** + * if url address does not exist, exit phantom + */ +if ( 1 === args.length ) { + console.log('Url address is required'); + phantom.exit(); +} + +/** + * setup url address (second argument); + */ +var urlAddress = args[1].toLowerCase(); + + +/** + * set output extension format + * @type {*} + */ +var ext = getFileExtension(); + +/** + * set if clipping ? + * @type {boolean} + */ +var clipping = getClipping(); + +/** + * setup viewports + */ +var viewports = [ + { + width : 1200, + height : 800 + }, + { + width : 1024, + height : 768 + }, + { + width : 768, + height : 1024 + }, + { + width : 480, + height : 640 + }, + { + width : 320, + height : 480 + } +]; + +page.open(urlAddress, function (status) { + if ( 'success' !== status ) { + console.log('Unable to load the url address!'); + } else { + var folder = urlToDir(urlAddress); + var output, key; + + function render(n) { + if ( !!n ) { + key = n - 1; + page.viewportSize = viewports[key]; + if ( clipping ) { + page.clipRect = viewports[key]; + } + output = folder + "/" + getFileName(viewports[key]); + console.log('Saving ' + output); + page.render(output); + render(key); + } + } + + render(viewports.length); + } + phantom.exit(); +}); + +/** + * filename generator helper + * @param viewport + * @returns {string} + */ +function getFileName(viewport) { + var d = new Date(); + var date = [ + d.getUTCFullYear(), + d.getUTCMonth() + 1, + d.getUTCDate() + ]; + var time = [ + d.getHours() <= 9 ? '0' + d.getHours() : d.getHours(), + d.getMinutes() <= 9 ? '0' + d.getMinutes() : d.getMinutes(), + d.getSeconds() <= 9 ? '0' + d.getSeconds() : d.getSeconds(), + d.getMilliseconds() + ]; + var resolution = viewport.width + (clipping ? "x" + viewport.height : ''); + + return date.join('-') + '_' + time.join('-') + "_" + resolution + ext; +} + +/** + * output extension format helper + * + * @returns {*} + */ +function getFileExtension() { + if ( 'true' != args[2] && !!args[2] ) { + return '.' + args[2]; + } + return '.png'; +} + +/** + * check if clipping + * + * @returns {boolean} + */ +function getClipping() { + if ( 'true' == args[3] ) { + return !!args[3]; + } else if ( 'true' == args[2] ) { + return !!args[2]; + } + return false; +} + +/** + * url to directory helper + * + * @param url + * @returns {string} + */ +function urlToDir(url) { + var dir = url + .replace(/^(http|https):\/\//, '') + .replace(/\/$/, ''); + + if ( !fs.makeTree(dir) ) { + console.log('"' + dir + '" is NOT created.'); + phantom.exit(); + } + return dir; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-jasmine.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-jasmine.js new file mode 100644 index 0000000..652bb61 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-jasmine.js @@ -0,0 +1,92 @@ +"use strict"; +var system = require('system'); + +/** + * Wait until the test condition is true or a timeout occurs. Useful for waiting + * on a server response or for a ui change (fadeIn, etc.) to occur. + * + * @param testFx javascript condition that evaluates to a boolean, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param onReady what to do when testFx condition is fulfilled, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. + */ +function waitFor(testFx, onReady, timeOutMillis) { + var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001, //< Default Max Timeout is 3s + start = new Date().getTime(), + condition = false, + interval = setInterval(function() { + if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { + // If not time-out yet and condition not yet fulfilled + condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code + } else { + if(!condition) { + // If condition still not fulfilled (timeout but condition is 'false') + console.log("'waitFor()' timeout"); + phantom.exit(1); + } else { + // Condition fulfilled (timeout and/or condition is 'true') + console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); + typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled + clearInterval(interval); //< Stop this interval + } + } + }, 100); //< repeat check every 100ms +}; + + +if (system.args.length !== 2) { + console.log('Usage: run-jasmine.js URL'); + phantom.exit(1); +} + +var page = require('webpage').create(); + +// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") +page.onConsoleMessage = function(msg) { + console.log(msg); +}; + +page.open(system.args[1], function(status){ + if (status !== "success") { + console.log("Unable to open " + system.args[1]); + phantom.exit(1); + } else { + waitFor(function(){ + return page.evaluate(function(){ + return document.body.querySelector('.symbolSummary .pending') === null + }); + }, function(){ + var exitCode = page.evaluate(function(){ + try { + console.log(''); + console.log(document.body.querySelector('.description').innerText); + var list = document.body.querySelectorAll('.results > #details > .specDetail.failed'); + if (list && list.length > 0) { + console.log(''); + console.log(list.length + ' test(s) FAILED:'); + for (i = 0; i < list.length; ++i) { + var el = list[i], + desc = el.querySelector('.description'), + msg = el.querySelector('.resultMessage.fail'); + console.log(''); + console.log(desc.innerText); + console.log(msg.innerText); + console.log(''); + } + return 1; + } else { + console.log(document.body.querySelector('.alert > .passingAlert.bar').innerText); + return 0; + } + } catch (ex) { + console.log(ex); + return 1; + } + }); + phantom.exit(exitCode); + }); + } +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-jasmine2.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-jasmine2.js new file mode 100644 index 0000000..343117a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-jasmine2.js @@ -0,0 +1,94 @@ +"use strict"; +var system = require('system'); + +/** + * Wait until the test condition is true or a timeout occurs. Useful for waiting + * on a server response or for a ui change (fadeIn, etc.) to occur. + * + * @param testFx javascript condition that evaluates to a boolean, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param onReady what to do when testFx condition is fulfilled, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. + */ +function waitFor(testFx, onReady, timeOutMillis) { + var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001, //< Default Max Timeout is 3s + start = new Date().getTime(), + condition = false, + interval = setInterval(function() { + if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { + // If not time-out yet and condition not yet fulfilled + condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code + } else { + if(!condition) { + // If condition still not fulfilled (timeout but condition is 'false') + console.log("'waitFor()' timeout"); + phantom.exit(1); + } else { + // Condition fulfilled (timeout and/or condition is 'true') + console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); + typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled + clearInterval(interval); //< Stop this interval + } + } + }, 100); //< repeat check every 100ms +}; + + +if (system.args.length !== 2) { + console.log('Usage: run-jasmine2.js URL'); + phantom.exit(1); +} + +var page = require('webpage').create(); + +// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") +page.onConsoleMessage = function(msg) { + console.log(msg); +}; + +page.open(system.args[1], function(status){ + if (status !== "success") { + console.log("Unable to access network"); + phantom.exit(); + } else { + waitFor(function(){ + return page.evaluate(function(){ + return (document.body.querySelector('.symbolSummary .pending') === null && + document.body.querySelector('.duration') !== null); + }); + }, function(){ + var exitCode = page.evaluate(function(){ + console.log(''); + + var title = 'Jasmine'; + var version = document.body.querySelector('.version').innerText; + var duration = document.body.querySelector('.duration').innerText; + var banner = title + ' ' + version + ' ' + duration; + console.log(banner); + + var list = document.body.querySelectorAll('.results > .failures > .spec-detail.failed'); + if (list && list.length > 0) { + console.log(''); + console.log(list.length + ' test(s) FAILED:'); + for (i = 0; i < list.length; ++i) { + var el = list[i], + desc = el.querySelector('.description'), + msg = el.querySelector('.messages > .result-message'); + console.log(''); + console.log(desc.innerText); + console.log(msg.innerText); + console.log(''); + } + return 1; + } else { + console.log(document.body.querySelector('.alert > .bar.passed,.alert > .bar.skipped').innerText); + return 0; + } + }); + phantom.exit(exitCode); + }); + } +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-qunit.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-qunit.js new file mode 100644 index 0000000..d3cbf5b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/run-qunit.js @@ -0,0 +1,77 @@ +"use strict"; +var system = require('system'); + +/** + * Wait until the test condition is true or a timeout occurs. Useful for waiting + * on a server response or for a ui change (fadeIn, etc.) to occur. + * + * @param testFx javascript condition that evaluates to a boolean, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param onReady what to do when testFx condition is fulfilled, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. + */ +function waitFor(testFx, onReady, timeOutMillis) { + var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001, //< Default Max Timout is 3s + start = new Date().getTime(), + condition = false, + interval = setInterval(function() { + if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { + // If not time-out yet and condition not yet fulfilled + condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code + } else { + if(!condition) { + // If condition still not fulfilled (timeout but condition is 'false') + console.log("'waitFor()' timeout"); + phantom.exit(1); + } else { + // Condition fulfilled (timeout and/or condition is 'true') + console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); + typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled + clearInterval(interval); //< Stop this interval + } + } + }, 100); //< repeat check every 250ms +}; + + +if (system.args.length !== 2) { + console.log('Usage: run-qunit.js URL'); + phantom.exit(1); +} + +var page = require('webpage').create(); + +// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") +page.onConsoleMessage = function(msg) { + console.log(msg); +}; + +page.open(system.args[1], function(status){ + if (status !== "success") { + console.log("Unable to access network"); + phantom.exit(1); + } else { + waitFor(function(){ + return page.evaluate(function(){ + var el = document.getElementById('qunit-testresult'); + if (el && el.innerText.match('completed')) { + return true; + } + return false; + }); + }, function(){ + var failedNum = page.evaluate(function(){ + var el = document.getElementById('qunit-testresult'); + console.log(el.innerText); + try { + return el.getElementsByClassName('failed')[0].innerHTML; + } catch (e) { } + return 10000; + }); + phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0); + }); + } +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/scandir.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/scandir.js new file mode 100644 index 0000000..7394367 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/scandir.js @@ -0,0 +1,24 @@ +// List all the files in a Tree of Directories + +"use strict"; +var system = require('system'); + +if (system.args.length !== 2) { + console.log("Usage: phantomjs scandir.js DIRECTORY_TO_SCAN"); + phantom.exit(1); +} + +var scanDirectory = function (path) { + var fs = require('fs'); + if (fs.exists(path) && fs.isFile(path)) { + console.log(path); + } else if (fs.isDirectory(path)) { + fs.list(path).forEach(function (e) { + if ( e !== "." && e !== ".." ) { //< Avoid loops + scanDirectory(path + '/' + e); + } + }); + } +}; +scanDirectory(system.args[1]); +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/server.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/server.js new file mode 100644 index 0000000..ff5ef3d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/server.js @@ -0,0 +1,44 @@ +"use strict"; +var page = require('webpage').create(); +var server = require('webserver').create(); +var system = require('system'); +var host, port; + +if (system.args.length !== 2) { + console.log('Usage: server.js '); + phantom.exit(1); +} else { + port = system.args[1]; + var listening = server.listen(port, function (request, response) { + console.log("GOT HTTP REQUEST"); + console.log(JSON.stringify(request, null, 4)); + + // we set the headers here + response.statusCode = 200; + response.headers = {"Cache": "no-cache", "Content-Type": "text/html"}; + // this is also possible: + response.setHeader("foo", "bar"); + // now we write the body + // note: the headers above will now be sent implictly + response.write("YES!"); + // note: writeBody can be called multiple times + response.write("

pretty cool :)"); + response.close(); + }); + if (!listening) { + console.log("could not create web server listening on port " + port); + phantom.exit(); + } + var url = "http://localhost:" + port + "/foo/bar.php?asdf=true"; + console.log("SENDING REQUEST TO:"); + console.log(url); + page.open(url, function (status) { + if (status !== 'success') { + console.log('FAIL to load the address'); + } else { + console.log("GOT REPLY FROM SERVER:"); + console.log(page.content); + } + phantom.exit(); + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/serverkeepalive.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/serverkeepalive.js new file mode 100644 index 0000000..00b462a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/serverkeepalive.js @@ -0,0 +1,35 @@ +"use strict"; +var port, server, service, + system = require('system'); + +if (system.args.length !== 2) { + console.log('Usage: serverkeepalive.js '); + phantom.exit(1); +} else { + port = system.args[1]; + server = require('webserver').create(); + + service = server.listen(port, { keepAlive: true }, function (request, response) { + console.log('Request at ' + new Date()); + console.log(JSON.stringify(request, null, 4)); + + var body = JSON.stringify(request, null, 4); + response.statusCode = 200; + response.headers = { + 'Cache': 'no-cache', + 'Content-Type': 'text/plain', + 'Connection': 'Keep-Alive', + 'Keep-Alive': 'timeout=5, max=100', + 'Content-Length': body.length + }; + response.write(body); + response.close(); + }); + + if (service) { + console.log('Web server running on port ' + port); + } else { + console.log('Error: Could not create web server listening on port ' + port); + phantom.exit(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/simpleserver.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/simpleserver.js new file mode 100644 index 0000000..ba4779a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/simpleserver.js @@ -0,0 +1,43 @@ +"use strict"; +var port, server, service, + system = require('system'); + +if (system.args.length !== 2) { + console.log('Usage: simpleserver.js '); + phantom.exit(1); +} else { + port = system.args[1]; + server = require('webserver').create(); + + service = server.listen(port, function (request, response) { + + console.log('Request at ' + new Date()); + console.log(JSON.stringify(request, null, 4)); + + response.statusCode = 200; + response.headers = { + 'Cache': 'no-cache', + 'Content-Type': 'text/html' + }; + response.write(''); + response.write(''); + response.write('Hello, world!'); + response.write(''); + response.write(''); + response.write('

This is from PhantomJS web server.

'); + response.write('

Request data:

'); + response.write('
');
+        response.write(JSON.stringify(request, null, 4));
+        response.write('
'); + response.write(''); + response.write(''); + response.close(); + }); + + if (service) { + console.log('Web server running on port ' + port); + } else { + console.log('Error: Could not create web server listening on port ' + port); + phantom.exit(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/sleepsort.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/sleepsort.js new file mode 100644 index 0000000..7959799 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/sleepsort.js @@ -0,0 +1,27 @@ +// sleepsort.js - Sort integers from the commandline in a very ridiculous way: leveraging timeouts :P + +"use strict"; +var system = require('system'); + +function sleepSort(array, callback) { + var sortedCount = 0, + i, len; + for ( i = 0, len = array.length; i < len; ++i ) { + setTimeout((function(j){ + return function() { + console.log(array[j]); + ++sortedCount; + (len === sortedCount) && callback(); + }; + }(i)), array[i]); + } +} + +if ( system.args.length < 2 ) { + console.log("Usage: phantomjs sleepsort.js PUT YOUR INTEGERS HERE SEPARATED BY SPACES"); + phantom.exit(1); +} else { + sleepSort(system.args.slice(1), function() { + phantom.exit(); + }); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/stdin-stdout-stderr.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/stdin-stdout-stderr.js new file mode 100644 index 0000000..4161ba3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/stdin-stdout-stderr.js @@ -0,0 +1,19 @@ +"use strict"; +var system = require('system'); + +system.stdout.write('Hello, system.stdout.write!'); +system.stdout.writeLine('\nHello, system.stdout.writeLine!'); + +system.stderr.write('Hello, system.stderr.write!'); +system.stderr.writeLine('\nHello, system.stderr.writeLine!'); + +system.stdout.writeLine('system.stdin.readLine(): '); +var line = system.stdin.readLine(); +system.stdout.writeLine(JSON.stringify(line)); + +// This is essentially a `readAll` +system.stdout.writeLine('system.stdin.read(5): (ctrl+D to end)'); +var input = system.stdin.read(5); +system.stdout.writeLine(JSON.stringify(input)); + +phantom.exit(0); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/universe.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/universe.js new file mode 100644 index 0000000..2655aaf --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/universe.js @@ -0,0 +1,10 @@ +// This is to be used by "module.js" (and "module.coffee") example(s). +// There should NOT be a "universe.coffee" as only 1 of the 2 would +// ever be loaded unless the file extension was specified. + +"use strict"; +exports.answer = 42; + +exports.start = function () { + console.log('Starting the universe....'); +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/unrandomize.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/unrandomize.js new file mode 100644 index 0000000..7f0e1bb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/unrandomize.js @@ -0,0 +1,25 @@ +// Modify global object at the page initialization. +// In this example, effectively Math.random() always returns 0.42. + +"use strict"; +var page = require('webpage').create(); + +page.onInitialized = function () { + page.evaluate(function () { + Math.random = function() { + return 42 / 100; + }; + }); +}; + +page.open('http://ariya.github.com/js/random/', function (status) { + var result; + if (status !== 'success') { + console.log('Network error.'); + } else { + console.log(page.evaluate(function () { + return document.getElementById('numbers').textContent; + })); + } + phantom.exit(); +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/useragent.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/useragent.js new file mode 100644 index 0000000..5a48091 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/useragent.js @@ -0,0 +1,15 @@ +"use strict"; +var page = require('webpage').create(); +console.log('The default user agent is ' + page.settings.userAgent); +page.settings.userAgent = 'SpecialAgent'; +page.open('http://www.httpuseragent.org', function (status) { + if (status !== 'success') { + console.log('Unable to access network'); + } else { + var ua = page.evaluate(function () { + return document.getElementById('myagent').innerText; + }); + console.log(ua); + } + phantom.exit(); +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/version.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/version.js new file mode 100644 index 0000000..dfda4f8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/version.js @@ -0,0 +1,6 @@ +"use strict"; +console.log('using PhantomJS version ' + + phantom.version.major + '.' + + phantom.version.minor + '.' + + phantom.version.patch); +phantom.exit(); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/waitfor.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/waitfor.js new file mode 100644 index 0000000..c470a92 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/waitfor.js @@ -0,0 +1,58 @@ +/** + * Wait until the test condition is true or a timeout occurs. Useful for waiting + * on a server response or for a ui change (fadeIn, etc.) to occur. + * + * @param testFx javascript condition that evaluates to a boolean, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param onReady what to do when testFx condition is fulfilled, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. + */ + +"use strict"; +function waitFor(testFx, onReady, timeOutMillis) { + var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3000, //< Default Max Timout is 3s + start = new Date().getTime(), + condition = false, + interval = setInterval(function() { + if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { + // If not time-out yet and condition not yet fulfilled + condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code + } else { + if(!condition) { + // If condition still not fulfilled (timeout but condition is 'false') + console.log("'waitFor()' timeout"); + phantom.exit(1); + } else { + // Condition fulfilled (timeout and/or condition is 'true') + console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); + typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled + clearInterval(interval); //< Stop this interval + } + } + }, 250); //< repeat check every 250ms +}; + + +var page = require('webpage').create(); + +// Open Twitter on 'sencha' profile and, onPageLoad, do... +page.open("http://twitter.com/#!/sencha", function (status) { + // Check for page load success + if (status !== "success") { + console.log("Unable to access network"); + } else { + // Wait for 'signin-dropdown' to be visible + waitFor(function() { + // Check in the page if a specific element is now visible + return page.evaluate(function() { + return $("#signin-dropdown").is(":visible"); + }); + }, function() { + console.log("The sign-in dialog should be visible now."); + phantom.exit(); + }); + } +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/walk_through_frames.js b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/walk_through_frames.js new file mode 100644 index 0000000..d0fabfc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/examples/walk_through_frames.js @@ -0,0 +1,73 @@ +"use strict"; +var p = require("webpage").create(); + +function pageTitle(page) { + return page.evaluate(function(){ + return window.document.title; + }); +} + +function setPageTitle(page, newTitle) { + page.evaluate(function(newTitle){ + window.document.title = newTitle; + }, newTitle); +} + +p.open("../test/webpage-spec-frames/index.html", function(status) { + console.log("pageTitle(): " + pageTitle(p)); + console.log("currentFrameName(): "+p.currentFrameName()); + console.log("childFramesCount(): "+p.childFramesCount()); + console.log("childFramesName(): "+p.childFramesName()); + console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); + console.log(""); + + console.log("p.switchToChildFrame(\"frame1\"): "+p.switchToChildFrame("frame1")); + console.log("pageTitle(): " + pageTitle(p)); + console.log("currentFrameName(): "+p.currentFrameName()); + console.log("childFramesCount(): "+p.childFramesCount()); + console.log("childFramesName(): "+p.childFramesName()); + console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); + console.log(""); + + console.log("p.switchToChildFrame(\"frame1-2\"): "+p.switchToChildFrame("frame1-2")); + console.log("pageTitle(): " + pageTitle(p)); + console.log("currentFrameName(): "+p.currentFrameName()); + console.log("childFramesCount(): "+p.childFramesCount()); + console.log("childFramesName(): "+p.childFramesName()); + console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); + console.log(""); + + console.log("p.switchToParentFrame(): "+p.switchToParentFrame()); + console.log("pageTitle(): " + pageTitle(p)); + console.log("currentFrameName(): "+p.currentFrameName()); + console.log("childFramesCount(): "+p.childFramesCount()); + console.log("childFramesName(): "+p.childFramesName()); + console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); + console.log(""); + + console.log("p.switchToChildFrame(0): "+p.switchToChildFrame(0)); + console.log("pageTitle(): " + pageTitle(p)); + console.log("currentFrameName(): "+p.currentFrameName()); + console.log("childFramesCount(): "+p.childFramesCount()); + console.log("childFramesName(): "+p.childFramesName()); + console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); + console.log(""); + + console.log("p.switchToMainFrame()"); p.switchToMainFrame(); + console.log("pageTitle(): " + pageTitle(p)); + console.log("currentFrameName(): "+p.currentFrameName()); + console.log("childFramesCount(): "+p.childFramesCount()); + console.log("childFramesName(): "+p.childFramesName()); + console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); + console.log(""); + + console.log("p.switchToChildFrame(\"frame2\"): "+p.switchToChildFrame("frame2")); + console.log("pageTitle(): " + pageTitle(p)); + console.log("currentFrameName(): "+p.currentFrameName()); + console.log("childFramesCount(): "+p.childFramesCount()); + console.log("childFramesName(): "+p.childFramesName()); + console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); + console.log(""); + + phantom.exit(); +}); diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/third-party.txt b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/third-party.txt new file mode 100644 index 0000000..48f74c4 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/phantomjs-2.1.1-windows/third-party.txt @@ -0,0 +1,36 @@ +This document contains the list of Third Party Software included with +PhantomJS, along with the license information. + +Third Party Software may impose additional restrictions and it is the +user's responsibility to ensure that they have met the licensing +requirements of PhantomJS and the relevant license of the Third Party +Software they are using. + +Qt - http://qt-project.org/ +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://qt-project.org/doc/qt-4.8/lgpl.html. + +WebKit - http://www.webkit.org/ +License: GNU Lesser General Public License (LGPL) version 2.1 and BSD. +Reference: http://www.webkit.org/coding/lgpl-license.html and +http://www.webkit.org/coding/bsd-license.html. + +Mongoose - https://github.com/cesanta/mongoose +License: MIT +Reference: https://github.com/cesanta/mongoose/commit/abbf27338ef554cce0281ac157aa71a9c1b82a55 + +OpenSSL - http://www.openssl.org/ +License: OpenSSL License, SSLeay License. +Reference: http://www.openssl.org/source/license.html. + +Linenoise - https://github.com/tadmarshall/linenoise +License: BSD. +Reference: https://github.com/tadmarshall/linenoise/blob/master/linenoise.h. + +QCommandLine - http://xf.iksaif.net/dev/qcommandline.html +License: GNU Lesser General Public License (LGPL) version 2.1. +Reference: http://dev.iksaif.net/projects/qcommandline/repository/revisions/master/entry/COPYING + +wkhtmlpdf - http://code.google.com/p/wkhtmltopdf/ +License: GNU Lesser General Public License (LGPL) +Reference: http://code.google.com/p/wkhtmltopdf/ diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Common.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Common.proto new file mode 100644 index 0000000..472eb63 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Common.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +import "User.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message Common { + string method = 1; + uint64 msgId = 2; + uint64 roomId = 3; + uint64 createTime = 4; + uint32 monitor = 5; + bool isShowMsg = 6; + string describe = 7; + // DisplayText displayText = 8; + uint64 foldType = 9; + uint64 anchorFoldType = 10; + uint64 priorityScore = 11; + string logId = 12; + string msgProcessFilterK = 13; + string msgProcessFilterV = 14; + User user = 15; + // Room room = 16; + uint64 anchorFoldTypeV2 = 17; + uint64 processAtSeiTimeMs = 18; + uint64 randomDispatchMs = 19; + bool isDispatch = 20; + uint32 channelId = 21; + uint64 diffSei2absSecond = 22; + uint64 anchorFoldDuration = 23; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DoubleLikeDetail.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DoubleLikeDetail.proto new file mode 100644 index 0000000..dd0c6b4 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DoubleLikeDetail.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message DoubleLikeDetail { + bool doubleFlag = 1; + uint32 seqId = 2; + uint32 renewalsNum = 3; + uint32 triggersNum = 4; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinCmdMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinCmdMsg.proto new file mode 100644 index 0000000..3635639 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinCmdMsg.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinCmdMsg { + string method = 1; + bytes payload = 2; + int64 msg_id = 3; + int32 msg_type = 4; + int64 offset = 5; + bool need_wrds_store = 6; + int64 wrds_version = 7; + string wrds_sub_key = 8; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastChatMessageMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastChatMessageMsg.proto new file mode 100644 index 0000000..01118d7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastChatMessageMsg.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "Image.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebcastChatMessageMsg { + Common common = 1; + User user = 2; + string content = 3; + bool visible_to_sender = 4; + Image background_image = 5; + string full_screen_text_color = 6; + Image background_image_v2 = 7; + // PublicAreaCommon public_area_common = 9; + Image gift_image = 10; + uint64 agree_msg_id = 11; + uint32 priority_level = 12; + // LandscapeAreaCommon landscape_area_common = 13; + uint64 event_time = 15; + bool send_review = 16; + bool from_intercom = 17; + bool intercom_hide_user_card = 18; + // repeated string chatTagsList = 19; + string chat_by = 20; + uint32 individual_chat_priority = 21; + // Text rtf_content = 22 ; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastControlMessageMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastControlMessageMsg.proto new file mode 100644 index 0000000..0800eea --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastControlMessageMsg.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +import "Common.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebcastControlMessageMsg { + Common common = 1; + int32 status = 2; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastGiftMessageMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastGiftMessageMsg.proto new file mode 100644 index 0000000..3116ec0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastGiftMessageMsg.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "TextEffect.proto"; +import "Text.proto"; +import "GiftIMPriority.proto"; +import "GiftStruct.proto"; +import "PublicAreaCommon.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebcastGiftMessageMsg { + Common common = 1; + uint64 long_gift_id = 2; + uint64 fan_ticket_count = 3; + uint64 group_count = 4; + uint64 repeat_count = 5; + uint64 combo_count = 6; + User user = 7; + User to_user = 8 ; + uint32 repeat_end = 9 ; + TextEffect text_effect = 10 ; + uint64 group_id = 11 ; + uint64 income_taskgifts = 12 ; + uint64 room_fan_ticket_count = 13 ; + GiftIMPriority priority = 14 ; + GiftStruct gift = 15 ; + string log_id = 16 ; + uint64 send_type = 17 ; + PublicAreaCommon public_area_common = 18 ; + Text tray_display_text = 19 ; + uint64 banned_display_effects = 20 ; + // GiftTrayInfo trayInfo = 21; + // AssetEffectMixInfo assetEffectMixInfo = 22; + bool display_for_self = 25; + string interact_gift_info = 26; + string diy_item_info = 27; + repeated uint64 min_asset_set_list = 28; + uint64 total_count = 29; + uint32 client_gift_source = 30; + // AnchorGiftData anchorGift = 31; + repeated uint64 to_user_ids_list = 32; + uint64 send_timet = 33; + uint64 force_display_effectst = 34; + string trace_id = 35; + uint64 effect_display_ts = 36; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastLikeMessageMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastLikeMessageMsg.proto new file mode 100644 index 0000000..61e4eca --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastLikeMessageMsg.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "DoubleLikeDetail.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebcastLikeMessageMsg { + Common common = 1; + uint64 count = 2; + uint64 total = 3; + uint64 color = 4; + User user = 5; + string icon = 6; + DoubleLikeDetail doubleLikeDetail = 7; + // DisplayControlInfo displayControlInfo = 8; + uint64 linkmicGuestUid = 9; + string scene = 10; + // PicoDisplayInfo picoDisplayInfo = 11; + // = 12; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastMemberMessageMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastMemberMessageMsg.proto new file mode 100644 index 0000000..dca9f28 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastMemberMessageMsg.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "Image.proto"; +import "Text.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebcastMemberMessageMsg { + Common common = 1; + User user = 2; + uint64 memberCount = 3; + User operator = 4; + bool isSetToAdmin = 5; + bool isTopUser = 6; + int64 rankScore = 7; + int64 topUserNo = 8; + int64 enterType = 9; + int64 action = 10; + string actionDescription = 11; + int64 userId = 12; + // EffectConfig effectConfig = 13; + string popStr = 14; + // EffectConfig enterEffectConfig = 15; + Image backgroundImage = 16; + Image backgroundImageV2 = 17; + Text anchorDisplayText = 18; + // PublicAreaCommon publicAreaCommon = 19; + int64 userEnterTipType = 20; + int64 anchorEnterTipType = 21; + map buriedPointMap = 22; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastRoomStatsMessageMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastRoomStatsMessageMsg.proto new file mode 100644 index 0000000..55e9371 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastRoomStatsMessageMsg.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +import "Common.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebcastRoomStatsMessageMsg { + Common common = 1; + string displayShort = 2; + string displayMiddle = 3; + string displayLong = 4; + int64 displayValue = 5; + int64 displayVersion = 6; + bool incremental = 7; + bool isHidden = 8; + int64 total = 9; + int64 displayType = 10; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastSocialMessageMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastSocialMessageMsg.proto new file mode 100644 index 0000000..ecbe1ea --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebcastSocialMessageMsg.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "PublicAreaCommon.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebcastSocialMessageMsg { + Common common = 1; + User user = 2; + int64 shareType = 3; + int64 action = 4; + string shareTarget = 5; + int64 followCount = 6; + PublicAreaCommon publicAreaCommon = 7; +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebsocketFrame.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebsocketFrame.proto new file mode 100644 index 0000000..f1f6d32 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebsocketFrame.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +message DouyinWebsocketFrame { + uint64 seq_id = 1; + uint64 log_id = 2; + uint64 service = 3; + uint64 method = 4; + map headers_list = 5; + string payload_encoding = 6; + string payload_type = 7; + bytes payload = 8; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebsocketFrameMsg.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebsocketFrameMsg.proto new file mode 100644 index 0000000..d7c044a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/DouyinWebsocketFrameMsg.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf"; + +import "DouyinCmdMsg.proto"; + +message DouyinWebsocketFrameMsg { + repeated DouyinCmdMsg messages_list = 1; + string cursor = 2; + uint64 fetch_interval = 3; + uint64 now = 4; + string internal_ext = 5; + uint32 fetch_type = 6; + map route_params = 7; + uint64 heartbeat_duration = 8; + bool need_ack = 9; + string push_server = 10; + string live_cursor = 11; + bool history_no_more = 12; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/GiftIMPriority.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/GiftIMPriority.proto new file mode 100644 index 0000000..55282d8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/GiftIMPriority.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message GiftIMPriority { + repeated uint64 queue_sizes_list = 1; + uint64 self_queue_priority = 2; + uint64 priority = 3; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/GiftStruct.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/GiftStruct.proto new file mode 100644 index 0000000..15824c5 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/GiftStruct.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message GiftStruct { + Image image = 1; + string describe = 2; + bool notify = 3; + uint64 duration = 4; + uint64 id = 5; + // GiftStructFansClubInfo fansclubInfo = 6; + bool for_linkmic = 7; + bool doodle = 8; + bool for_fansclub = 9; + bool combo = 10; + uint32 type = 11; + uint32 diamond_count = 12; + bool is_displayed_on_panel = 13; + uint64 primary_effect_id = 14; + Image gift_label_icon = 15; + string name = 16; + string region = 17; + string manual = 18; + bool for_custom = 19; + map specialEffectsMap = 20; + Image icon = 21; + uint32 action_type = 22; + int32 watermelonSeeds = 23; + string goldEffect = 24; + // repeated LuckyMoneyGiftMeta subs = 25; + int64 goldenBeans = 26; + int64 honorLevel = 27; + int32 itemType = 28; + string schemeUrl = 29; + // GiftPanelOperation giftOperation = 30; + string eventName = 31; + int64 nobleLevel = 32; + string guideUrl = 33; + bool punishMedicine = 34; + bool forPortal = 35; + string businessText = 36; + bool cnyGift = 37; + int64 appId = 38; + int64 vipLevel = 39; + bool isGray = 40; + string graySchemeUrl = 41; + int64 giftScene = 42; + // GiftBanner giftBanner = 43; + repeated string triggerWords = 44; + // repeated GiftBuffInfo giftBuffInfos = 45; + bool forFirstRecharge = 46; + Image dynamicImgForSelected = 47; + int32 afterSendAction = 48; + int64 giftOfflineTime = 49; + string topBarText = 50; + Image topRightAvatar = 51; + string bannerSchemeUrl = 52; + bool isLocked = 53; + int64 reqExtraType = 54; + repeated int64 assetIds = 55; + // GiftPreviewInfo giftPreviewInfo = 56; + // GiftTip giftTip = 57; + int32 needSweepLightCount = 58; + // repeated GiftGroupInfo groupInfo = 59; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Image.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Image.proto new file mode 100644 index 0000000..2a42d21 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Image.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message Image { + repeated string urlListList = 1; + string uri = 2; + int64 height = 3; + int64 width = 4; + string avgColor = 5; + int32 imageType = 6; + string openWebUrl = 7; + Content content = 8; + bool isAnimated = 9; + repeated NinePatchSetting flexSettingListList = 10; + repeated NinePatchSetting textSettingListList = 11; + + message Content { + string name = 1; + string fontColor = 2; + int64 level = 3; + string alternativeText = 4; + } + + message NinePatchSetting{ + + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/PatternRef.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/PatternRef.proto new file mode 100644 index 0000000..1791ef1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/PatternRef.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message PatternRef { + string key = 1; + string default_pattern = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/PublicAreaCommon.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/PublicAreaCommon.proto new file mode 100644 index 0000000..5adf47d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/PublicAreaCommon.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message PublicAreaCommon { + Image user_label = 1; + uint64 user_consume_in_room = 2; + uint64 user_send_gift_cnt_in_room = 3; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Text.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Text.proto new file mode 100644 index 0000000..ed5d964 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/Text.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +import "TextFormat.proto"; +import "TextPiece.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message Text { + string key = 1; + string default_patter = 2; + TextFormat default_format = 3; + TextPiece pieces_list = 4; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextEffect.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextEffect.proto new file mode 100644 index 0000000..d0f368b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextEffect.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "TextEffectDetail.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextEffect { + TextEffectDetail portrait = 1; + TextEffectDetail landscape = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextEffectDetail.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextEffectDetail.proto new file mode 100644 index 0000000..172a337 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextEffectDetail.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +import "Image.proto"; +import "Text.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextEffectDetail { + Text text = 1; + uint32 text_font_size = 2; + Image background = 3; + uint32 start = 4; + uint32 duration = 5; + uint32 x = 6; + uint32 y = 7; + uint32 width = 8; + uint32 height = 9; + uint32 shadow_dx = 10; + uint32 shadow_dy = 11; + uint32 shadow_radius = 12; + string shadow_color = 13; + string stroke_color = 14; + uint32 stroke_width = 15; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextFormat.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextFormat.proto new file mode 100644 index 0000000..69b3695 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextFormat.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextFormat { + string color = 1; + bool bold = 2; + bool italic = 3; + uint32 weight = 4; + uint32 italic_angle = 5; + uint32 font_size = 6; + bool use_heigh_light_color = 7; + bool use_remote_clor = 8; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPiece.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPiece.proto new file mode 100644 index 0000000..3f98e83 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPiece.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +import "TextFormat.proto"; +import "TextPieceImage.proto"; +import "TextPiecePatternRef.proto"; +import "TextPieceHeart.proto"; +import "TextPieceGift.proto"; +import "TextPieceUser.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextPiece { + bool type = 1; + TextFormat format = 2; + string string_value = 3; + TextPieceUser user_value = 4; + TextPieceGift gift_value = 5; + TextPieceHeart heart_value = 6; + TextPiecePatternRef pattern_ref_value = 7; + TextPieceImage image_value = 8; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceGift.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceGift.proto new file mode 100644 index 0000000..b68b646 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceGift.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "PatternRef.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextPieceGift { + uint64 gift_id = 1; + PatternRef name_ref = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceHeart.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceHeart.proto new file mode 100644 index 0000000..807ab74 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceHeart.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextPieceHeart { + string color = 1; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceImage.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceImage.proto new file mode 100644 index 0000000..d16fcef --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceImage.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextPieceImage { + Image image = 1; + float scaling_rate = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPiecePatternRef.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPiecePatternRef.proto new file mode 100644 index 0000000..dbd8cae --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPiecePatternRef.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextPiecePatternRef { + string key = 1; + string default_pattern = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceUser.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceUser.proto new file mode 100644 index 0000000..29d1cb7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/TextPieceUser.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "User.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message TextPieceUser { + User user = 1; + bool with_colon = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/User.proto b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/User.proto new file mode 100644 index 0000000..6b6a982 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/main/resources/proto/User.proto @@ -0,0 +1,272 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.dto"; + +message User { + uint64 id = 1; + uint64 shortId = 2; + string nickname = 3; + uint32 gender = 4; + string signature = 5; + uint32 level = 6; + uint64 birthday = 7; + string telephone = 8; + Image avatarThumb = 9; + Image avatarMedium = 10; + Image avatarLarge = 11; + bool verified = 12; + int32 experience = 13; + string city = 14; + int32 status = 15; + int64 createTime = 16; + int64 modifyTime = 17; + int32 secret = 18; + string shareQrcodeUri = 19; + int32 incomeSharePercent = 20; + Image badgeImageListList = 21; + FollowInfo followInfo = 22; + PayGrade payGrade = 23; + FansClub fansClub = 24; + Border border = 25; + string specialId = 26; + Image avatarBorder = 27; + Image medal = 28; + repeated Image realTimeIconsList = 29; + repeated Image newRealTimeIconsList = 30; + int64 topVipNo = 31; + UserAttr userAttr = 32; + OwnRoom ownRoom = 33; + int64 payScore = 34; + int64 ticketCount = 35; + AnchorInfo anchorInfo = 36; + int32 linkMicStats = 37; + string displayId = 38; + bool withCommercePermission = 39; + bool withFusionShopEntry = 40; + int64 totalRechargeDiamondCount = 41; + AnchorLevel webcastAnchorLevel = 42; + string verifiedContent = 43; + AuthorStats authorStats = 44; + repeated User topFansList = 45; + string secUid = 46; + int32 userRole = 47; + XiguaParams xiguaInfo = 48; + ActivityInfo activityReward = 49; + NobleLevelInfo nobleInfo = 50; + BrotherhoodInfo brotherhoodInfo = 51; + Image personalCard = 52; + AuthenticationInfo authenticationInfo = 53; + int32 authorizationInfo = 54; + int32 adversaryAuthorizationInfo = 55; + PoiInfo poiInfo = 56; + Image mediaBadgeImageListList = 57; + int32 adversaryUserStatus = 58; + UserVIPInfo userVipInfo = 59; + repeated int64 commerceWebcastConfigIdsList = 60; + Image badgeImageListV2List = 61; + // IndustryCertification industryCertification = 62; + string locationCity = 63; + FansGroupInfo fansGroupInfo = 64; + string remarkName = 65; + int32 mysteryMan = 66; + string webRid = 67; + string desensitizedNickname = 68; + JAccreditInfo jAccreditInfo = 69; + Subscribe subscribe = 70; + bool isAnonymous = 71; + int32 consumeDiamondLevel = 72; + string webcastUid = 73; + ProfileStyleParams profileStyleParams = 74; + UserDressInfo userDressInfo = 75; + bool allowBeLocated = 1001; + bool allowFindByContacts = 1002; + bool allowOthersDownloadVideo = 1003; + bool allowOthersDownloadWhenSharingVideo = 1004; + bool allowShareShowProfile = 1005; + bool allowShowInGossip = 1006; + bool allowShowMyAction = 1007; + bool allowStrangeComment = 1008; + bool allowUnfollowerComment = 1009; + bool allowUseLinkmic = 1010; + AnchorLevel anchorLevel = 1011; + Image avatarJpg = 1012; + string bgImgUrl = 1013; + string birthdayDescription = 1014; + bool birthdayValid = 1015; + int32 blockStatus = 1016; + int32 commentRestrict = 1017; + string constellation = 1018; + int32 disableIchat = 1019; + int64 enableIchatImg = 1020; + int32 exp = 1021; + int64 fanTicketCount = 1022; + bool foldStrangerChat = 1023; + int64 followStatus = 1024; + bool hotsoonVerified = 1025; + string hotsoonVerifiedReason = 1026; + int32 ichatRestrictType = 1027; + string idStr = 1028; + bool isFollower = 1029; + bool isFollowing = 1030; + bool needProfileGuide = 1031; + int64 payScores = 1032; + bool pushCommentStatus = 1033; + bool pushDigg = 1034; + bool pushFollow = 1035; + bool pushFriendAction = 1036; + bool pushIchat = 1037; + bool pushStatus = 1038; + bool pushVideoPost = 1039; + bool pushVideoRecommend = 1040; + UserStats stats = 1041; + bool verifiedMobile = 1042; + string verifiedReason = 1043; + bool withCarManagementPermission = 1044; + int32 ageRange = 1045; + int64 watchDurationMonth = 1046; + + message ActivityInfo{ + + } + + message AnchorInfo { + + } + + message AnchorLevel{ + + } + + message AuthenticationInfo{ + + } + + message AuthorStats{ + + } + + message Border{ + + } + + message BrotherhoodInfo{ + + } + + message FansClub { + FansClubData data = 1; + map preferData = 2; + + message FansClubData { + string clubName = 1; + int32 level = 2; + int32 userFansClubStatus = 3; + UserBadge badge = 4; + repeated int64 availableGiftIds = 5; + int64 anchorId = 6; + + message UserBadge { + map icons = 1; + string title = 2; + } + + } + } + + message FansGroupInfo{ + + } + + message FollowInfo { + int64 followingCount = 1; + int64 followerCount = 2; + int64 followStatus = 3; + int64 pushStatus = 4; + string remarkName = 5; + } + + message JAccreditInfo{ + + } + + message NobleLevelInfo{ + + } + + message OwnRoom { + + } + + message PayGrade { + int64 totalDiamondCount = 1; + Image diamondIcon = 2; + string name = 3; + Image icon = 4; + string nextName = 5; + int64 level = 6; + Image nextIcon = 7; + int64 nextDiamond = 8; + int64 nowDiamond = 9; + int64 thisGradeMinDiamond = 10; + int64 thisGradeMaxDiamond = 11; + int64 payDiamondBak = 12; + string gradeDescribe = 13; + repeated GradeIcon gradeIconList = 14; + int64 screenChatType = 15; + Image imIcon = 16; + Image imIconWithLevel = 17; + Image liveIcon = 18; + Image newImIconWithLevel = 19; + Image newLiveIcon = 20; + int64 upgradeNeedConsume = 21; + string nextPrivileges = 22; + Image background = 23; + Image backgroundBack = 24; + int64 score = 25; + // GradeBuffInfo buffInfo = 26; + string gradeBanner = 1001; + Image profileDialogBg = 1002; + Image profileDialogBgBack = 1003; + + message GradeIcon{ + Image icon = 1; + int64 iconDiamond = 2; + int64 level = 3; + string levelStr = 4; + } + + } + + message PoiInfo{ + + } + + message ProfileStyleParams{ + + } + + message Subscribe{ + + } + + message UserAttr{ + + } + + message UserDressInfo{ + + } + + message UserVIPInfo { + + } + + message UserStats{ + + } + + message XiguaParams{ + + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyin/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/DouyinApisTest.java b/live-chat-client-codec/live-chat-client-codec-douyin/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/DouyinApisTest.java new file mode 100644 index 0000000..269672e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyin/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyin/api/DouyinApisTest.java @@ -0,0 +1,15 @@ +package tech.ordinaryroad.live.chat.client.codec.douyin.api; + +import org.junit.jupiter.api.Test; + +/** + * @author mjz + * @date 2024/1/3 + */ +class DouyinApisTest { + + @Test + void roomInit() { + DouyinApis.roomInit("886419461662"); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/pom.xml b/live-chat-client-codec/live-chat-client-codec-douyu/pom.xml new file mode 100644 index 0000000..8dc6c88 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client-codec + 0.7.0 + + jar + + live-chat-client-codec-douyu + live-chat-client-codec-douyu + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-commons-base + + + + tech.ordinaryroad + live-chat-client-commons-util + + + + io.netty + netty-codec + + + + ch.qos.logback + logback-classic + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/api/DouyuApis.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/api/DouyuApis.java new file mode 100644 index 0000000..8d1ae8e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/api/DouyuApis.java @@ -0,0 +1,208 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.api; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.digest.MD5; +import cn.hutool.http.Header; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpStatus; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.Cleanup; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftListInfo; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftPropSingle; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatHttpUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatLocalDateTimeUtil; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * API简易版 + * + * @author mjz + * @date 2023/5/5 + */ +@Slf4j +public class DouyuApis { + + /** + * 通用礼物缓存,过期时间1天 + * pid,Info + */ + public static final TimedCache giftMap = new TimedCache<>(TimeUnit.DAYS.toMillis(1)); + /** + * 房间礼物缓存,过期时间1天 + * realRoomId,(giftId,Info) + */ + public static final TimedCache> roomGiftMap = new TimedCache<>(TimeUnit.DAYS.toMillis(1), new HashMap<>()); + + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + public static final String PATTERN_BODY_ROOM_ID = "\\$ROOM\\.room_id\\D+(\\d+)"; + public static final String KEY_REDIRECT_LOCATION_RID = "rid"; + public static final String KEY_COOKIE_DY_DID = "dy_did"; + public static final String KEY_COOKIE_ACF_UID = "acf_uid"; + public static final String KEY_COOKIE_ACF_STK = "acf_stk"; + public static final String KEY_COOKIE_ACF_LTKID = "acf_ltkid"; + public static final String API_AVATAR = "https://apic.douyucdn.cn/upload/"; + // https://webconf.douyucdn.cn/resource/common/gift/flash/gift_effect.json + // https://webconf.douyucdn.cn/resource/common/gift/common_config_v2.json + // https://webconf.douyucdn.cn/resource/common/prop_gift_list/prop_gift_config.json + // 用PID查询礼物信息:https://gift.douyucdn.cn/api/prop/v1/web/single?pid= + // 查询房间礼物列表:https://gift.douyucdn.cn/api/gift/v3/web/list?rid= + public static final String API_GIFT_LIST = "https://gift.douyucdn.cn/api/gift/v3/web/list?rid="; + public static final String API_PROP_SINGLE = "https://gift.douyucdn.cn/api/prop/v1/web/single?pid="; + public static final String API_AVATAR_PREFIX_SMALL = "_small.jpg"; + public static final String API_AVATAR_PREFIX_MIDDLE = "_middle.jpg"; + public static final String API_AVATAR_PREFIX_BIG = "_big.jpg"; + + public static String getAvatarUrl(List list, String prefix) { + if (CollUtil.isEmpty(list) || list.size() < 3) { + return StrUtil.EMPTY; + } + return API_AVATAR + CollUtil.join(list, "/") + prefix; + } + + public static String getSmallAvatarUrl(List list) { + return getAvatarUrl(list, API_AVATAR_PREFIX_SMALL); + } + + public static long getRealRoomId(long roomId, String cookie) { + String realRoomIdString = null; + @Cleanup + HttpResponse execute = OrLiveChatHttpUtil.createGet("https://www.douyu.com/" + roomId) + .cookie(cookie) + .execute(); + if (execute.getStatus() == HttpStatus.HTTP_NOT_FOUND) { + throw new BaseException("获取" + roomId + "真实房间ID失败"); + } + if (HttpStatus.isRedirected(execute.getStatus())) { + String location = execute.header(Header.LOCATION); + Map paramMap = OrLiveChatHttpUtil.decodeParamMap(location, null); + if (paramMap.containsKey(KEY_REDIRECT_LOCATION_RID)) { + realRoomIdString = paramMap.get(KEY_REDIRECT_LOCATION_RID); + } + } + if (StrUtil.isBlank(realRoomIdString)) { + String body = execute.body(); + String matchString = ReUtil.get(PATTERN_BODY_ROOM_ID, body, 1); + if (StrUtil.isNotBlank(matchString)) { + realRoomIdString = matchString; + } + } + long realRoomId = roomId; + if (!StrUtil.isBlank(realRoomIdString)) { + try { + realRoomId = NumberUtil.parseLong(realRoomIdString); + } catch (Exception e) { + throw new BaseException("获取" + roomId + "真实房间ID失败"); + } + } + return realRoomId; + } + + public static long getRealRoomId(long roomId) { + return getRealRoomId(roomId, null); + } + + public static JsonNode getServerInfo(long roomId, String cookie) { + @Cleanup + HttpResponse execute = OrLiveChatHttpUtil.createPost("https://www.douyu.com/lapi/live/gateway/web/" + roomId + "?isH5=1") + .cookie(cookie) + .execute(); + return responseInterceptor(execute.body()); + } + + public static JsonNode getServerInfo(long roomId) { + return getServerInfo(roomId, null); + } + + public static String getRandomWssUri(long roomId) { + JsonNode serverInfo = getServerInfo(roomId); + JsonNode wss = serverInfo.get("wss"); + JsonNode jsonNode = wss.get(RandomUtil.randomInt(0, wss.size())); + return "wss://" + jsonNode.get("domain").asText() + ":" + jsonNode.get("port").asInt(); + } + + public static JsonNode getGiftList(long roomId) { + @Cleanup + HttpResponse execute = OrLiveChatHttpUtil.createGet(API_GIFT_LIST + roomId).execute(); + return responseInterceptor(execute.body()); + } + + @SneakyThrows + public static GiftPropSingle getGiftPropSingleByPid(String pid) { + @Cleanup + HttpResponse execute = OrLiveChatHttpUtil.createGet(API_PROP_SINGLE + pid).execute(); + JsonNode jsonNode = responseInterceptor(execute.body()); + return OrJacksonUtil.getInstance().readValue(jsonNode.toString(), GiftPropSingle.class); + } + + public static final String vk_secret = "r5*^5;}2#${XF[h+;'./.Q'1;,-]f'p["; + + /** + * 参考: 斗鱼关注人数爬取 ── 字体反爬的攻与防 + * + * @param currentTimeSecs + * @param did + * @return + */ + public static String generateVk(long currentTimeSecs, String did) { + return MD5.create().digestHex(currentTimeSecs + vk_secret + did); + } + + public static String generateVk(String did) { + return generateVk(OrLiveChatLocalDateTimeUtil.zonedCurrentTimeSecs(), did); + } + + private static JsonNode responseInterceptor(String responseString) { + try { + JsonNode jsonNode = OBJECT_MAPPER.readTree(responseString); + int code = jsonNode.get("error").asInt(); + if (code == 0) { + // 成功 + return jsonNode.get("data"); + } else { + throw new BaseException(jsonNode.get("msg").asText()); + } + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/constant/DouyuClientModeEnum.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/constant/DouyuClientModeEnum.java new file mode 100644 index 0000000..63118f8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/constant/DouyuClientModeEnum.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.constant; + +/** + * @author mjz + * @date 2023/9/15 + */ +public enum DouyuClientModeEnum { + /** + * 发送弹幕,获取可用的Danmu服务器链接 + */ + WS, + /** + * 接收直播间弹幕 + */ + DANMU, +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/constant/DouyuCmdEnum.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/constant/DouyuCmdEnum.java new file mode 100644 index 0000000..253e4f3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/constant/DouyuCmdEnum.java @@ -0,0 +1,199 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.constant; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.*; + +/** + * 文档 + * + * @author mjz + * @date 2023/1/6 + */ +@Getter +@AllArgsConstructor +@RequiredArgsConstructor +public enum DouyuCmdEnum { + /** + * 登录请求消息 + *
{@code
+     * type@=loginreq/roomid@=7750753/dfl@=/username@=visitor10424697/uid@=1168052601/ver@=20220825/aver@=218101901/ct@=0/
+     * type@=loginreq/roomid@=58839/aid@=yihanTest/token@=4c8421535f9639d8c1ad35d1fa421f36/time@=1574850339/auth@=45619bb990e6b76db06a66d5a8a446d7/
+     * }
+ */ + loginreq(LoginreqMsg.class), + /** + * 登录响应消息 + *
{@code
+     * type@=loginres/userid@=1168052601/roomgroup@=0/pg@=0/sessionid@=0/username@=/nickname@=/live_stat@=0/is_illegal@=0/ill_ct@=/ill_ts@=0/now@=0/ps@=0/es@=0/it@=0/its@=0/npv@=0/best_dlev@=0/cur_lev@=0/nrc@=964715377/ih@=0/sid@=76494/sahf@=0/sceneid@=0/newrg@=0/regts@=0/ip@=112.43.93.229/rn@=0/rct@=0/
+     * type@=loginresp/msg@=ok/rid@=77614265/
+     * }
+ */ + loginres(LoginresMsg.class), + /** + * 入组 + * type@=joingroup/rid@=59872/aid@=yourapplicaitonID/token@=4c8421535f9639d8c1ad35d1fa421f36/time@=1574850339/auth@=xxxxxxxxxxxx/ + * Auth 生成方式为 md5({secret}_{aid}_{time}_{token}), secret为aid对应的秘钥 + */ + joingroup(JoingroupMsg.class), + /** + * 客户端旧版心跳、心跳回复 + *
{@code
+     * type@=keeplive/tick@=1439802131/
+     * }
+ */ + keeplive(KeepliveMsg.class), + /** + * 客户端新版心跳、心跳回复 + *
{@code
+     * type@=mrkl/
+     * }
+ */ + mrkl, + /** + * 订阅贵族排行变动 + * type@=sub/mt@=online_vip_list/ + */ + sub(SubMsg.class), + subres, + noble_num_info, + oni, + postLogin, + /** + * 弹幕 + * type@=chatmsg/rid@=7750753/uid@=549977/nn@=一闪一闪亮品品/txt@=冷门歌手哎,声音独特哎/cid@=044c3bf3074b483275a44e0000000000/ic@=avatar@Sdefault@S08/level@=29/sahf@=0/nl@=7/cst@=1693107871294/bnn@=/bl@=0/brid@=0/hc@=/lk@=/dms@=8/pdg@=26/pdk@=86/ext@=/ + * type@=chatmsg/rid@=58839/ct@=8/hashid@=9LA18ePx4dqW/nn@=test/txt@=666/cid@=1111/ic@=icon/sahf@=0/level@=1/nl@=0/nc@=0/cmt@=0/gt@=0/col@=0/rg@=0/pg@=0/dlv@=0/dc@=0/bdlv@=0/gatin@=0/ chtin@=0/repin@=0/bnn@=test/bl@=0/brid@=58839/hc@=0/ol@=0/rev@=0/hl@=0/ifs@=0/p2p@=0/el@=eid@AA=1@ASetp@AA=1@ASsc@AA=1@AS/ + */ + chatmsg(ChatmsgMsg.class), + pingreq, + /** + * 登出 + * type@=logout/ + */ + logout, + /** + * 登录响应 + * type@=loginresp/msg@=ok/rid@=77614265/ + */ + loginresp, + /** + * 礼物 + * type@=dgb/gfid@=1/gs@=59872/gfcnt@=1/hashid@=1/rid@=1/nn@=someone/level@=1/dw@=1/ + */ + dgb(DgbMsg.class), + /** + * 用户进房通知消息 + * type@=uenter/rid@=1/ uid@=1/nn@=someone/str@=1/level@=1/el@=eid@AA=1@ASetp@AA=1@ASsc@AA=1@AS@S/ + */ + uenter(UenterMsg.class), + /** + * 房间开关播提醒 + * type@=rss/rid@=1/ss@=1/code@=1/rt@=0/notify@=1/endtime@=1/ + */ + rss, + /** + * 超级弹幕消息 + * type@=ssd/rid@=1/trid@=1/content@=test/cli tp@=1/url@=test_url/jmptp@=1/ + */ + ssd, + /** + * 房间内礼物广播 + * type@=spbc/rid@=1/gfid@=1/sn@=name/dn@=name/gn@=1/gc@=1/gb@=1/es@=1/ eid@=1/ + */ + spbc, + /** + * 房间宝箱消息 + * type@=tsgs/rid@=1/gid@=1/gfid@=1/sn@=name/dn@=name/gn@=1/gc@=1/gb@=1/es@=1/gfid@=1/eid@=1/ + */ + tsgs, + /** + * 房间内 top10 变化消息 + * type@=rankup/uid@=1/rn@=3/rid@=1/rkt@=1/gid@=-9999/rt@=0/ nk@=test/sz@=3/drid@=1/bt@=1/ + */ + rankup, + /** + * 主播离开提醒 + * type@=al/rid@=10111/aid@=3044114/ + */ + al, + /** + * 主播回来继续直播提醒 + * type@=ab/rid@=10111/gid@=-9999/aid@=3044114/ + */ + ab, + /** + * 用户等级提升消息 + * type@=upgrade/rid@=1/gid@=-9999/uid@=12001/nn@=test/level@=3/ic@=icon/ + */ + upgrade, + /** + * 主播等级提升广播 + * type@=upbc/rid@=1/gid@=-9999/lev@=20/pu@=0/ + */ + upbc, + /** + * 禁言操作结果 + * type@=newblackres/rid@=1/gid@=-9999/ret@=0/otype@=2/sid@=10002/did@=10003/snic@=stest/dnic@=dtest/endtime@=1501920157/ + */ + newblackres, + /** + * 徽章等级提升通知 + * type@=blab/rid@=1/gid@=-9999/uid@=10002/nn@=test/lbl@=2/bl@=3/ba@=1/bnn@=ttt/ + */ + blab, + /** + * 用户分享了直播间通知 + * type@=srres/rid@=1/gid@=-9999/uid@=12001/nickname@=test/exp@=3/ + */ + srres, + /** + * 栏目排行榜变更通知 + * type@=rri/rid@=1/rn@=cate_rank/cate_id@=5/uid@=10005/sc@=100 00/idx@=10/bcr@=1/ibc@=1/an@=test/rktype@=1/tag_id@=1200/gif t_id@=100/ + */ + rri, + mapkb(MapkbMsg.class), + /** + * 发送弹幕 + */ + chatmessage(ChatmessageMsg.class), + h5ckreq(H5ckreqMsg.class), + h5gkcreq(H5gkcreqMsg.class), + h5cs(H5csMsg.class), + msgrepeaterproxylist(MsgrepeaterproxylistMsg.class), + ; + + private Class tClass; + + public static DouyuCmdEnum getByString(String cmd) { + try { + return DouyuCmdEnum.valueOf(cmd); + } catch (Exception e) { + return null; + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/ChatmessageMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/ChatmessageMsg.java new file mode 100644 index 0000000..82e095b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/ChatmessageMsg.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import cn.hutool.core.util.RandomUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatLocalDateTimeUtil; + +/** + * @author mjz + * @date 2023/9/7 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ChatmessageMsg extends BaseDouyuCmdMsg { + + private String pe = "0"; + /** + * 弹幕内容 + */ + private String content; + private String col = "0"; + /** + * Cookie中的dy_did + */ + private String dy; + /** + * Cookie中的acf_uid + */ + private String sender; + private String ifs = "0"; + private String nc = "0"; + private String dat = "0"; + private String rev = "0"; + /** + * 当前时间戳(秒) + */ + private String tts; + private String admzq = "0"; + /** + * tts往后加几秒的时间戳(毫秒) + */ + private String cst; + + public ChatmessageMsg(String content, String dy, String sender) { + this.content = content; + this.dy = dy; + this.sender = sender; + this.tts = String.valueOf(OrLiveChatLocalDateTimeUtil.zonedCurrentTimeSecs()); + this.cst = String.valueOf(OrLiveChatLocalDateTimeUtil.zonedCurrentTimeMillis() + RandomUtil.randomLong(8000, 10000)); + } + + @Override + public String getType() { + return DouyuCmdEnum.chatmessage.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/ChatmsgMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/ChatmsgMsg.java new file mode 100644 index 0000000..a94a7fd --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/ChatmsgMsg.java @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; + +import java.util.List; + +/** + *
{@code
+ * {
+ * 	"type": "chatmsg",
+ * 	"cmdEnum": "chatmsg",
+ * 	"cmd": "chatmsg",
+ * 	"nn": "宋老二929",
+ * 	"ext": null,
+ * 	"bnn": null,
+ * 	"level": "1",
+ * 	"cst": "1693213418102",
+ * 	"brid": "0",
+ * 	"bl": "0",
+ * 	"dms": "5",
+ * 	"rid": "3168536",
+ * 	"uid": "396023456",
+ * 	"txt": "666",
+ * 	"pdg": "47",
+ * 	"pdk": "89",
+ * 	"sahf": "0",
+ * 	"ic": ["avatar_v3", "202101", "45daf5ceb475414293e3da4559552655"],
+ * 	"hb": ["2719"],
+ * 	"hc": null,
+ * 	"cid": "0b37e26cccd54f7c4d73590000000000",
+ * 	"lk": null
+ * }
+ * }
+ * + * @author mjz + * @date 2023/8/28 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ChatmsgMsg extends BaseDouyuCmdMsg implements IDanmuMsg { + + private String nn; + private String ext; + private String bnn; + private String level; + private String cst; + private String brid; + private byte bl; + private String dms; + private long rid; + private String uid; + private String txt; + private String pdg; + private String pdk; + private String sahf; + private List ic; + private List hb; + private String hc; + private String cid; + private JsonNode lk; + + @Override + public String getType() { + return DouyuCmdEnum.chatmsg.name(); + } + + @Override + public String getBadgeName() { + return this.bnn; + } + + @Override + public byte getBadgeLevel() { + return this.bl; + } + + @Override + public String getUsername() { + return this.nn; + } + + @Override + public String getUserAvatar() { + return DouyuApis.getSmallAvatarUrl(ic); + } + + @Override + public String getContent() { + return this.txt; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/DgbMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/DgbMsg.java new file mode 100644 index 0000000..9c42658 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/DgbMsg.java @@ -0,0 +1,233 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftListInfo; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftPropSingle; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; + +import java.util.List; + +/** + * 收到礼物消息 + *
{@code
+ * {
+ * 	"type": "dgb",
+ * 	"nn": "用户名",
+ * 	"eid": "0",
+ * 	"bst": "32",
+ * 	"brid": "0",
+ * 	"pma": "186963537",
+ * 	"bnid": "1",
+ * 	"gfid": "824",
+ * 	"bl": "0",
+ * 	"pid": "268",
+ * 	"rid": "290935",
+ * 	"mss": "186963457",
+ * 	"bcst": "2",
+ * 	"uid": "用户id",
+ * 	"receive_uid": "接受用户id",
+ * 	"ic": ["avatar_v3", "201912", "d031765fbe764a49887083bcf200da0b"],
+ * 	"from": "2",
+ * 	"gpf": "1",
+ * 	"bnl": "1",
+ * 	"ce": "1",
+ * 	"bnn": null,
+ * 	"receive_nn": "接受用户用户名",
+ * 	"level": "43",
+ * 	"bcnt": "1",
+ * 	"gs": "0",
+ * 	"hits": "249",
+ * 	"gfcnt": "249",
+ * 	"ct": "0",
+ * 	"pfm": "27585",
+ * 	"sahf": "0",
+ * 	"hc": null,
+ * 	"fc": "0",
+ * 	"eic": "0"
+ * }
+ * }
+ * + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DgbMsg extends BaseDouyuCmdMsg implements IGiftMsg { + + /** + * 用户名 + */ + private String nn; + private String eid; + private String bst; + private String brid; + private String pma; + private String bnid; + private long gfid; + private byte bl; + private String pid; + private String rid; + private String mss; + private String bcst; + /** + * 用户id + */ + private String uid; + /** + * 收礼物用户id + */ + private long receive_uid; + private List ic; + private String from; + private String gpf; + private String bnl; + private String ce; + private String bnn; + /** + * 收礼物用户名 + */ + private String receive_nn; + private String level; + private String bcnt; + private String gs; + /** + * 连击 + */ + private String hits; + /** + * 礼物个数 + */ + private int gfcnt; + private String ct; + private String pfm; + private String sahf; + private String hc; + private String fc; + private String eic; + private String bsfl; + private String skinid; + + // region 额外属性 + private GiftPropSingle giftInfo = GiftPropSingle.DEFAULT_GIFT; + private GiftListInfo roomGiftInfo = GiftListInfo.DEFAULT_GIFT; + // endregion + + @Override + public String getType() { + return DouyuCmdEnum.dgb.name(); + } + + @Override + public String getBadgeName() { + return this.bnn; + } + + @Override + public byte getBadgeLevel() { + return this.bl; + } + + @Override + public String getUsername() { + return this.nn; + } + + @Override + public String getUserAvatar() { + return DouyuApis.getSmallAvatarUrl(ic); + } + + @Override + public String getGiftName() { + if (this.roomGiftInfo != null && this.roomGiftInfo != GiftListInfo.DEFAULT_GIFT) { + return this.roomGiftInfo.getName(); + } + + if (this.giftInfo == null) { + return "未知礼物"; + } + + return this.giftInfo.getName(); + } + + @Override + public String getGiftImg() { + if (this.roomGiftInfo != null && this.roomGiftInfo != GiftListInfo.DEFAULT_GIFT && this.roomGiftInfo.getBasicInfo() != null) { + return this.roomGiftInfo.getPicUrlPrefix() + this.roomGiftInfo.getBasicInfo().getChatPic(); + } + + if (this.giftInfo == null) { + return ""; + } + + return this.giftInfo.getPicUrlPrefix() + this.giftInfo.getChatPic(); + } + + @Override + public String getGiftId() { + return Long.toString(this.gfid); + } + + @Override + public int getGiftCount() { + return this.gfcnt; + } + + /** + * 100 => 1鱼翅 + */ + @Override + public int getGiftPrice() { + if (this.roomGiftInfo != null && this.roomGiftInfo != GiftListInfo.DEFAULT_GIFT && this.roomGiftInfo.getPriceInfo() != null) { + return this.roomGiftInfo.getPriceInfo().getPrice(); + } + + if (this.giftInfo == null) { + return -1; + } + + return this.giftInfo.getPrice(); + } + + @Override + public String getReceiveUid() { + return Long.toString(this.receive_uid); + } + + @Override + public String getReceiveUsername() { + return this.receive_nn; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/DouyuCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/DouyuCmdMsg.java new file mode 100644 index 0000000..9d6234e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/DouyuCmdMsg.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.util.DouyuCodecUtil; + +/** + * type@=chatmsg/rid@=7750753/uid@=549977/nn@=一闪一闪亮品品/txt@=冷门歌手哎,声音独特哎/cid@=044c3bf3074b483275a44e0000000000/ic@=avatar@Sdefault@S08/level@=29/sahf@=0/nl@=7/cst@=1693107871294/bnn@=/bl@=0/brid@=0/hc@=/lk@=/dms@=8/pdg@=26/pdk@=86/ext@=/ + * + * @see DouyuCodecUtil#getDouyuMsgClassByType(DouyuCmdEnum, short) + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyuCmdMsg extends BaseDouyuCmdMsg { + + private String tick; + + private String res; + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5ckreqMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5ckreqMsg.java new file mode 100644 index 0000000..c6eecf3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5ckreqMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class H5ckreqMsg extends BaseDouyuCmdMsg { + + private String rid; + private String ti; + + @Override + public String getType() { + return DouyuCmdEnum.h5ckreq.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5csMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5csMsg.java new file mode 100644 index 0000000..e71e7c5 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5csMsg.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class H5csMsg extends BaseDouyuCmdMsg { + + private String result; + + @Override + public String getType() { + return DouyuCmdEnum.h5cs.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5gkcreqMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5gkcreqMsg.java new file mode 100644 index 0000000..1d0c266 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/H5gkcreqMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class H5gkcreqMsg extends BaseDouyuCmdMsg { + + private String rid; + private String ti; + + @Override + public String getType() { + return DouyuCmdEnum.h5gkcreq.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/HeartbeatMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/HeartbeatMsg.java new file mode 100644 index 0000000..0a1b350 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/HeartbeatMsg.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +public class HeartbeatMsg extends BaseDouyuCmdMsg { + + @Override + public String getType() { + return DouyuCmdEnum.mrkl.name(); + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/HeartbeatReplyMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/HeartbeatReplyMsg.java new file mode 100644 index 0000000..adba581 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/HeartbeatReplyMsg.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +public class HeartbeatReplyMsg extends BaseDouyuCmdMsg { + + @Override + public String getType() { + return DouyuCmdEnum.mrkl.name(); + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/JoingroupMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/JoingroupMsg.java new file mode 100644 index 0000000..847bacf --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/JoingroupMsg.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class JoingroupMsg extends BaseDouyuCmdMsg { + + private long rid; + private long gid = -9999; + + @Override + public String getType() { + return DouyuCmdEnum.joingroup.name(); + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/KeepliveMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/KeepliveMsg.java new file mode 100644 index 0000000..dc969bb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/KeepliveMsg.java @@ -0,0 +1,62 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatLocalDateTimeUtil; + +/** + *
{@code
+ * type@=keeplive/vbw@=0/cdn@=hs-h5/tick@=1694099389/kd@=da9c384371b4552ac94e1237d2596262/
+ * }
+ * + * @author mjz + * @date 2023/9/7 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KeepliveMsg extends BaseDouyuCmdMsg { + + private String vbw = "0"; + private String cnd; + private long tick = OrLiveChatLocalDateTimeUtil.zonedCurrentTimeSecs(); + private String kd = ""; + + public KeepliveMsg(String cnd) { + this.cnd = cnd; + } + + @Override + public String getType() { + return DouyuCmdEnum.keeplive.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/LoginreqMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/LoginreqMsg.java new file mode 100644 index 0000000..8851e58 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/LoginreqMsg.java @@ -0,0 +1,118 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.util.DouyuCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatLocalDateTimeUtil; + +import java.util.Arrays; +import java.util.List; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@RequiredArgsConstructor +public class LoginreqMsg extends BaseDouyuCmdMsg { + + /** + * 登录状态需要的字段,SHOULD_IGNORE为序列化时需要忽略的字段的前缀 + * + * @see DouyuCodecUtil#SHOULD_IGNORE_PROPERTIES_PREFIX + */ + public static List SHOULD_IGNORE_PROPERTIES_WHEN_NOT_LOGGED_IN = Arrays.asList("roomid", "dfl", "username", "uid", "ver", "aver", "ct", "type"); + /** + * 未登录状态需要的字段,SHOULD_IGNORE为序列化时需要忽略的字段的前缀 + * + * @see DouyuCodecUtil#SHOULD_IGNORE_PROPERTIES_PREFIX + */ + public static List SHOULD_IGNORE_PROPERTIES_WHEN_LOGGED_IN = Arrays.asList("type", "roomid", "dfl", "username", "password", "ltkid", "biz", "stk", "devid", "ct", "pt", "cvr", "tvr", "apd", "rt", "vk", "ver", "aver", "dmbt", "dmbv"); + + private long roomid; + private String dfl; + private String username; + private long uid; + private String ver; + private String aver; + private int ct = 0; + + private String password; + /** + * Cookie中的acf_ltkid + */ + private String ltkid; + private String biz; + /** + * Cookie中的acf_stk + */ + private String stk; + /** + * Cookie中的dy_did + */ + private String devid; + private String pt = "2"; + private String cvr = "0"; + private String tvr = "7"; + private String apd = ""; + private long rt = OrLiveChatLocalDateTimeUtil.zonedCurrentTimeSecs(); + private String vk; + private String dmbt = "chrome"; + private String dmbv = "123"; + + public LoginreqMsg(long roomid, String dfl, String username, long uid, String ver, String aver) { + this.roomid = roomid; + this.dfl = dfl; + this.username = username; + this.uid = uid; + this.ver = ver; + this.aver = aver; + } + + public LoginreqMsg(long roomid, String dfl, String username, String ver, String aver, String ltkid, String biz, String stk, String devid) { + this.roomid = roomid; + this.dfl = dfl; + this.username = username; + this.ver = ver; + this.aver = aver; + this.ltkid = ltkid; + this.biz = biz; + this.stk = stk; + this.devid = devid; + this.vk = DouyuApis.generateVk(devid); + } + + @Override + public String getType() { + return DouyuCmdEnum.loginreq.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/LoginresMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/LoginresMsg.java new file mode 100644 index 0000000..7bccdf6 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/LoginresMsg.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LoginresMsg extends BaseDouyuCmdMsg { + + private long userid; + private int roomgroup; + private int pg; + private long sessionid; + private String username; + private String nickname; + private int live_stat; + private boolean is_illegal; + private String ill_ct; + private String ill_ts; + private String now; + private String ps; + private String es; + private String it; + private String its; + private String npv; + private String best_dlev; + private String cur_lev; + private String nrc; + private String ih; + private String sid; + private String sahf; + private String sceneid; + private String newrg; + private String regts; + private String ip; + private String rn; + private String rct; + + @Override + public String getType() { + return DouyuCmdEnum.loginres.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/MapkbMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/MapkbMsg.java new file mode 100644 index 0000000..aab2d3e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/MapkbMsg.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2023/8/28 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MapkbMsg extends BaseDouyuCmdMsg { + + private long pk_time; + private List teams; + + @Override + public String getType() { + return DouyuCmdEnum.mapkb.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/MsgrepeaterproxylistMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/MsgrepeaterproxylistMsg.java new file mode 100644 index 0000000..bd88a74 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/MsgrepeaterproxylistMsg.java @@ -0,0 +1,96 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MsgrepeaterproxylistMsg extends BaseDouyuCmdMsg { + + private String rid; + + /** + *
{@code
+     * [{
+     * 	"nr": "0",
+     * 	"port": "8501",
+     * 	"ip": "danmuproxy.douyu.com",
+     * 	"id": "0",
+     * 	"ml": "10000"
+     * }, {
+     * 	"nr": "0",
+     * 	"port": "8502",
+     * 	"ip": "danmuproxy.douyu.com",
+     * 	"id": "0",
+     * 	"ml": "10000"
+     * }, {
+     * 	"nr": "0",
+     * 	"port": "8503",
+     * 	"ip": "danmuproxy.douyu.com",
+     * 	"id": "0",
+     * 	"ml": "10000"
+     * }, {
+     * 	"nr": "0",
+     * 	"port": "8504",
+     * 	"ip": "danmuproxy.douyu.com",
+     * 	"id": "0",
+     * 	"ml": "10000"
+     * }, {
+     * 	"nr": "0",
+     * 	"port": "8505",
+     * 	"ip": "danmuproxy.douyu.com",
+     * 	"id": "0",
+     * 	"ml": "10000"
+     * }, {
+     * 	"nr": "0",
+     * 	"port": "8506",
+     * 	"ip": "danmuproxy.douyu.com",
+     * 	"id": "0",
+     * 	"ml": "10000"
+     * }]
+     * }
+ */ + private List> list; + + @Override + public String getType() { + return DouyuCmdEnum.msgrepeaterproxylist.name(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/SubMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/SubMsg.java new file mode 100644 index 0000000..40464d0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/SubMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SubMsg extends BaseDouyuCmdMsg { + + private String mt = "dayrk"; + + @Override + public String getType() { + return DouyuCmdEnum.sub.name(); + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/UenterMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/UenterMsg.java new file mode 100644 index 0000000..f909b11 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/UenterMsg.java @@ -0,0 +1,78 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UenterMsg extends BaseDouyuCmdMsg implements IEnterRoomMsg { + + private String nn; + private long uid; + private int level; + private String sahf; + private List ic; + private String rid; + + @Override + public String getBadgeName() { + return null; + } + + @Override + public byte getBadgeLevel() { + return 0; + } + + @Override + public String getUid() { + return Long.toString(uid); + } + + @Override + public String getUsername() { + return nn; + } + + @Override + public String getUserAvatar() { + return DouyuApis.getSmallAvatarUrl(ic); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/base/BaseDouyuCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/base/BaseDouyuCmdMsg.java new file mode 100644 index 0000000..4a19c28 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/base/BaseDouyuCmdMsg.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg.base; + + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseDouyuCmdMsg implements IDouyuMsg, ICmdMsg { + + private String type; + + @Override + public String getCmd() { + return type; + } + + @Override + public void setCmd(String cmd) { + type = cmd; + } + + @Override + public DouyuCmdEnum getCmdEnum() { + return DouyuCmdEnum.getByString(type); + } + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + + @Override + public String toString() { + try { + return OrJacksonUtil.getInstance().writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/base/IDouyuMsg.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/base/IDouyuMsg.java new file mode 100644 index 0000000..5a1dc3d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/base/IDouyuMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IDouyuMsg extends IMsg { +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftListInfo.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftListInfo.java new file mode 100644 index 0000000..9f524d1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftListInfo.java @@ -0,0 +1,136 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GiftListInfo { + + public static final GiftListInfo DEFAULT_GIFT = new GiftListInfo(); + + private BasicInfo basicInfo; + private JsonNode batchInfo; + private int batchInfoFlag; + private int countLimit; + private int defaultSkinId; + private int donateStatus; + private JsonNode effectInfo; + private int effectStatus; + private int endTime; + private JsonNode growthInfo; + private long hitInterval; + private int id; + private int isBatchLimited; + private int isFace; + private String name = "未知礼物"; + private String picUrlPrefix; + private PriceInfo priceInfo = new PriceInfo(); + private int showStatus; + private List skinIds; + private int startTime; + private List tabIds; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + + @Data + public static class BasicInfo { + private String bizTag; + private String borderColor; + private String chatPic; + private String culture; + private String desc1; + private String desc2; + private String focusPic; + private String giftPic; + private int giftType; + private int guardLevel; + private String sendPic; + private String subscriptColor; + private String subscriptText; + private String webSubscriptBigPic; + private String webSubscriptSmallPic; + private String webSubscriptText; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @Data + public static class PriceInfo { + private int price = -1; + private String priceType; + private int returnNum; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftPropInfo.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftPropInfo.java new file mode 100644 index 0000000..ab0fcfc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftPropInfo.java @@ -0,0 +1,99 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GiftPropInfo { + + public static final GiftPropInfo DEFAULT_GIFT = new GiftPropInfo(); + + private String name = "未知礼物"; + private String bimg; + private String himg; + private String cimg; + private int stay_time; + private int show_combo; + private String batch_preset; + private List hit; + private int type; + private int style; + private int pc; + private int ry; + private int ef; + private int effect; + private int is_syn_fs; + private int is_stay; + private String drgb; + private String urgb; + private String grgb; + private String brgb; + private String small_effect_icon; + private String big_effect_icon; + private String effect_icon; + private String gift_icon; + private String gift_open_icon; + private int bonus; + private String web_flash; + private String hit_interval; + private int devote; + private int attack; + private int exp; + private int active_type; + private String pc_full_icon; + private String pc_full_bg_icon; + private int pc_show_combo; + private String pc_urgb; + private String pc_grgb; + private int index; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftPropSingle.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftPropSingle.java new file mode 100644 index 0000000..399ab39 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/dto/GiftPropSingle.java @@ -0,0 +1,97 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GiftPropSingle { + + public static final GiftPropSingle DEFAULT_GIFT = new GiftPropSingle(); + + // key,value + private JsonNode batchInfo; + private String bizTag; + private String borderColor; + private String chatPic; + private int count; + private String description; + private String description2; + private int devote; + // key,value + private JsonNode effectInfo; + private int exp; + private int expiry; + private String focusPic; + private int hitInterval; + private long id; + private int intimate; + private String intro; + private int isClick; + private int isFace; + private int isValuable; + private int level; + private int levelTime; + private int met; + private String name = "未知礼物"; + private String picUrlPrefix; + private int price = -1; + private int priceType; + private String propPic; + private int propType; + private int returnNum; + private String sendPic; + private String subscriptColor; + private String subscriptText; + private String webSubscriptBigPic; + private String webSubscriptSmallPic; + private String webSubscriptText; + + /** + * 未知属性都放在这 + */ + private final Map unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/factory/DouyuMsgFactory.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/factory/DouyuMsgFactory.java new file mode 100644 index 0000000..3a397a7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/msg/factory/DouyuMsgFactory.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.msg.factory; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.lang.UUID; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.*; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.util.DouyuCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class DouyuMsgFactory { + + private static final TimedCache FACTORY_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1), new ConcurrentHashMap<>()); + /** + * 浏览器地址中的房间id,暂不支持短id + */ + private final long roomId; + private volatile static HeartbeatMsg heartbeatMsg; + + public DouyuMsgFactory(long roomId) { + this.roomId = roomId; + } + + public static DouyuMsgFactory getInstance(long roomId) { + if (!FACTORY_CACHE.containsKey(roomId)) { + FACTORY_CACHE.put(roomId, new DouyuMsgFactory(roomId)); + } + return FACTORY_CACHE.get(roomId); + } + + /** + * 创建认证包 + * + * @param mode {@link DouyuClientModeEnum#DANMU}, {@link DouyuClientModeEnum#WS} + * @param ver VER + * @param aver AVER + * @param cookie 浏览器Cookie,发送弹幕时必传 + * @return AuthWebSocketFrame + */ + public ByteBuf createAuth(DouyuClientModeEnum mode, String ver, String aver, String cookie) { + try { + // type@=loginreq/roomid@=7750753/dfl@=/username@=visitor10424697/uid@=1168052601/ver@=20220825/aver@=218101901/ct@=0/ + LoginreqMsg loginreqMsg; + long realRoomId = DouyuApis.getRealRoomId(roomId); + long uid; + String username; + Map cookieMap = OrLiveChatCookieUtil.parseCookieString(cookie); + + if (cookieMap.isEmpty()) { + // 视为未登录 + if (mode == DouyuClientModeEnum.DANMU) { + uid = RandomUtil.randomInt(10000, 19999); + username = "visitor" + RandomUtil.randomInt(1000000000, 1999999999); + loginreqMsg = new LoginreqMsg(realRoomId, "", username, uid, ver, aver); + return DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_PROPERTIES_WHEN_NOT_LOGGED_IN); + } else { + loginreqMsg = new LoginreqMsg(realRoomId, "", "", ver, aver, "", "", "", UUID.fastUUID().toString(true)); + return DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_PROPERTIES_WHEN_LOGGED_IN); + } + } + // 视为登录 + else { + String acfUid = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_ACF_UID, () -> { + throw new BaseException("Cookie中缺少字段" + DouyuApis.KEY_COOKIE_ACF_UID); + }); + uid = NumberUtil.parseLong(acfUid); + username = acfUid; + String dfl = "sn@A=105@Sss@A=1"; + if (mode == DouyuClientModeEnum.DANMU) { + loginreqMsg = new LoginreqMsg(realRoomId, dfl, username, uid, ver, aver); + return DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_PROPERTIES_WHEN_NOT_LOGGED_IN); + } else { + String acfLtkid = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_ACF_LTKID, () -> { + throw new BaseException("Cookie中缺少字段" + DouyuApis.KEY_COOKIE_ACF_LTKID); + }); + String acfStk = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_ACF_STK, () -> { + throw new BaseException("Cookie中缺少字段" + DouyuApis.KEY_COOKIE_ACF_STK); + }); + String dyDid = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_DY_DID, () -> { + throw new BaseException("Cookie中缺少字段" + DouyuApis.KEY_COOKIE_DY_DID); + }); + loginreqMsg = new LoginreqMsg(realRoomId, dfl, username, ver, aver, acfLtkid, "1", acfStk, dyDid); + return DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_PROPERTIES_WHEN_LOGGED_IN); + } + } + } catch (Exception e) { + throw new BaseException(String.format("认证包创建失败,请检查房间号是否正确。roomId: %d, msg: %s", roomId, e.getMessage())); + } + } + + public ByteBuf createAuth(DouyuClientModeEnum mode, String ver, String aver) { + return this.createAuth(mode, ver, aver, null); + } + + public ByteBuf createHeartbeat() { + return DouyuCodecUtil.encode(this.getHeartbeatMsg()); + } + + public ByteBuf createKeeplive(String cookie) { + return DouyuCodecUtil.encode(this.getKeepliveMsg(StrUtil.isNotBlank(cookie) ? "hs-h5" : "")); + } + + /** + * 心跳包单例模式 + * + * @return HeartbeatWebSocketFrame + */ + public HeartbeatMsg getHeartbeatMsg() { + if (heartbeatMsg == null) { + synchronized (DouyuMsgFactory.this) { + if (heartbeatMsg == null) { + heartbeatMsg = new HeartbeatMsg(); + } + } + } + return heartbeatMsg; + } + + private BaseDouyuCmdMsg getKeepliveMsg(String cnd) { + return new KeepliveMsg(cnd); + } + + public ByteBuf createJoingroup() { + JoingroupMsg joingroupMsg = new JoingroupMsg(); + joingroupMsg.setRid(roomId); + return DouyuCodecUtil.encode(joingroupMsg); + } + + public ByteBuf createSub() { + return DouyuCodecUtil.encode(new SubMsg()); + } + + public ByteBuf createDanmu(String msg, String cookie) { + String dyDid = OrLiveChatCookieUtil.getCookieByName(cookie, DouyuApis.KEY_COOKIE_DY_DID, () -> { + throw new BaseException("cookie中缺少参数" + DouyuApis.KEY_COOKIE_DY_DID); + }); + String acfUid = OrLiveChatCookieUtil.getCookieByName(cookie, DouyuApis.KEY_COOKIE_ACF_UID, () -> { + throw new BaseException("cookie中缺少参数" + DouyuApis.KEY_COOKIE_ACF_UID); + }); + ChatmessageMsg chatmessageMsg = new ChatmessageMsg(msg, dyDid, acfUid); + return DouyuCodecUtil.encode(chatmessageMsg); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/util/DouyuCodecUtil.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/util/DouyuCodecUtil.java new file mode 100644 index 0000000..6cf3ba7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/main/java/tech/ordinaryroad/live/chat/client/codec/douyu/util/DouyuCodecUtil.java @@ -0,0 +1,329 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.douyu.util; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.ReflectUtil; +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.HeartbeatReplyMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.IDouyuMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftListInfo; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftPropSingle; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatReflectUtil; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.util.*; + +/** + * 参考:https://open.douyu.com/source/api/63 + * + * @author mjz + * @date 2023/1/6 + */ +@Slf4j +public class DouyuCodecUtil { + + public static final String[] IGNORE_PROPERTIES = {"OBJECT_MAPPER", "unknownProperties"}; + /** + * 以SHOULD_IGNORE开头的成员变量将不会序列化 + */ + public static final String SHOULD_IGNORE_PROPERTIES_PREFIX = "SHOULD_IGNORE"; + + public static final short MSG_TYPE_SEND = 689; + public static final short MSG_TYPE_RECEIVE = 690; + public static final short FRAME_HEADER_LENGTH = 8; + + public static ByteBuf encode(BaseDouyuCmdMsg msg, List containProperties) { + ByteBuf out = ByteBufAllocator.DEFAULT.buffer(FRAME_HEADER_LENGTH); + String bodyDouyuSttString = StrUtil.nullToEmpty(toDouyuSttString(msg, containProperties)) + SUFFIX; + byte[] bodyBytes = bodyDouyuSttString.getBytes(StandardCharsets.UTF_8); + int length = bodyBytes.length + FRAME_HEADER_LENGTH; + out.writeIntLE(length); + out.writeIntLE(length); + out.writeShortLE(MSG_TYPE_SEND); + out.writeByte(0); + out.writeByte(0); + out.writeBytes(bodyBytes); + return out; + } + + public static ByteBuf encode(BaseDouyuCmdMsg msg) { + return encode(msg, null); + } + + public static List decode(ByteBuf in) { + List msgList = new ArrayList<>(); + Queue pendingByteBuf = new LinkedList<>(); + + do { + Optional msg = doDecode(in, pendingByteBuf); + msg.ifPresent(msgList::add); + in = pendingByteBuf.poll(); + } while (in != null); + + return msgList; + } + + /** + * 执行解码操作 + * + * @param in handler收到的一条消息 + * @param pendingByteBuf 用于存放未读取完的ByteBuf + * @return Optional 何时为空值:不支持的{@link DouyuCmdEnum},{@link #parseDouyuSttString(String, short)}反序列化失败 + */ + private static Optional doDecode(ByteBuf in, Queue pendingByteBuf) { + int length = in.readIntLE(); + in.readIntLE(); + // MSG_TYPE_RECEIVE + short msgType = in.readShortLE(); + if (msgType != MSG_TYPE_RECEIVE) { + log.error("decode消息类型 非 收到的消息"); + } + in.readByte(); + in.readByte(); + int contentLength = length - FRAME_HEADER_LENGTH; + byte[] inputBytes = new byte[contentLength]; + in.readBytes(inputBytes); + if (in.readableBytes() != 0) { + // log.error("in.readableBytes() {}", in.readableBytes()); + pendingByteBuf.offer(in); + } + + String bodyDouyuSttString = new String(inputBytes, 0, inputBytes.length - 1); + return Optional.ofNullable(parseDouyuSttString(bodyDouyuSttString, msgType)); + } + + public static final String SPLITTER = "@="; + public static final String END = "/"; + public static final String SUFFIX = "\0"; + + /** + *
{@code @S/ -> @AS@S}
+ * + * @param string + * @return + */ + public static String escape(String string) { +// return string == null ? StrUtil.EMPTY : (string.replaceAll("/", "@S").replaceAll("@", "@A")); + return string == null ? StrUtil.EMPTY : (string.replaceAll("@", "@A").replaceAll("/", "@S")); + } + + /** + *
{@code @AS@S -> @S/}
+ * + * @param string + * @return + */ + public static String unescape(String string) { + return string == null ? StrUtil.EMPTY : (string.replaceAll("@S", "/").replaceAll("@A", "@")); + } + + public static String toDouyuSttString(Object object, List containProperties) { + StringBuffer sb = new StringBuffer(); + if (object instanceof IDouyuMsg) { + Class objectClass = object.getClass(); + Field[] fields = ReflectUtil.getFields(objectClass, field -> { + String name = field.getName(); + if (CollUtil.isNotEmpty(containProperties)) { + return containProperties.contains(name); + } else { + return !name.startsWith(SHOULD_IGNORE_PROPERTIES_PREFIX) && !ArrayUtil.contains(IGNORE_PROPERTIES, name); + } + }); + for (Field field : fields) { + String key = field.getName(); + Method method = OrLiveChatReflectUtil.getGetterMethod(objectClass, key); + Object value = ReflectUtil.invoke(object, method); + String douyuSttString = toDouyuSttString(value, containProperties); + String escape = escape(douyuSttString); + sb.append(escape(key)) + .append(SPLITTER) + .append(escape) + .append(END); + } + } else { + if (object instanceof Iterable) { + Iterable iterable = (Iterable) object; + StringBuffer iterableStringBuffer = new StringBuffer(); + for (Object o : iterable) { + String douyuSttString = toDouyuSttString(o, containProperties); + String escape = escape(douyuSttString); + iterableStringBuffer.append(escape) + .append(END); + } + sb.append((iterableStringBuffer.toString())); + } else if (object instanceof Map) { + Map map = (Map) object; + StringBuffer mapStringBuffer = new StringBuffer(); + map.forEach((mapKey, mapValue) -> { + mapStringBuffer.append(escape(StrUtil.toStringOrNull(mapKey))) + .append(SPLITTER) + .append(escape(toDouyuSttString(mapValue, containProperties))) + .append(END); + }); + sb.append((mapStringBuffer.toString())); + } else { + sb.append((StrUtil.nullToEmpty(StrUtil.toStringOrNull(object)))); + } + } + return sb.toString(); + } + + public static String toDouyuSttString(Object object) { + return toDouyuSttString(object, null); + } + + public static IDouyuMsg parseDouyuSttString(String string, short msgType) { + Map stringObjectMap = parseDouyuSttStringToMap(string); + String type = (String) stringObjectMap.get("type"); + DouyuCmdEnum cmdEnum = DouyuCmdEnum.getByString(type); + + Class msgClass = getDouyuMsgClassByType(cmdEnum, msgType); + if (msgClass == null) { + // TODO 不支持的cmdEnum + if (log.isWarnEnabled()) { + log.warn("暂不支持 cmdEnum {}, msgType {}", cmdEnum, msgType); + } + return null; + } + + IDouyuMsg t = ReflectUtil.newInstance(msgClass); + stringObjectMap.forEach((key, value) -> { + Field field = ReflectUtil.getField(t.getClass(), key); + // 未知key + if (field == null) { + // Object -> JsonNode + ((BaseDouyuCmdMsg) t).setOther(key, OrJacksonUtil.getInstance().valueToTree(value)); + // log.debug("未知key {} {},已存放于unknownProperties中", msgClass, key); + } else { + ReflectUtil.setFieldValue(t, field, value); + } + }); + + // 礼物消息设置礼物信息字段 + if (t instanceof DgbMsg) { + DgbMsg msg = (DgbMsg) t; + String pid = msg.getPid(); + // 通用礼物 + if (StrUtil.isNotBlank(pid)) { + GiftPropSingle giftSingle = DouyuApis.giftMap.get(pid, () -> { + GiftPropSingle gift = GiftPropSingle.DEFAULT_GIFT; + try { + gift = DouyuApis.getGiftPropSingleByPid(pid); + } catch (Exception e) { + log.error("礼物信息获取失败, pid=" + pid, e); + } + return gift; + }); + msg.setGiftInfo(giftSingle); + } + // 房间礼物 + else { + String realRoomId = msg.getRid(); + if (DouyuApis.roomGiftMap.containsKey(realRoomId)) { + Map stringGiftListInfoMap = DouyuApis.roomGiftMap.get(realRoomId); + msg.setRoomGiftInfo(stringGiftListInfoMap.getOrDefault(String.valueOf(msg.getGfid()), GiftListInfo.DEFAULT_GIFT)); + } + } + } + + return t; + } + + public static Object parseDouyuSttStringToObject(String value) { + Object valueObject; + if (StrUtil.isBlank(value)) { + return null; + } + if (value.contains(SPLITTER) && value.contains(END)) { + // log.debug("map valueObject {}", value); + valueObject = parseDouyuSttStringToMap(value); + } + // List + else if (!value.contains(SPLITTER) && value.contains(END)) { + // log.debug("list valueObject {}", value); + List list = new ArrayList<>(); + for (String s : value.split(END)) { + list.add(parseDouyuSttStringToObject(unescape(s))); + } + valueObject = list; + } + // String + else { + valueObject = value; + } + return valueObject; + } + + public static Map parseDouyuSttStringToMap(String string) { + Map stringObjectMap = new HashMap<>(); + for (String s : string.split(END)) { + String[] entry = s.split(SPLITTER); + String key = unescape(entry[0]); + String value = unescape(ArrayUtil.get(entry, 1)); + Object valueObject = parseDouyuSttStringToObject(value); + stringObjectMap.put(key, valueObject); + } + return stringObjectMap; + } + + public static Class getDouyuMsgClassByType(DouyuCmdEnum douyuCmdEnum, short msgType) { + if (douyuCmdEnum == null) { + return (Class) DouyuCmdMsg.class; + } + + Class msgClass; + Class tClass = douyuCmdEnum.getTClass(); + if (tClass == null) { + if (douyuCmdEnum == DouyuCmdEnum.mrkl) { + if (msgType == MSG_TYPE_RECEIVE) { + msgClass = HeartbeatReplyMsg.class; + } else if (msgType == MSG_TYPE_SEND) { + msgClass = HeartbeatMsg.class; + } else { + msgClass = null; + } + } else { + msgClass = DouyuCmdMsg.class; + } + } else { + msgClass = tClass; + } + return (Class) msgClass; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyu/api/DouyuApisTest.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyu/api/DouyuApisTest.java new file mode 100644 index 0000000..444b974 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyu/api/DouyuApisTest.java @@ -0,0 +1,30 @@ +package tech.ordinaryroad.live.chat.client.codec.douyu.api; + +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftPropSingle; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * @author mjz + * @date 2023/8/30 + */ +class DouyuApisTest { + + @Test + void getRealRoomId() { + assertEquals(2947432, DouyuApis.getRealRoomId(92000)); + assertEquals(3168536, DouyuApis.getRealRoomId(3168536)); + assertEquals(290935, DouyuApis.getRealRoomId(22222)); + assertEquals(290935, DouyuApis.getRealRoomId(290935)); + assertEquals(520, DouyuApis.getRealRoomId(520)); + assertThrows(RuntimeException.class, () -> DouyuApis.getRealRoomId(-1)); + } + + @Test + void getGiftInfo() { + GiftPropSingle giftByPid = DouyuApis.getGiftPropSingleByPid("4"); + assertEquals("赞", giftByPid.getName()); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-douyu/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyu/util/DouyuCodecUtilTest.java b/live-chat-client-codec/live-chat-client-codec-douyu/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyu/util/DouyuCodecUtilTest.java new file mode 100644 index 0000000..012e3b9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-douyu/src/test/java/tech/ordinaryroad/live/chat/client/codec/douyu/util/DouyuCodecUtilTest.java @@ -0,0 +1,102 @@ +package tech.ordinaryroad.live.chat.client.codec.douyu.util; + +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.IDouyuMsg; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +/** + * @author mjz + * @date 2023/8/27 + */ +class DouyuCodecUtilTest { + + @Test + void test() { + String loginres = "type@=loginres/userid@=1235403446/roomgroup@=0/pg@=0/sessionid@=0/username@=/nickname@=/live_stat@=0/is_illegal@=0/ill_ct@=/ill_ts@=0/now@=0/ps@=0/es@=0/it@=0/its@=0/npv@=0/best_dlev@=0/cur_lev@=0/nrc@=2785047409/ih@=0/sid@=72256/sahf@=0/sceneid@=0/newrg@=0/regts@=0/ip@=112.43.93.229/rn@=0/rct@=0/"; + String pingreq = "type@=pingreq/tick@=1693128084471/"; + String mrkl = "type@=mrkl/"; + String subres = "type@=subres/res@=0/"; + String mapkb = "type@=mapkb/cmd@=3/rid@=5515841/pk_time@=600/lt@=156/teams@=team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S/members@=rid@AA=5515841@ASuid@AA=219585944@ASnick@AA=喵小莎@ASicon@AA=avatar_v3@AAS202303@AAS4cab38d935004acfab53f77a730c9d42@ASstatus@AA=0@ASsc@AA=100000@AStime@AA=1693127363@ASteam@AA=3@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8733064@ASuid@AA=364378905@ASnick@AA=阿允唱情歌@ASicon@AA=avatar_v3@AAS202008@AAS31b239d8af174462b5e0a2990c70b818@ASstatus@AA=0@ASsc@AA=600000@AStime@AA=1693127527@ASteam@AA=6@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=10673032@ASuid@AA=442218984@ASnick@AA=果酱Broly@ASicon@AA=avatar_v3@AAS202306@AASf7d61a0ea3bb4c179af7b5e24f94953e@ASstatus@AA=0@ASsc@AA=200@AStime@AA=1693127347@ASteam@AA=1@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=533813@ASuid@AA=36922190@ASnick@AA=正直博@ASicon@AA=avatar_v3@AAS202212@AAS4e340983996f43b991ffa50af7b956f6@ASstatus@AA=0@ASsc@AA=302000@AStime@AA=1693127348@ASteam@AA=2@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8031896@ASuid@AA=243111494@ASnick@AA=青榎@ASicon@AA=avatar_v3@AAS202305@AAS8bd800d3bb8d4e16884dcb3e3f77b038@ASstatus@AA=0@ASsc@AA=456000@AStime@AA=1693127393@ASteam@AA=4@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=7009686@ASuid@AA=299482114@ASnick@AA=紫薇同学@ASicon@AA=avatar_v3@AAS202302@AASb67044b78b494b0896fd6738bc2d5b7b@ASstatus@AA=0@ASsc@AA=660000@AStime@AA=1693127424@ASteam@AA=5@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@S/subcmd@=0/pkm@=0/rlt@=0/"; + String pdrinfo = "giftId@=23518/total@=total@A=3@Snum@A=0@Sfin@A=0@S/actStatus@=1/time@=1693158017596/type@=pdrinfo/dayFin@=0/list@=1@A=total@AAA=6@AASnum@AAA=6@AASpid@AAA=2682@AASfin@AAA=1@AAS@AStotal@AAA=600@AASnum@AAA=336@AASpid@AAA=2680@AASfin@AAA=0@AAS@AS@S100@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2685@AASfin@AAA=0@AAS@AStotal@AAA=100@AASnum@AAA=5@AASpid@AAA=2682@AASfin@AAA=0@AAS@AS@S10@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2683@AASfin@AAA=0@AAS@AStotal@AAA=80@AASnum@AAA=35@AASpid@AAA=2681@AASfin@AAA=0@AAS@AS@S/"; + + Map map = new HashMap<>(); + map.put("loginres", loginres); + map.put("pingreq", pingreq); + map.put("mrkl", mrkl); + map.put("subres", subres); + map.put("mapkb", mapkb); + map.put("pdrinfo", pdrinfo); + + map.forEach((string, string2) -> { + BaseDouyuCmdMsg baseDouyuCmdMsg = (BaseDouyuCmdMsg) DouyuCodecUtil.parseDouyuSttString(string2, DouyuCodecUtil.MSG_TYPE_RECEIVE); + assertNotNull(baseDouyuCmdMsg); + String cmd = baseDouyuCmdMsg.getCmd(); + assertEquals(string, cmd); + }); + } + + @Test + void decodeTest() { + String mapkb = "type@=mapkb/cmd@=3/rid@=5515841/pk_time@=600/lt@=156/teams@=team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S/members@=rid@AA=5515841@ASuid@AA=219585944@ASnick@AA=喵小莎@ASicon@AA=avatar_v3@AAS202303@AAS4cab38d935004acfab53f77a730c9d42@ASstatus@AA=0@ASsc@AA=100000@AStime@AA=1693127363@ASteam@AA=3@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8733064@ASuid@AA=364378905@ASnick@AA=阿允唱情歌@ASicon@AA=avatar_v3@AAS202008@AAS31b239d8af174462b5e0a2990c70b818@ASstatus@AA=0@ASsc@AA=600000@AStime@AA=1693127527@ASteam@AA=6@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=10673032@ASuid@AA=442218984@ASnick@AA=果酱Broly@ASicon@AA=avatar_v3@AAS202306@AASf7d61a0ea3bb4c179af7b5e24f94953e@ASstatus@AA=0@ASsc@AA=200@AStime@AA=1693127347@ASteam@AA=1@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=533813@ASuid@AA=36922190@ASnick@AA=正直博@ASicon@AA=avatar_v3@AAS202212@AAS4e340983996f43b991ffa50af7b956f6@ASstatus@AA=0@ASsc@AA=302000@AStime@AA=1693127348@ASteam@AA=2@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8031896@ASuid@AA=243111494@ASnick@AA=青榎@ASicon@AA=avatar_v3@AAS202305@AAS8bd800d3bb8d4e16884dcb3e3f77b038@ASstatus@AA=0@ASsc@AA=456000@AStime@AA=1693127393@ASteam@AA=4@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=7009686@ASuid@AA=299482114@ASnick@AA=紫薇同学@ASicon@AA=avatar_v3@AAS202302@AASb67044b78b494b0896fd6738bc2d5b7b@ASstatus@AA=0@ASsc@AA=660000@AStime@AA=1693127424@ASteam@AA=5@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@S/subcmd@=0/pkm@=0/rlt@=0/"; + Map stringObjectMap = DouyuCodecUtil.parseDouyuSttStringToMap(mapkb); + assertNotNull(stringObjectMap); + stringObjectMap.forEach((string, o) -> { + System.out.println(string); + }); + } + + @Test + void decodeTest2() { + String pdrinfo = "giftId@=23518/total@=total@A=3@Snum@A=0@Sfin@A=0@S/actStatus@=1/time@=1693158017596/type@=pdrinfo/dayFin@=0/list@=1@A=total@AAA=6@AASnum@AAA=6@AASpid@AAA=2682@AASfin@AAA=1@AAS@AStotal@AAA=600@AASnum@AAA=336@AASpid@AAA=2680@AASfin@AAA=0@AAS@AS@S100@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2685@AASfin@AAA=0@AAS@AStotal@AAA=100@AASnum@AAA=5@AASpid@AAA=2682@AASfin@AAA=0@AAS@AS@S10@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2683@AASfin@AAA=0@AAS@AStotal@AAA=80@AASnum@AAA=35@AASpid@AAA=2681@AASfin@AAA=0@AAS@AS@S/"; + Map stringObjectMap = DouyuCodecUtil.parseDouyuSttStringToMap(pdrinfo); + assertNotNull(stringObjectMap); + stringObjectMap.forEach((string, o) -> { + System.out.println(string); + }); + } + + @Test + void toDouyuSttStringTest() { + String douyuSttString = DouyuCodecUtil.toDouyuSttString(new HashMap() {{ + put("key1", "value1"); + put("key2", 2); + put("key3", new ArrayList>() {{ + add(new HashMap() {{ + put("11", 11); + put("12", 12); + }}); + add(new HashMap() {{ + put("21", 21); + put("22", 22); + }}); + }}); + }}); + System.out.println(douyuSttString); + assertEquals("key1@=value1/key2@=2/key3@=11@AA=11@AS12@AA=12@AS@S22@AA=22@AS21@AA=21@AS@S/".length(), douyuSttString.length()); + } + + @Test + void codecTest() { + String mapkb = "type@=mapkb/pk_time@=600/teams@=team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S/"; + IDouyuMsg iDouyuMsg = DouyuCodecUtil.parseDouyuSttString(mapkb, DouyuCodecUtil.MSG_TYPE_RECEIVE); + String douyuSttString = DouyuCodecUtil.toDouyuSttString(iDouyuMsg); + System.out.println(mapkb); + System.out.println(douyuSttString); + assertEquals(mapkb.length(), douyuSttString.length()); + IDouyuMsg douyuSttStringMsg = DouyuCodecUtil.parseDouyuSttString(douyuSttString, DouyuCodecUtil.MSG_TYPE_RECEIVE); + assertNotNull(douyuSttStringMsg); + } + + @Test + void unescape() { + String unescape = DouyuCodecUtil.unescape("team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S"); + System.out.println(unescape); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-huya/pom.xml b/live-chat-client-codec/live-chat-client-codec-huya/pom.xml new file mode 100644 index 0000000..b3f4699 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/pom.xml @@ -0,0 +1,51 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client-codec + 0.7.0 + + jar + + live-chat-client-codec-huya + live-chat-client-codec-huya + + + UTF-8 + + + + + com.tencent.tars + tars-core + + + + tech.ordinaryroad + live-chat-client-commons-base + + + + tech.ordinaryroad + live-chat-client-commons-util + + + + io.netty + netty-codec + + + + ch.qos.logback + logback-classic + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/api/HuyaApis.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/api/HuyaApis.java new file mode 100644 index 0000000..76fa484 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/api/HuyaApis.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.api; + +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpStatus; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import lombok.Cleanup; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.PropsItem; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatHttpUtil; + +import java.util.HashMap; +import java.util.Map; + +/** + * API简易版 + *
+ * vplayerUI.js + *
+ * taf-signal.global.0.0.4.prod.js + * + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +public class HuyaApis { + + // TODO TimedCache + public static final Map GIFT_ITEMS = new HashMap<>(); + + public static JsonNode roomInit(Object roomId) { + @Cleanup + HttpResponse response = createGetRequest("https://www.huya.com/" + roomId, null).execute(); + if (response.getStatus() != HttpStatus.HTTP_OK) { + throw new BaseException("获取" + roomId + "真实房间ID失败"); + } + String body = response.body(); + String lSubChannelId = ReUtil.getGroup1("\"lp\"\\D+(\\d+)", body); + String lChannelId = ReUtil.getGroup1("\"lp\"\\D+(\\d+)", body); + String lYyid = ReUtil.getGroup1("\"yyid\"\\D+(\\d+)", body); + ObjectNode objectNode = OrJacksonUtil.getInstance().createObjectNode(); + objectNode.put("lSubChannelId", StrUtil.emptyToDefault(lSubChannelId, "0")); + objectNode.put("lChannelId", StrUtil.emptyToDefault(lChannelId, "0")); + objectNode.put("lYyid", lYyid); + return objectNode; + } + + public static HttpRequest createGetRequest(String url, String cookies) { + return OrLiveChatHttpUtil.createGet(url) + .cookie(cookies); + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaClientTemplateTypeEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaClientTemplateTypeEnum.java new file mode 100644 index 0000000..4fc58c7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaClientTemplateTypeEnum.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaClientTemplateTypeEnum { + + TPL_LIANYUN(128), + TPL_PC(64), + TPL_WEB(32), + TPL_JIEDAI(16), + TPL_TEXAS(8), + TPL_MATCH(4), + TPL_HUYAAPP(2), + TPL_MIRROR(1), + TPL_QQ_MINI(256), + ; + + private final int code; + + public static HuyaClientTemplateTypeEnum getByCode(int code) { + for (HuyaClientTemplateTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaCmdEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaCmdEnum.java new file mode 100644 index 0000000..d3f7972 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaCmdEnum.java @@ -0,0 +1,204 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaCmdEnum { + + NobleNotice(1001), + NobleEnterNotice_1002(1002), + NobleEnterNotice_1005(1005), + NobleLevelNotice(1006), + MessageNotice(1400), + ExpressionEmoticonNotice_1420(1420), + ExpressionEmoticonNotice_1422(1422), + OpenEmojiTrialNotice(1441), + SubscribeInfoNotify(3104), + PublicMessageAreaGuideWindow(6074), + WeekStarPropsIds_6100(6100), + WeekStarPropsIdsTab(6102), + /** + * https://dev.huya.com/docs/miniapp/dev/scenario/vip-event/ + */ + VipEnterBanner(6110), + VipBarListStatInfo(6211), + EnterPushInfo(6200), + GameAdvertisement(6201), + ViewerListRsp(6203), + VipBarListRsp(6210), + UserWeekRankScoreInfo(6219), + WeekRankListRsp(6220), + WeekRankEnterBanner(6221), + FansSupportListRsp(6223), + FansRankListRsp(6230), + BadgeInfo(6231), + BadgeScoreChanged(6232), + FansInfoNotice(6233), + UserGiftNotice(6234), + WeekStarPropsIds_6235(6235), + SuperFansExtendInfo(6245), + TrialFansBadgeScoreChanged(6246), + GuardianCountChangedNotice(6249), + GiftBarRsp(6250), + GrandCeremonyChampionPresenter(6260), + NewsTicker(6290), + SendItemSubBroadcastPacket(6501), + SendItemNoticeWordBroadcastPacket(6502), + ShowScreenSkinNotify(6640), + HideScreenSkinNotify(6641), + ActivetyBarrageNotice(6650), + BannerNotice(6291), + OnTVPanel_6294(6294), + OnTVPanel_6295(6295), + OnTVData(6296), + OnTVEndNotice(6297), + OnTVBarrageNotice(6298), + CheckRoomStatus(6340), + SendItemNoticeGameBroadcastPacket(6507), + SendItemActivityNoticeBroadcastPacket(6508), + SendItemOtherBroadcastPacket(6514), + GiftStatusNotify(6515), + ActivitySpecialNoticeBroadcastPacket(6540), + UserDIYMountsChanged(6575), + ObtainDecoNotify(6590), + TreasureResultBroadcastPacket(6602), + TreasureUpdateNotice(6604), + TreasureLotteryResultNoticePacket(6605), + TreasureBoxPanel(6606), + TreasureBoxBigAwardNotice(6607), + ItemLotterySubNotice(6616), + ItemLotteryGameNotice(6617), + FansBadgeLevelUpNotice(6710), + FansPromoteNotice(6711), + ActCommPanelChangeNotify(6647), + MatchRaffleResultNotice(7055), + BatchGameInfoNotice(7500), + GameInfoChangeNotice(7501), + EndHistoryGameNotice(7502), + GameSettlementNotice(7503), + PresenterEndGameNotice(7504), + PresenterLevelNotice_7708(7708), + PresenterLevelNotice_7709(7709), + EffectsConfChangeNoticeMsg(7772), + BeginLiveNotice(8000), + EndLiveNotice(8001), + StreamSettingNotice(8002), + LiveInfoChangedNotice(8004), + AttendeeCountNotice(8006), + ReplayPresenterInLiveNotify(9010), + RoomAuditWarningNotice(10039), + AuditorEnterLiveNotice(10040), + AuditorRoleChangeNotice(10041), + GetRoomAuditConfRsp(10042), + UserConsumePrivilegeChangeNotice(10047), + LinkMicStatusChangeNotice(42008), + InterveneCountRsp(44000), + PushUserLevelTaskCompleteNotice(1130055), + GuardianPresenterInfoNotice(1020001), + SupportCampInfoRsp(1025300), + UserSupportCampRsp(1025301), + UserSupportEffectRsp(1025302), + WSRedirect(1025305), + HuYaUdbNotify(10220051), + infoBody(10220053), + UnionAuthPushMsg(10220054), + RMessageNotify(1025000), + PushPresenterAdNotice(1025493), + RoomAdInfo(1025504), + PushAdInfo_1025562(1025562), + PushAdInfo_1025564(1025564), + PushAdInfo_1025566(1025566), + AdExtServer_PushOfflineInfo(1025569), + WSP2POpenNotify(1025307), + WSP2PCloseNotify(1025308), + LiveMeetingSyncNotice(1025601), + MakeFriendsPKInfo(1025604), + LiveRoomTransferNotice(1025605), + GetPugcVipListRsp(1025800), + PugcVipInfo(1025801), + StreamChangeNotice(100000), + PayLiveRoomNotice(1033001), + MatchEndNotice(1034001), + LiveRoomProfileChangedNotice(1035400), + ACOrderInfo(1060003), + WEBACT_Message(1080000), + MultiPKNotice(1090007), + MultiPKPanelInfo(1090009), + AiBarrageDetectNotify(1100003), + FloatMomentNotice(1130050), + FloatBallNotice(1130052), + VoiceMuteJsonInfo(1200000), + PixelateInfo(1200001), + MpsDeliverData_1210000(1210000), + MpsDeliverData_1220000(1220000), + ActivityMsgRsp(1010003), + Message_1040000(1040000), + Message_1040002(1040002), + LiveEventMessage(1040003), + LiveViewLimitChangeNotice(1035100), + PrivilegeRenewalNotice(1035101), + MatchRecLiveInfo(1029001), + GetBattleTeamInfoRsp(1029002), + MatchGuess_MatchCmdColorNotify(1025312), + GameStatusInfo(1130003), + MatchPlaybackPointNotice(1150001), + PushFaceDirectorCurrentProgram(1130070), + JoinSplitScreenNotice(1500001), + LeaveSplitScreenNotice(1500002), + GameLivePromoteNotify(1800009), + MotorcadeGatherBeginNotice(2000001), + MotorcadeGatherEndNotice(2000002), + MotorcadeGatherResponseNotice(2000003), + MotorcadeActivityPanel(2000041), + MessageRichTextNotice(2001231), + MultiVideoSyncNotice(2400001), + PassParcelChangeNotify(2400002), + MatchLiveCommentorChangeNotify(2400020), + MessageEasterEggNotice(2001203), + MessageEasterEggToastNotice(2001202), + UserFollowStrollIconNotice(2410001), + UserFollowStrollBarrageNotice(2410002), + LiveMatch_MatchLiveRoomRecMsg(2500406), + ; + + private final long code; + + public static HuyaCmdEnum getByCode(long code) { + for (HuyaCmdEnum value : HuyaCmdEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaDecorationAppTypeEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaDecorationAppTypeEnum.java new file mode 100644 index 0000000..befe2ac --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaDecorationAppTypeEnum.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaDecorationAppTypeEnum { + + kDecorationAppTypeCommon(100), + kDecorationAppTypeContentBubble(5000), + kDecorationAppTypeContentBubbleNew(5001), + kDecorationAppTypeEffectsMessenger(5002), + kDecorationAppTypeMsgInterConnect(5010), + kDecorationAppTypeMsgLocation(5011), + kDecorationAppTypeChannel(10000), + kDecorationAppTypeGuildAdmin(10090), + kDecorationAppTypeAdmin(10100), + kDecorationAppTypeDaiyanClub(10150), + kDecorationAppTypeNoble(10200), + KDecorationAppTypeGuildVip(10210), + kDecorationAppTypeGuard(10300), + kDecorationAppTypeDiamondUser_V2(10310), + kDecorationAppTypeTeamMedalV2(10350), + kDecorationAppTypeTrialFans(10399), + kDecorationAppTypeFans(10400), + kDecorationAppTypeWatchTogetherVip(10425), + kDecorationAppTypeTeamMedal(10450), + kDecorationAppTypeVIP(10500), + kDecorationAppTypeUserProfile(10560), + kDecorationAppTyperPurpleDiamond(10600), + kDecorationAppTypeStamp(10700), + KDecorationAppTypeNobleEmoticon(10800), + KDecorationAppTypeAnotherAi(10801), + KDecorationAppTypePresenter(10900), + KDecorationAppTypeFirstRecharge(11000), + kDecorationAppTypeCheckRoom(11100), + kDecorationAppTypeTWatch(11101), + kDecorationAppTypeEasterEgg(11102), + kDecorationAppTypeRepeatMessengeFilter(11103), + kDecorationAppTypeEasterEggCounter(11104), + kDecorationAppTypeACOrderIntimacy(12001), + kDecorationAppTypeSuperWord(13000), + kDecorationAppTypeDiamondUser(14000), + kDecorationAppTypeRedBag(15000), + kDecorationAppTypeUsrAvatarDeco(100009), + kDecorationAppTypeUsrBeautyId(100100), + ; + + private final int code; + + public static HuyaDecorationAppTypeEnum getByCode(int code) { + for (HuyaDecorationAppTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaDecorationViewTypeEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaDecorationViewTypeEnum.java new file mode 100644 index 0000000..3fe7909 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaDecorationViewTypeEnum.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaDecorationViewTypeEnum { + + kDecorationViewTypeCustomized(0), + kDecorationViewTypeText(1), + kDecorationViewTypeIcon(2), + kDecorationViewTypeSuperWord(4), + ; + + private final int code; + + public static HuyaDecorationViewTypeEnum getByCode(int code) { + for (HuyaDecorationViewTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaGenderEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaGenderEnum.java new file mode 100644 index 0000000..ab3916d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaGenderEnum.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaGenderEnum { + + MALE(0), + FEMALE(1), + ; + private final int code; + + public static HuyaGenderEnum getByCode(int code) { + for (HuyaGenderEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaLiveSource.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaLiveSource.java new file mode 100644 index 0000000..531d0de --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaLiveSource.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaLiveSource { + + PC_YY(0), + PC_HUYA(1), + MOBILE_HUYA(2), + WEB_HUYA(3), + ; + + private final int code; + + public static HuyaLiveSource getByCode(int code){ + for (HuyaLiveSource value : values()) { + if (value.getCode()==code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaOperationEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaOperationEnum.java new file mode 100644 index 0000000..55c2b01 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaOperationEnum.java @@ -0,0 +1,97 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaOperationEnum { + EWSCmd_NULL(0), + EWSCmd_RegisterReq(1), + EWSCmd_RegisterRsp(2), + EWSCmd_WupReq(3), + EWSCmd_WupRsp(4), + EWSCmdC2S_HeartBeat(5), + EWSCmdS2C_HeartBeatAck(6), + EWSCmdS2C_MsgPushReq(7), + EWSCmdC2S_DeregisterReq(8), + EWSCmdS2C_DeRegisterRsp(9), + EWSCmdC2S_VerifyCookieReq(10), + EWSCmdS2C_VerifyCookieRsp(11), + EWSCmdC2S_VerifyHuyaTokenReq(12), + EWSCmdS2C_VerifyHuyaTokenRsp(13), + EWSCmdC2S_UNVerifyReq(14), + EWSCmdS2C_UNVerifyRsp(15), + EWSCmdC2S_RegisterGroupReq(16), + EWSCmdS2C_RegisterGroupRsp(17), + EWSCmdC2S_UnRegisterGroupReq(18), + EWSCmdS2C_UnRegisterGroupRsp(19), + EWSCmdC2S_HeartBeatReq(20), + EWSCmdS2C_HeartBeatRsp(21), + EWSCmdS2C_MsgPushReq_V2(22), + EWSCmdC2S_UpdateUserExpsReq(23), + EWSCmdS2C_UpdateUserExpsRsp(24), + EWSCmdC2S_WSHistoryMsgReq(25), + EWSCmdS2C_WSHistoryMsgRsp(26), + EWSCmdS2C_EnterP2P(27), + EWSCmdS2C_EnterP2PAck(28), + EWSCmdS2C_ExitP2P(29), + EWSCmdS2C_ExitP2PAck(30), + EWSCmdC2S_SyncGroupReq(31), + EWSCmdS2C_SyncGroupRsp(32), + EWSCmdC2S_UpdateUserInfoReq(33), + EWSCmdS2C_UpdateUserInfoRsp(34), + EWSCmdC2S_MsgAckReq(35), + EWSCmdS2C_MsgAckRsp(36), + EWSCmdC2S_CloudGameReq(37), + EWSCmdS2C_CloudGamePush(38), + EWSCmdS2C_CloudGameRsp(39), + EWSCmdS2C_RpcReq(40), + EWSCmdC2S_RpcRsp(41), + EWSCmdS2C_RpcRspRsp(42), + EWSCmdC2S_GetStunPortReq(101), + EWSCmdS2C_GetStunPortRsp(102), + EWSCmdC2S_WebRTCOfferReq(103), + EWSCmdS2C_WebRTCOfferRsp(104), + EWSCmdC2S_SignalUpgradeReq(105), + EWSCmdS2C_SignalUpgradeRsp(106), + ; + private final int code; + + public static HuyaOperationEnum getByCode(int code) { + for (HuyaOperationEnum value : HuyaOperationEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaStreamLineTypeEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaStreamLineTypeEnum.java new file mode 100644 index 0000000..906c21d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaStreamLineTypeEnum.java @@ -0,0 +1,62 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaStreamLineTypeEnum { + + STREAM_LINE_OLD_YY(0), + STREAM_LINE_WS(1), + STREAM_LINE_NEW_YY(2), + STREAM_LINE_AL(3), + STREAM_LINE_HUYA(4), + STREAM_LINE_TX(5), + STREAM_LINE_CDN(8), + STREAM_LINE_HW(6), + STREAM_LINE_BD(7), + STREAM_LINE_GG(9), + STREAM_LINE_CF(10), + STREAM_LINE_QUICK_HUYA(99), + ; + + private final int code; + + public static HuyaStreamLineTypeEnum getByCode(int code) { + for (HuyaStreamLineTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaWupFunctionEnum.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaWupFunctionEnum.java new file mode 100644 index 0000000..6811b2b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/constant/HuyaWupFunctionEnum.java @@ -0,0 +1,59 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.constant; + +import cn.hutool.core.util.StrUtil; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaWupFunctionEnum { + + doLaunch, + speak, + getPropsList, + OnUserHeartBeat, + getLivingInfo, + sendMessage, + ; + + public static HuyaWupFunctionEnum getByName(String name) { + if (StrUtil.isBlank(name)) { + return null; + } + + for (HuyaWupFunctionEnum value : values()) { + if (value.name().equals(name)) { + return value; + } + } + return null; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/ConnectParaInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/ConnectParaInfo.java new file mode 100644 index 0000000..1d8d1a5 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/ConnectParaInfo.java @@ -0,0 +1,105 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ConnectParaInfo extends TarsStructBase { + + private long lUid = 0; + private String sGuid = ""; + private String sUA = ""; + private String sAppSrc = ""; + private String sMid = ""; + private String sExp = ""; + private int iTokenType = 0; + private String sToken = ""; + private String sCookie = ""; + private String sTraceId = ""; + private Map mCustomHeaders = new HashMap() {{ + put("", ""); + }}; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sGuid, 1); + os.write(this.sUA, 2); + os.write(this.sAppSrc, 3); + os.write(this.sMid, 4); + os.write(this.sExp, 5); + os.write(this.iTokenType, 6); + os.write(this.sToken, 7); + os.write(this.sCookie, 8); + os.write(this.sTraceId, 9); + os.write(this.mCustomHeaders, 10); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sGuid = is.read(this.sGuid, 1, false); + this.sUA = is.read(this.sUA, 2, false); + this.sAppSrc = is.read(this.sAppSrc, 3, false); + this.sMid = is.read(this.sMid, 4, false); + this.sExp = is.read(this.sExp, 5, false); + this.iTokenType = is.read(this.iTokenType, 6, false); + this.sToken = is.read(this.sToken, 7, false); + this.sCookie = is.read(this.sCookie, 8, false); + this.sTraceId = is.read(this.sTraceId, 9, false); + this.mCustomHeaders = is.readMap(this.mCustomHeaders, 10, false); + } + + public static ConnectParaInfo newWSConnectParaInfo(String ver, String sExp, String appSrc) { + ConnectParaInfo wsConnectParaInfo = new ConnectParaInfo(); +// wsConnectParaInfo.sGuid = UUID.fastUUID().toString(true); + + wsConnectParaInfo.sUA = String.format("webh5&%s&websocket", ver); + wsConnectParaInfo.sAppSrc = appSrc; + wsConnectParaInfo.sExp = sExp; + wsConnectParaInfo.mCustomHeaders = new HashMap() {{ + put("HUYA_NET", "0"); + put("HUYA_VSDKUA", wsConnectParaInfo.sUA); + }}; + return wsConnectParaInfo; + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/GetPropsListRsp.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/GetPropsListRsp.java new file mode 100644 index 0000000..dc4e8a1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/GetPropsListRsp.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.PropsItem; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GetPropsListRsp extends TarsStructBase { + + private List vPropsItemList = CollUtil.newArrayList(new PropsItem()); + private String sMd5 = ""; + private short iNewEffectSwitch = 0; + private short iMirrorRoomShowNum = 0; + private short iGameRoomShowNum = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vPropsItemList, 1); + os.write(this.sMd5, 2); + os.write(this.iNewEffectSwitch, 3); + os.write(this.iMirrorRoomShowNum, 4); + os.write(this.iGameRoomShowNum, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vPropsItemList = is.readArray(this.vPropsItemList, 1, true); + this.sMd5 = is.read(this.sMd5, 2, true); + this.iNewEffectSwitch = is.read(this.iNewEffectSwitch, 3, true); + this.iMirrorRoomShowNum = is.read(this.iMirrorRoomShowNum, 4, true); + this.iGameRoomShowNum = is.read(this.iGameRoomShowNum, 5, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/LiveLaunchRsp.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/LiveLaunchRsp.java new file mode 100644 index 0000000..c9a53fc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/LiveLaunchRsp.java @@ -0,0 +1,78 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.LiveProxyValue; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveLaunchRsp extends BaseHuyaMsg { + + private String sGuid = ""; + private int iTime; + private List vProxyList = CollUtil.newArrayList(new LiveProxyValue()); + private int eAccess; + private String sClientIp = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sGuid, 0); + os.write(this.iTime, 1); + os.write(this.vProxyList, 2); + os.write(this.eAccess, 3); + os.write(this.sClientIp, 4); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sGuid = is.read(this.sGuid, 0, false); + this.iTime = is.read(this.iTime, 1, false); + this.vProxyList = is.readArray(this.vProxyList, 2, false); + this.eAccess = is.read(this.eAccess, 3, false); + this.sClientIp = is.read(this.sClientIp, 4, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_WupRsp; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/MessageNoticeMsg.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/MessageNoticeMsg.java new file mode 100644 index 0000000..70e0a92 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/MessageNoticeMsg.java @@ -0,0 +1,197 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.*; +import tech.ordinaryroad.live.chat.client.codec.huya.util.HuyaCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; + +import java.util.List; +import java.util.Optional; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MessageNoticeMsg extends BaseHuyaMsg implements IDanmuMsg { + + private SenderInfo tUserInfo = new SenderInfo(); + private long lTid; + private long lSid; + private String sContent = ""; + private int iShowMode; + private ContentFormat tFormat = new ContentFormat(); + private BulletFormat tBulletFormat = new BulletFormat(); + private int iTermType; + private List vDecorationPrefix = CollUtil.newArrayList(new DecorationInfo()); + private List vDecorationSuffix = CollUtil.newArrayList(new DecorationInfo()); + private List vAtSomeone = CollUtil.newArrayList(new UidNickName()); + private long lPid; + private List vBulletPrefix = CollUtil.newArrayList(new DecorationInfo()); + private String sIconUrl = ""; + private int iType; + private List vBulletSuffix = CollUtil.newArrayList(new DecorationInfo()); + private List vTagInfo = CollUtil.newArrayList(new MessageTagInfo()); + private SendMessageFormat tSenceFormat = new SendMessageFormat(); + private MessageContentExpand tContentExpand = new MessageContentExpand(); + private int iMessageMode; + + // region 额外属性 + private BadgeInfo badgeInfo; + // endregion + + public MessageNoticeMsg(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tUserInfo, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 2); + os.write(this.sContent, 3); + os.write(this.iShowMode, 4); + os.write(this.tFormat, 5); + os.write(this.tBulletFormat, 6); + os.write(this.iTermType, 7); + os.write(this.vDecorationPrefix, 8); + os.write(this.vDecorationSuffix, 9); + os.write(this.vAtSomeone, 10); + os.write(this.lPid, 11); + os.write(this.vBulletPrefix, 12); + os.write(this.sIconUrl, 13); + os.write(this.iType, 14); + os.write(this.vBulletSuffix, 15); + os.write(this.vTagInfo, 16); + os.write(this.tSenceFormat, 17); + os.write(this.tContentExpand, 18); + os.write(this.iMessageMode, 19); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tUserInfo = (SenderInfo) is.directRead(this.tUserInfo, 0, false); + this.lTid = is.read(this.lTid, 1, false); + this.lSid = is.read(this.lSid, 2, false); + this.sContent = is.readString(3, false); + this.iShowMode = is.read(this.iShowMode, 4, false); + this.tFormat = (ContentFormat) is.directRead(this.tFormat, 5, false); + this.tBulletFormat = (BulletFormat) is.directRead(this.tBulletFormat, 6, false); + this.iTermType = is.read(this.iTermType, 7, false); + this.vDecorationPrefix = is.readArray(this.vDecorationPrefix, 8, false); + this.vDecorationSuffix = is.readArray(this.vDecorationSuffix, 9, false); + this.vAtSomeone = is.readArray(this.vAtSomeone, 10, false); + this.lPid = is.read(this.lPid, 11, false); + this.vBulletPrefix = is.readArray(this.vBulletPrefix, 12, false); + this.sIconUrl = is.read(this.sIconUrl, 13, false); + this.iType = is.read(this.iType, 14, false); + this.vBulletSuffix = is.readArray(this.vBulletSuffix, 15, false); + this.vTagInfo = is.readArray(this.vTagInfo, 16, false); + this.tSenceFormat = (SendMessageFormat) is.directRead(this.tSenceFormat, 17, false); + this.tContentExpand = (MessageContentExpand) is.directRead(this.tContentExpand, 18, false); + this.iMessageMode = is.read(this.iMessageMode, 19, false); + + // 解析额外属性 + for (DecorationInfo decorationPrefix : vDecorationPrefix) { + Optional optional = HuyaCodecUtil.decodeDecorationInfo(decorationPrefix); + if (optional.isPresent()) { + TarsStructBase tarsStructBase = optional.get(); + if (tarsStructBase instanceof BadgeInfo) { + this.badgeInfo = (BadgeInfo) tarsStructBase; + break; + } + } + } + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq; + } + + @Override + public String getBadgeName() { + if (this.badgeInfo == null) { + return ""; + } + + return this.badgeInfo.getSBadgeName(); + } + + @Override + public byte getBadgeLevel() { + if (this.badgeInfo == null) { + return 0; + } + + return (byte) this.badgeInfo.getIBadgeLevel(); + } + + @Override + public String getUid() { + if (this.tUserInfo == null) { + return null; + } + + return Long.toString(this.tUserInfo.getLUid()); + } + + @Override + public String getUsername() { + if (this.tUserInfo == null) { + return ""; + } + + return this.tUserInfo.getSNickName(); + } + + @Override + public String getUserAvatar() { + if (this.tUserInfo == null) { + return ""; + } + + return this.tUserInfo.getSAvatarUrl(); + } + + @Override + public String getContent() { + return this.sContent; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/SendItemSubBroadcastPacketMsg.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/SendItemSubBroadcastPacketMsg.java new file mode 100644 index 0000000..2b2514b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/SendItemSubBroadcastPacketMsg.java @@ -0,0 +1,283 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.*; +import tech.ordinaryroad.live.chat.client.codec.huya.util.HuyaCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; + +import java.util.List; +import java.util.Optional; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendItemSubBroadcastPacketMsg extends BaseHuyaMsg implements IGiftMsg { + + private int iItemType; + private String strPayId = ""; + private int iItemCount; + private long lPresenterUid; + private long lSenderUid; + private String sPresenterNick = ""; + private String sSenderNick = ""; + private String sSendContent = ""; + private int iItemCountByGroup; + private int iItemGroup; + private int iSuperPupleLevel; + private int iComboScore; + private int iDisplayInfo; + private int iEffectType; + private String iSenderIcon = ""; + private String iPresenterIcon = ""; + private int iTemplateType; + private String sExpand = ""; + private boolean bBusi; + private int iColorEffectType; + private String sPropsName = ""; + private short iAccpet; + private short iEventType; + private UserIdentityInfo userInfo = new UserIdentityInfo(); + private long lRoomId; + private long lHomeOwnerUid; + private StreamerNode streamerInfo = new StreamerNode(); + private int iPayType = -1; + private int iNobleLevel; + private NobleLevelInfo tNobleLevel = new NobleLevelInfo(); + private ItemEffectInfo tEffectInfo = new ItemEffectInfo(); + private List vExUid = CollUtil.newArrayList(0L); + private int iComboStatus; + private int iPidColorType; + private int iMultiSend; + private int iVFanLevel; + private int iUpgradeLevel; + private String sCustomText = ""; + private DIYBigGiftEffect tDIYEffect = new DIYBigGiftEffect(); + private long lComboSeqId; + private long lPayTotal; + private List vBizData = CollUtil.newArrayList(new ItemEffectBizData()); + + // region 额外属性 + private BadgeInfo badgeInfo; + private PropsItem propsItem = PropsItem.DEFAULT; + // endregion + + public SendItemSubBroadcastPacketMsg(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iItemType, 0); + os.write(this.strPayId, 1); + os.write(this.iItemCount, 2); + os.write(this.lPresenterUid, 3); + os.write(this.lSenderUid, 4); + os.write(this.sPresenterNick, 5); + os.write(this.sSenderNick, 6); + os.write(this.sSendContent, 7); + os.write(this.iItemCountByGroup, 8); + os.write(this.iItemGroup, 9); + os.write(this.iSuperPupleLevel, 10); + os.write(this.iComboScore, 11); + os.write(this.iDisplayInfo, 12); + os.write(this.iEffectType, 13); + os.write(this.iSenderIcon, 14); + os.write(this.iPresenterIcon, 15); + os.write(this.iTemplateType, 16); + os.write(this.sExpand, 17); + os.write(this.bBusi, 18); + os.write(this.iColorEffectType, 19); + os.write(this.sPropsName, 20); + os.write(this.iAccpet, 21); + os.write(this.iEventType, 22); + os.write(this.userInfo, 23); + os.write(this.lRoomId, 24); + os.write(this.lHomeOwnerUid, 25); + os.write(this.streamerInfo, 26); + os.write(this.iPayType, 27); + os.write(this.iNobleLevel, 28); + os.write(this.tNobleLevel, 29); + os.write(this.tEffectInfo, 30); + os.write(this.vExUid, 31); + os.write(this.iComboStatus, 32); + os.write(this.iPidColorType, 33); + os.write(this.iMultiSend, 34); + os.write(this.iVFanLevel, 35); + os.write(this.iUpgradeLevel, 36); + os.write(this.sCustomText, 37); + os.write(this.tDIYEffect, 38); + os.write(this.lComboSeqId, 39); + os.write(this.lPayTotal, 41); + os.write(this.vBizData, 42); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iItemType = is.read(this.iItemType, 0, false); + this.strPayId = is.read(this.strPayId, 1, false); + this.iItemCount = is.read(this.iItemCount, 2, false); + this.lPresenterUid = is.read(this.lPresenterUid, 3, false); + this.lSenderUid = is.read(this.lSenderUid, 4, false); + this.sPresenterNick = is.read(this.sPresenterNick, 5, false); + this.sSenderNick = is.read(this.sSenderNick, 6, false); + this.sSendContent = is.read(this.sSendContent, 7, false); + this.iItemCountByGroup = is.read(this.iItemCountByGroup, 8, false); + this.iItemGroup = is.read(this.iItemGroup, 9, false); + this.iSuperPupleLevel = is.read(this.iSuperPupleLevel, 10, false); + this.iComboScore = is.read(this.iComboScore, 11, false); + this.iDisplayInfo = is.read(this.iDisplayInfo, 12, false); + this.iEffectType = is.read(this.iEffectType, 13, false); + this.iSenderIcon = is.read(this.iSenderIcon, 14, false); + this.iPresenterIcon = is.read(this.iPresenterIcon, 15, false); + this.iTemplateType = is.read(this.iTemplateType, 16, false); + this.sExpand = is.read(this.sExpand, 17, false); + this.bBusi = is.read(this.bBusi, 18, false); + this.iColorEffectType = is.read(this.iColorEffectType, 19, false); + this.sPropsName = is.read(this.sPropsName, 20, false); + this.iAccpet = is.read(this.iAccpet, 21, false); + this.iEventType = is.read(this.iEventType, 22, false); + this.userInfo = (UserIdentityInfo) is.directRead(this.userInfo, 23, false); + this.lRoomId = is.read(this.lRoomId, 24, false); + this.lHomeOwnerUid = is.read(this.lHomeOwnerUid, 25, false); + this.streamerInfo = (StreamerNode) is.directRead(this.streamerInfo, 26, false); + this.iPayType = is.read(this.iPayType, 27, false); + this.iNobleLevel = is.read(this.iNobleLevel, 28, false); + this.tNobleLevel = (NobleLevelInfo) is.directRead(this.tNobleLevel, 29, false); + this.tEffectInfo = (ItemEffectInfo) is.directRead(this.tEffectInfo, 30, false); + this.vExUid = is.readArray(this.vExUid, 31, false); + this.iComboStatus = is.read(this.iComboStatus, 32, false); + this.iPidColorType = is.read(this.iPidColorType, 33, false); + this.iMultiSend = is.read(this.iMultiSend, 34, false); + this.iVFanLevel = is.read(this.iVFanLevel, 35, false); + this.iUpgradeLevel = is.read(this.iUpgradeLevel, 36, false); + this.sCustomText = is.read(this.sCustomText, 37, false); + this.tDIYEffect = (DIYBigGiftEffect) is.directRead(this.tDIYEffect, 38, false); + this.lComboSeqId = is.read(this.lComboSeqId, 39, false); + this.lPayTotal = is.read(this.lPayTotal, 41, false); + this.vBizData = is.readArray(this.vBizData, 42, false); + + // 解析额外属性 + for (DecorationInfo decorationPrefix : userInfo.getVDecorationPrefix()) { + Optional optional = HuyaCodecUtil.decodeDecorationInfo(decorationPrefix); + if (optional.isPresent()) { + TarsStructBase tarsStructBase = optional.get(); + if (tarsStructBase instanceof BadgeInfo) { + this.badgeInfo = (BadgeInfo) tarsStructBase; + break; + } + } + } + } + + @Override + public String getUid() { + return Long.toString(this.lSenderUid); + } + + @Override + public String getUsername() { + return this.sSenderNick; + } + + @Override + public String getUserAvatar() { + return this.iSenderIcon; + } + + @Override + public String getGiftName() { + return this.sPropsName; + } + + @Override + public String getGiftImg() { + if (this.propsItem == null) { + return ""; + } + + List vPropsIdentity = this.propsItem.getVPropsIdentity(); + if (vPropsIdentity.isEmpty()) { + return ""; + } + + PropsIdentity propsIdentity = vPropsIdentity.get(0); + String sPropsWeb = propsIdentity.getSPropsWeb(); + if (StrUtil.isBlank(sPropsWeb)) { + return ""; + } + + return sPropsWeb.substring(0, sPropsWeb.indexOf("&")); + } + + @Override + public String getGiftId() { + return Long.toString(this.iItemType); + } + + @Override + public int getGiftCount() { + return this.iItemCount; + } + + /** + * 100 对应 1虎牙币 + */ + @Override + public int getGiftPrice() { + return (int) (this.lPayTotal / this.iItemCount); + } + + @Override + public String getReceiveUid() { + return Long.toString(this.lPresenterUid); + } + + @Override + public String getReceiveUsername() { + return this.sPresenterNick; + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/VerifyCookieRsp.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/VerifyCookieRsp.java new file mode 100644 index 0000000..1a63c38 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/VerifyCookieRsp.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class VerifyCookieRsp extends BaseHuyaMsg { + + private int iValidate; + + public VerifyCookieRsp(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(0, this.iValidate); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iValidate = is.read(this.iValidate, 0, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_VerifyCookieRsp; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/VipEnterBannerMsg.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/VipEnterBannerMsg.java new file mode 100644 index 0000000..1a41fc7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/VipEnterBannerMsg.java @@ -0,0 +1,147 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.*; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class VipEnterBannerMsg extends BaseHuyaMsg implements IEnterRoomMsg { + + private long lUid; + private String sNickName = ""; + private long lPid; + private NobleInfo tNobleInfo = new NobleInfo(); + private GuardInfo tGuardInfo = new GuardInfo(); + private WeekRankInfo tWeekRankInfo = new WeekRankInfo(); + private String sLogoURL = ""; + private boolean bFromNearby; + private String sLocation = ""; + private DecorationInfoRsp tDecorationInfo = new DecorationInfoRsp(); + private WeekRankInfo tWeekHeartStirRankInfo = new WeekRankInfo(); + private WeekRankInfo tWeekHeartBlockRankInfo = new WeekRankInfo(); + private int iMasterRank; + private ACEnterBanner tACInfo = new ACEnterBanner(); + private List vCommEnterBanner = CollUtil.newArrayList(new CommEnterBanner()); + private UserRidePetInfo tRidePetInfo = new UserRidePetInfo(); + private String sNobleBubbleSource = ""; + + public VipEnterBannerMsg(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sNickName, 1); + os.write(this.lPid, 2); + os.write(this.tNobleInfo, 3); + os.write(this.tGuardInfo, 4); + os.write(this.tWeekRankInfo, 5); + os.write(this.sLogoURL, 6); + os.write(this.bFromNearby, 7); + os.write(this.sLocation, 8); + os.write(this.tDecorationInfo, 9); + os.write(this.tWeekHeartStirRankInfo, 10); + os.write(this.tWeekHeartBlockRankInfo, 11); + os.write(this.iMasterRank, 12); + os.write(this.tACInfo, 13); + os.write(this.vCommEnterBanner, 14); + os.write(this.tRidePetInfo, 15); + os.write(this.sNobleBubbleSource, 16); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sNickName = is.read(this.sNickName, 1, false); + this.lPid = is.read(this.lPid, 2, false); + this.tNobleInfo = (NobleInfo) is.directRead(this.tNobleInfo, 3, false); + this.tGuardInfo = (GuardInfo) is.directRead(this.tGuardInfo, 4, false); + this.tWeekRankInfo = (WeekRankInfo) is.directRead(this.tWeekRankInfo, 5, false); + this.sLogoURL = is.read(this.sLogoURL, 6, false); + this.bFromNearby = is.read(this.bFromNearby, 7, false); + this.sLocation = is.read(this.sLocation, 8, false); + this.tDecorationInfo = (DecorationInfoRsp) is.directRead(this.tDecorationInfo, 9, false); + this.tWeekHeartStirRankInfo = (WeekRankInfo) is.directRead(this.tWeekHeartStirRankInfo, 10, false); + this.tWeekHeartBlockRankInfo = (WeekRankInfo) is.directRead(this.tWeekHeartBlockRankInfo, 11, false); + this.iMasterRank = is.read(this.iMasterRank, 12, false); + this.tACInfo = (ACEnterBanner) is.directRead(this.tACInfo, 13, false); + this.vCommEnterBanner = is.readArray(this.vCommEnterBanner, 14, false); + this.tRidePetInfo = (UserRidePetInfo) is.directRead(this.tRidePetInfo, 15, false); + this.sNobleBubbleSource = is.read(this.sNobleBubbleSource, 16, false); + } + + @Override + public String getBadgeName() { + // TODO + return null; + } + + @Override + public byte getBadgeLevel() { + // TODO + return 0; + } + + @Override + public String getUid() { + return Long.toString(lUid); + } + + @Override + public String getUsername() { + return sNickName; + } + + @Override + public String getUserAvatar() { + // TODO + return IEnterRoomMsg.super.getUserAvatar(); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSPushMessage.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSPushMessage.java new file mode 100644 index 0000000..83ece16 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSPushMessage.java @@ -0,0 +1,84 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaCmdMsg; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSPushMessage extends BaseHuyaCmdMsg { + + private int ePushType; + private byte[] dataBytes; + private int iProtocolType; + private String sGroupId = ""; + private long lMsgId; + private int iMsgTag; + + public WSPushMessage(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.ePushType, 0); + os.write(super.getLUri(), 1); + os.write(this.dataBytes, 2); + os.write(this.iProtocolType, 3); + os.write(this.sGroupId, 4); + os.write(this.lMsgId, 5); + os.write(this.iMsgTag, 6); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.ePushType = is.read(this.ePushType, 0, false); + super.setLUri(is.read(super.getLUri(), 1, false)); + this.dataBytes = is.read(this.dataBytes, 2, false); + this.iProtocolType = is.read(this.iProtocolType, 3, false); + this.sGroupId = is.read(this.sGroupId, 4, false); + this.lMsgId = is.read(this.lMsgId, 5, false); + this.iMsgTag = is.read(this.iMsgTag, 6, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq_V2; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSPushMessage_V2.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSPushMessage_V2.java new file mode 100644 index 0000000..a40a959 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSPushMessage_V2.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.WSMsgItem; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSPushMessage_V2 extends BaseHuyaMsg { + + private String sGroupId; + private List vMsgItem = CollUtil.newArrayList(new WSMsgItem()); + + public WSPushMessage_V2(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sGroupId, 0); + os.write(this.vMsgItem, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sGroupId = is.read(this.sGroupId, 0, false); + this.vMsgItem = is.readArray(this.vMsgItem, 1, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq_V2; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSRegisterGroupRsp.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSRegisterGroupRsp.java new file mode 100644 index 0000000..ed1b264 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSRegisterGroupRsp.java @@ -0,0 +1,72 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSRegisterGroupRsp extends BaseHuyaMsg { + + private int iResCode; + private List vSupportP2PGroupId = CollUtil.newArrayList(""); + + public WSRegisterGroupRsp(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iResCode, 0); + os.write(this.vSupportP2PGroupId, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iResCode = is.read(this.iResCode, 0, true); + this.vSupportP2PGroupId = is.readArray(this.vSupportP2PGroupId, 1, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_RegisterGroupRsp; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSRegisterRsp.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSRegisterRsp.java new file mode 100644 index 0000000..0d83e31 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WSRegisterRsp.java @@ -0,0 +1,75 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSRegisterRsp extends BaseHuyaMsg { + + private int iResCode; + private long lRequestId; + private String sMessage = ""; + private String sBCConnHost = ""; + + public WSRegisterRsp(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iResCode, 0); + os.write(this.lRequestId, 1); + os.write(this.sMessage, 2); + os.write(this.sBCConnHost, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iResCode = is.read(this.iResCode, 0, false); + this.lRequestId = is.read(this.lRequestId, 1, false); + this.sMessage = is.read(this.sMessage, 2, false); + this.sBCConnHost = is.read(this.sBCConnHost, 3, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_RegisterRsp; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WebSocketCommand.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WebSocketCommand.java new file mode 100644 index 0000000..baa65d3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WebSocketCommand.java @@ -0,0 +1,89 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaMsg; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WebSocketCommand extends BaseHuyaMsg { + + /** + * 原名为iCmdType + * operation:Client和Server交互的消息类型:认证、心跳等 + * cmd:Client收到的具体业务类型:弹幕、礼物等 + */ + private int operation; + private byte[] vData; + private long lRequestId; + private String traceId = ""; + private int iEncryptType; + private long lTime; + private String sMD5 = ""; + + public WebSocketCommand(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.operation, 0); + os.write(this.vData, 1); + os.write(this.lRequestId, 2); + os.write(this.traceId, 3); + os.write(this.iEncryptType, 4); + os.write(this.lTime, 5); + os.write(this.sMD5, 6); + } + + @Override + public void readFrom(TarsInputStream is) { + this.operation = is.read(this.operation, 0, false); + this.vData = is.read(this.vData, 1, false); + this.lRequestId = is.read(this.lRequestId, 2, false); + this.traceId = is.read(this.traceId, 3, false); + this.iEncryptType = is.read(this.iEncryptType, 4, false); + this.lTime = is.read(this.lTime, 5, false); + this.sMD5 = is.read(this.sMD5, 6, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.getByCode(operation); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WupRsp.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WupRsp.java new file mode 100644 index 0000000..ebf646a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/WupRsp.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg; + +import lombok.NoArgsConstructor; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseWup; + +/** + * @author mjz + * @date 2023/10/3 + */ +@NoArgsConstructor +public class WupRsp extends BaseWup { + + public WupRsp(byte[] vData) { + super.decode(vData); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_WupRsp; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseHuyaCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseHuyaCmdMsg.java new file mode 100644 index 0000000..0a9187a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseHuyaCmdMsg.java @@ -0,0 +1,79 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.base; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseHuyaCmdMsg extends TarsStructBase implements IHuyaCmdMsg { + + private long lUri; + + @Override + public String getCmd() { + return StrUtil.nullToEmpty(StrUtil.toStringOrNull(this.lUri)); + } + + @Override + public void setCmd(String cmd) { + this.lUri = NumberUtil.parseLong(cmd); + } + + @Override + public HuyaCmdEnum getCmdEnum() { + return HuyaCmdEnum.getByCode(this.lUri); + } + + @Override + public TarsStructBase newInit() { + return this; + } + + @Override + public String toString() { + try { + return OrJacksonUtil.getInstance().writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseHuyaMsg.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseHuyaMsg.java new file mode 100644 index 0000000..b1e7a2d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseHuyaMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.base; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.qq.tars.protocol.tars.TarsStructBase; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; + +/** + * @author mjz + * @date 2023/10/2 + */ +public abstract class BaseHuyaMsg extends TarsStructBase implements IHuyaMsg { + + @Override + public TarsStructBase newInit() { + return this; + } + + @Override + public String toString() { + try { + return OrJacksonUtil.getInstance().writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseWup.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseWup.java new file mode 100644 index 0000000..48e18d7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/BaseWup.java @@ -0,0 +1,136 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.base; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.support.TarsMethodInfo; +import com.qq.tars.protocol.util.TarsHelper; +import com.qq.tars.rpc.protocol.tars.TarsServantRequest; +import com.qq.tars.rpc.protocol.tup.UniAttribute; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.buffer.ByteBufUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.util.HuyaCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseWup extends BaseHuyaMsg { + + private TarsServantRequest tarsServantRequest = new TarsServantRequest(null) {{ + setMethodInfo(new TarsMethodInfo()); + }}; + private UniAttribute uniAttribute = new UniAttribute(); + + public BaseWup(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(TarsHelper.VERSION3, 1); + os.write(this.tarsServantRequest.getPacketType(), 2); + os.write(this.tarsServantRequest.getMessageType(), 3); + os.write(this.tarsServantRequest.getRequestId(), 4); + os.write(this.tarsServantRequest.getServantName(), 5); + os.write(this.tarsServantRequest.getFunctionName(), 6); + os.write(this.uniAttribute.encode(), 7); + os.write(this.tarsServantRequest.getTimeout(), 8); + os.write(this.tarsServantRequest.getContext(), 9); + os.write(this.tarsServantRequest.getStatus(), 10); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tarsServantRequest.setVersion(is.read(this.tarsServantRequest.getVersion(), 1, false)); + this.tarsServantRequest.setPacketType(is.read(this.tarsServantRequest.getPacketType(), 2, false)); + this.tarsServantRequest.setMessageType(is.read(this.tarsServantRequest.getMessageType(), 3, false)); + this.tarsServantRequest.setRequestId(is.read(this.tarsServantRequest.getRequestId(), 4, false)); + this.tarsServantRequest.setServantName(is.read(this.tarsServantRequest.getServantName(), 5, false)); + this.tarsServantRequest.setFunctionName(is.read(this.tarsServantRequest.getFunctionName(), 6, false)); + this.uniAttribute.decode(is.read(new byte[]{}, 7, false)); + this.tarsServantRequest.setTimeout(is.read(this.tarsServantRequest.getTimeout(), 8, false)); + this.tarsServantRequest.setContext(is.readMap(this.tarsServantRequest.getContext(), 9, false)); + this.tarsServantRequest.setStatus(is.readMap(this.tarsServantRequest.getStatus(), 10, false)); + } + + public byte[] encode() { + TarsOutputStream wupTarsOutputStream = new TarsOutputStream(); + this.writeTo(wupTarsOutputStream); + + ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer(); + buffer.writeInt(4 + wupTarsOutputStream.getByteBuffer().position()); + buffer.writeBytes(wupTarsOutputStream.toByteArray()); + + return ByteBufUtil.getBytes(buffer); + } + + public void decode(byte[] bytes) { + ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer().writeBytes(bytes); + int size = byteBuf.readInt(); + if (size < 4) { + return; + } + + bytes = new byte[byteBuf.readableBytes()]; + byteBuf.readBytes(bytes); + this.readFrom(HuyaCodecUtil.newUtf8TarsInputStream(bytes)); + } + + @Override + public String toString() { + Map map = new HashMap<>(); + map.put("version", this.tarsServantRequest.getVersion()); + map.put("packetType", this.tarsServantRequest.getPacketType()); + map.put("messageType", this.tarsServantRequest.getMessageType()); + map.put("requestId", this.tarsServantRequest.getRequestId()); + map.put("servantName", this.tarsServantRequest.getServantName()); + map.put("functionName", this.tarsServantRequest.getFunctionName()); + map.put("timeout", this.tarsServantRequest.getTimeout()); + map.put("context", this.tarsServantRequest.getContext()); + map.put("status", this.tarsServantRequest.getStatus()); + try { + return OrJacksonUtil.getInstance().writeValueAsString(map); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/IHuyaCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/IHuyaCmdMsg.java new file mode 100644 index 0000000..018b14a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/IHuyaCmdMsg.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.base; + +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; + +/** + * @author mjz + * @date 2023/10/2 + */ +public interface IHuyaCmdMsg extends IHuyaMsg, ICmdMsg { +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/IHuyaMsg.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/IHuyaMsg.java new file mode 100644 index 0000000..13515ca --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/base/IHuyaMsg.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.base; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IHuyaMsg extends IMsg { + @JsonIgnore + HuyaOperationEnum getOperationEnum(); +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ACEnterBanner.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ACEnterBanner.java new file mode 100644 index 0000000..1274b37 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ACEnterBanner.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ACEnterBanner extends TarsStructBase { + + private int iWeekHeartStirRank; + private int iWeekHeartBlockRank; + private int iMasterRank; + private int iACWeekRank; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iWeekHeartStirRank, 0); + os.write(this.iWeekHeartBlockRank, 1); + os.write(this.iMasterRank, 2); + os.write(this.iACWeekRank, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + is.read(this.iWeekHeartStirRank, 0, false); + is.read(this.iWeekHeartBlockRank, 1, false); + is.read(this.iMasterRank, 2, false); + is.read(this.iACWeekRank, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BadgeInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BadgeInfo.java new file mode 100644 index 0000000..1668d08 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BadgeInfo.java @@ -0,0 +1,151 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BadgeInfo extends TarsStructBase { + + private long lUid; + private long lBadgeId; + private String sPresenterNickName = ""; + private String sBadgeName = ""; + private int iBadgeLevel; + private int iRank; + private int iScore; + private int iNextScore; + private int iQuotaUsed; + private int iQuota; + private long lQuotaTS; + private long lOpenTS; + private int iVFlag; + private String sVLogo = ""; + private PresenterChannelInfo tChannelInfo = new PresenterChannelInfo(); + private String sPresenterLogo = ""; + private long lVExpiredTS; + private int iBadgeType; + private FaithInfo tFaithInfo = new FaithInfo(); + private SuperFansInfo tSuperFansInfo = new SuperFansInfo(); + private int iBaseQuota; + private long lVConsumRank; + private int iCustomBadgeFlag; + private int iAgingDays; + private int iDayScore; + private CustomBadgeDynamicExternal tExternal = new CustomBadgeDynamicExternal(); + private int iExtinguished; + private int iExtinguishDays; + private int iBadgeCate; + private int iLiveFlag; + private int iAutoDeductUpgrade; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.lBadgeId, 1); + os.write(this.sPresenterNickName, 2); + os.write(this.sBadgeName, 3); + os.write(this.iBadgeLevel, 4); + os.write(this.iRank, 5); + os.write(this.iScore, 6); + os.write(this.iNextScore, 7); + os.write(this.iQuotaUsed, 8); + os.write(this.iQuota, 9); + os.write(this.lQuotaTS, 10); + os.write(this.lOpenTS, 11); + os.write(this.iVFlag, 12); + os.write(this.sVLogo, 13); + os.write(this.tChannelInfo, 14); + os.write(this.sPresenterLogo, 15); + os.write(this.lVExpiredTS, 16); + os.write(this.iBadgeType, 17); + os.write(this.tFaithInfo, 18); + os.write(this.tSuperFansInfo, 19); + os.write(this.iBaseQuota, 20); + os.write(this.lVConsumRank, 21); + os.write(this.iCustomBadgeFlag, 22); + os.write(this.iAgingDays, 23); + os.write(this.iDayScore, 24); + os.write(this.tExternal, 25); + os.write(this.iExtinguished, 26); + os.write(this.iExtinguishDays, 27); + os.write(this.iBadgeCate, 28); + os.write(this.iLiveFlag, 29); + os.write(this.iAutoDeductUpgrade, 30); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.lBadgeId = is.read(this.lBadgeId, 1, false); + this.sPresenterNickName = is.read(this.sPresenterNickName, 2, false); + this.sBadgeName = is.read(this.sBadgeName, 3, false); + this.iBadgeLevel = is.read(this.iBadgeLevel, 4, false); + this.iRank = is.read(this.iRank, 5, false); + this.iScore = is.read(this.iScore, 6, false); + this.iNextScore = is.read(this.iNextScore, 7, false); + this.iQuotaUsed = is.read(this.iQuotaUsed, 8, false); + this.iQuota = is.read(this.iQuota, 9, false); + this.lQuotaTS = is.read(this.lQuotaTS, 10, false); + this.lOpenTS = is.read(this.lOpenTS, 11, false); + this.iVFlag = is.read(this.iVFlag, 12, false); + this.sVLogo = is.read(this.sVLogo, 13, false); + this.tChannelInfo = (PresenterChannelInfo) is.directRead(this.tChannelInfo, 14, false); + this.sPresenterLogo = is.read(this.sPresenterLogo, 15, false); + this.lVExpiredTS = is.read(this.lVExpiredTS, 16, false); + this.iBadgeType = is.read(this.iBadgeType, 17, false); + this.tFaithInfo = (FaithInfo) is.directRead(this.tFaithInfo, 18, false); + this.tSuperFansInfo = (SuperFansInfo) is.directRead(this.tSuperFansInfo, 19, false); + this.iBaseQuota = is.read(this.iBaseQuota, 20, false); + this.lVConsumRank = is.read(this.lVConsumRank, 21, false); + this.iCustomBadgeFlag = is.read(this.iCustomBadgeFlag, 22, false); + this.iAgingDays = is.read(this.iAgingDays, 23, false); + this.iDayScore = is.read(this.iDayScore, 24, false); + this.tExternal = (CustomBadgeDynamicExternal) is.directRead(this.tExternal, 25, false); + this.iExtinguished = is.read(this.iExtinguished, 26, false); + this.iExtinguishDays = is.read(this.iExtinguishDays, 27, false); + this.iBadgeCate = is.read(this.iBadgeCate, 28, false); + this.iLiveFlag = is.read(this.iLiveFlag, 29, false); + this.iLiveFlag = is.read(this.iAutoDeductUpgrade, 30, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BulletBorderGroundFormat.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BulletBorderGroundFormat.java new file mode 100644 index 0000000..e65ce29 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BulletBorderGroundFormat.java @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BulletBorderGroundFormat extends TarsStructBase { + + private int iEnableUse; + private int iBorderThickness; + private int iBorderColour = -1; + private int iBorderDiaphaneity = 100; + private int iGroundColour = -1; + private int iGroundColourDiaphaneity = 100; + private String sAvatarDecorationUrl = ""; + private int iFontColor = -1; + private int iTerminalFlag = -1; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iEnableUse, 0); + os.write(this.iBorderThickness, 1); + os.write(this.iBorderColour, 2); + os.write(this.iBorderDiaphaneity, 3); + os.write(this.iGroundColour, 4); + os.write(this.iGroundColourDiaphaneity, 5); + os.write(this.sAvatarDecorationUrl, 6); + os.write(this.iFontColor, 7); + os.write(this.iTerminalFlag, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iEnableUse = is.read(this.iEnableUse, 0, false); + this.iBorderThickness = is.read(this.iBorderThickness, 1, false); + this.iBorderColour = is.read(this.iBorderColour, 2, false); + this.iBorderDiaphaneity = is.read(this.iBorderDiaphaneity, 3, false); + this.iGroundColour = is.read(this.iGroundColour, 4, false); + this.iGroundColourDiaphaneity = is.read(this.iGroundColourDiaphaneity, 5, false); + this.sAvatarDecorationUrl = is.read(this.sAvatarDecorationUrl, 6, false); + this.iFontColor = is.read(this.iFontColor, 7, false); + this.iTerminalFlag = is.read(this.iTerminalFlag, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BulletFormat.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BulletFormat.java new file mode 100644 index 0000000..ac3daab --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/BulletFormat.java @@ -0,0 +1,89 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BulletFormat extends TarsStructBase { + + private int iFontColor = -1; + private int iFontSize = 4; + private int iTextSpeed; + private int iTransitionType = 1; + private int iPopupStyle; + private BulletBorderGroundFormat tBorderGroundFormat = new BulletBorderGroundFormat(); + private List vGraduatedColor = CollUtil.newArrayList(0); + private int iAvatarFlag; + private int iAvatarTerminalFlag = -1; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iFontColor, 0); + os.write(this.iFontSize, 1); + os.write(this.iTextSpeed, 2); + os.write(this.iTransitionType, 3); + os.write(this.iPopupStyle, 4); + os.write(this.tBorderGroundFormat, 5); + os.write(this.vGraduatedColor, 6); + os.write(this.iAvatarFlag, 7); + os.write(this.iAvatarTerminalFlag, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iFontColor = is.read(this.iFontColor, 0, false); + this.iFontSize = is.read(this.iFontSize, 1, false); + this.iTextSpeed = is.read(this.iTextSpeed, 2, false); + this.iTransitionType = is.read(this.iTransitionType, 3, false); + this.iPopupStyle = is.read(this.iPopupStyle, 4, false); + this.tBorderGroundFormat = (BulletBorderGroundFormat) is.directRead(this.tBorderGroundFormat, 5, false); + this.vGraduatedColor = is.readArray(this.vGraduatedColor, 6, false); + this.iAvatarFlag = is.read(this.iAvatarFlag, 7, false); + this.iAvatarTerminalFlag = is.read(this.iAvatarTerminalFlag, 8, false); + + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ChannelPair.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ChannelPair.java new file mode 100644 index 0000000..4f43455 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ChannelPair.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ChannelPair extends TarsStructBase { + + private long lTid; + private long lSid; + private long lPid; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lTid, 0); + os.write(this.lSid, 1); + os.write(this.lPid, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lTid = is.read(this.lTid, 0, false); + this.lSid = is.read(this.lSid, 1, false); + this.lPid = is.read(this.lPid, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/CommEnterBanner.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/CommEnterBanner.java new file mode 100644 index 0000000..a970fae --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/CommEnterBanner.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class CommEnterBanner extends TarsStructBase { + + private int iBannerUri; + private int iViewType; + private byte[] vData; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iBannerUri, 0); + os.write(this.iViewType, 1); + os.write(this.vData, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iBannerUri = is.read(this.iBannerUri, 0, false); + this.iViewType = is.read(this.iViewType, 1, false); + this.vData = is.read(this.vData, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ContentFormat.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ContentFormat.java new file mode 100644 index 0000000..68e75eb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ContentFormat.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ContentFormat extends TarsStructBase { + + private int iFontColor = -1; + private int iFontSize = 4; + private int iPopupStyle = 0; + private int iNickNameFontColor = -1; + private int iDarkFontColor = -1; + private int iDarkNickNameFontColor = -1; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iFontColor, 0); + os.write(this.iFontSize, 1); + os.write(this.iPopupStyle, 2); + os.write(this.iNickNameFontColor, 3); + os.write(this.iDarkFontColor, 4); + os.write(this.iDarkNickNameFontColor, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iFontColor = is.read(this.iFontColor, 0, false); + this.iFontSize = is.read(this.iFontSize, 1, false); + this.iPopupStyle = is.read(this.iPopupStyle, 2, false); + this.iNickNameFontColor = is.read(this.iNickNameFontColor, 3, false); + this.iDarkFontColor = is.read(this.iDarkFontColor, 4, false); + this.iDarkNickNameFontColor = is.read(this.iDarkNickNameFontColor, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/CustomBadgeDynamicExternal.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/CustomBadgeDynamicExternal.java new file mode 100644 index 0000000..8c77826 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/CustomBadgeDynamicExternal.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class CustomBadgeDynamicExternal extends TarsStructBase { + + private String sFloorExter = ""; + private int iFansIdentity; + private int iBadgeSize; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sFloorExter, 0); + os.write(this.iFansIdentity, 1); + os.write(this.iFansIdentity, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sFloorExter = is.read(this.sFloorExter, 0, false); + this.iFansIdentity = is.read(this.iFansIdentity, 1, false); + this.iBadgeSize = is.read(this.iBadgeSize, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DIYBigGiftEffect.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DIYBigGiftEffect.java new file mode 100644 index 0000000..899447a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DIYBigGiftEffect.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DIYBigGiftEffect extends TarsStructBase { + + private String sResourceUrl = ""; + private String sResourceAttr = ""; + private String sWebResourceUrl = ""; + private String sPCResourceUrl = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sResourceUrl, 0); + os.write(this.sResourceAttr, 1); + os.write(this.sWebResourceUrl, 2); + os.write(this.sPCResourceUrl, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sResourceUrl = is.read(this.sResourceUrl, 0, false); + this.sResourceAttr = is.read(this.sResourceAttr, 1, false); + this.sWebResourceUrl = is.read(this.sWebResourceUrl, 2, false); + this.sPCResourceUrl = is.read(this.sPCResourceUrl, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DecorationInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DecorationInfo.java new file mode 100644 index 0000000..811bfd3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DecorationInfo.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DecorationInfo extends TarsStructBase { + + private int iAppId = 0; + private int iViewType = 0; + private byte[] vData; + private long lSourceId; + private int iType; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAppId, 0); + os.write(this.iViewType, 1); + os.write(this.vData, 2); + os.write(this.lSourceId, 3); + os.write(this.iType, 4); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAppId = is.read(this.iAppId, 0, true); + this.iViewType = is.read(this.iViewType, 1, true); + this.vData = is.read(this.vData, 2, true); + this.lSourceId = is.read(this.lSourceId, 3, false); + this.iType = is.read(this.iType, 4, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DecorationInfoRsp.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DecorationInfoRsp.java new file mode 100644 index 0000000..49c92e0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DecorationInfoRsp.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DecorationInfoRsp extends TarsStructBase { + + private List vDecorationPrefix = CollUtil.newArrayList(new DecorationInfo()); + private List vDecorationSuffix = CollUtil.newArrayList(new DecorationInfo()); + private ContentFormat tFormat = new ContentFormat(); + private BulletFormat tBulletFormat = new BulletFormat(); + private List vForwardChannels = CollUtil.newArrayList(new ChannelPair()); + private int iModifyMask; + private List vBulletPrefix = CollUtil.newArrayList(new DecorationInfo()); + private SenderInfo tUserInfo = new SenderInfo(); + private List vBulletSuffix = CollUtil.newArrayList(new DecorationInfo()); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vDecorationPrefix, 0); + os.write(this.vDecorationSuffix, 1); + os.write(this.tFormat, 2); + os.write(this.tBulletFormat, 3); + os.write(this.vForwardChannels, 4); + os.write(this.iModifyMask, 5); + os.write(this.vBulletPrefix, 6); + os.write(this.tUserInfo, 7); + os.write(this.vBulletSuffix, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vDecorationPrefix = is.readArray(this.vDecorationPrefix, 0, false); + this.vDecorationSuffix = is.readArray(this.vDecorationSuffix, 1, false); + this.tFormat = (ContentFormat) is.directRead(this.tFormat, 2, false); + this.tBulletFormat = (BulletFormat) is.directRead(this.tBulletFormat, 3, false); + this.vForwardChannels = is.readArray(this.vForwardChannels, 4, false); + this.iModifyMask = is.read(this.iModifyMask, 5, false); + this.vBulletPrefix = is.readArray(this.vBulletPrefix, 6, false); + this.tUserInfo = (SenderInfo) is.directRead(this.tUserInfo, 7, false); + this.vBulletSuffix = is.readArray(this.vBulletSuffix, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DisplayInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DisplayInfo.java new file mode 100644 index 0000000..c2def6d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/DisplayInfo.java @@ -0,0 +1,91 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DisplayInfo extends TarsStructBase { + + private int iMarqueeScopeMin = 0; + private int iMarqueeScopeMax = 0; + private int iCurrentVideoNum = 0; + private int iCurrentVideoMin = 0; + private int iCurrentVideoMax = 0; + private int iAllVideoNum = 0; + private int iAllVideoMin = 0; + private int iAllVideoMax = 0; + private int iCurrentScreenNum = 0; + private int iCurrentScreenMin = 0; + private int iCurrentScreenMax = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iMarqueeScopeMin, 1); + os.write(this.iMarqueeScopeMax, 2); + os.write(this.iCurrentVideoNum, 3); + os.write(this.iCurrentVideoMin, 4); + os.write(this.iCurrentVideoMax, 5); + os.write(this.iAllVideoNum, 6); + os.write(this.iAllVideoMin, 7); + os.write(this.iAllVideoMax, 8); + os.write(this.iCurrentScreenNum, 9); + os.write(this.iCurrentScreenMin, 10); + os.write(this.iCurrentScreenMax, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iMarqueeScopeMin = is.read(this.iMarqueeScopeMin, 1, true); + this.iMarqueeScopeMax = is.read(this.iMarqueeScopeMax, 2, true); + this.iCurrentVideoNum = is.read(this.iCurrentVideoNum, 3, true); + this.iCurrentVideoMin = is.read(this.iCurrentVideoMin, 4, true); + this.iCurrentVideoMax = is.read(this.iCurrentVideoMax, 5, true); + this.iAllVideoNum = is.read(this.iAllVideoNum, 6, true); + this.iAllVideoMin = is.read(this.iAllVideoMin, 7, true); + this.iAllVideoMax = is.read(this.iAllVideoMax, 8, true); + this.iCurrentScreenNum = is.read(this.iCurrentScreenNum, 9, true); + this.iCurrentScreenMin = is.read(this.iCurrentScreenMin, 10, true); + this.iCurrentScreenMax = is.read(this.iCurrentScreenMax, 11, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/FaithInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/FaithInfo.java new file mode 100644 index 0000000..377ebf9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/FaithInfo.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class FaithInfo extends TarsStructBase { + + private String sFaithName = ""; + private List vPresenter = CollUtil.newArrayList(new FaithPresenter()); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sFaithName, 0); + os.write(this.vPresenter, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sFaithName = is.read(this.sFaithName, 0, false); + this.vPresenter = is.readArray(this.vPresenter, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/FaithPresenter.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/FaithPresenter.java new file mode 100644 index 0000000..7f34a40 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/FaithPresenter.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class FaithPresenter extends TarsStructBase { + + private long lPid; + private String sLogo = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lPid, 0); + os.write(this.sLogo, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lPid = is.read(this.lPid, 0, false); + this.sLogo = is.read(this.sLogo, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/GuardInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/GuardInfo.java new file mode 100644 index 0000000..e1cc70c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/GuardInfo.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GuardInfo extends TarsStructBase { + + private long lUid; + private long lPid; + private int iGuardLevel; + private long lEndTime; + private String sAttr = ""; + private String sIcon = ""; + private int iGuardType; + private long lStartTime; + private long lCommemorateDay; + private int iAccompanyDay; + private String sNewAttr = ""; + private String sEnterText = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.lPid, 1); + os.write(this.iGuardLevel, 2); + os.write(this.lEndTime, 3); + os.write(this.sAttr, 4); + os.write(this.sIcon, 5); + os.write(this.iGuardType, 6); + os.write(this.lStartTime, 7); + os.write(this.lCommemorateDay, 8); + os.write(this.iAccompanyDay, 9); + os.write(this.sNewAttr, 10); + os.write(this.sEnterText, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.lPid = is.read(this.lPid, 1, false); + this.iGuardLevel = is.read(this.iGuardLevel, 2, false); + this.lEndTime = is.read(this.lEndTime, 3, false); + this.sAttr = is.read(this.sAttr, 4, false); + this.sIcon = is.read(this.sIcon, 5, false); + this.iGuardType = is.read(this.iGuardType, 6, false); + this.lStartTime = is.read(this.lStartTime, 7, false); + this.lCommemorateDay = is.read(this.lCommemorateDay, 8, false); + this.iAccompanyDay = is.read(this.iAccompanyDay, 9, false); + this.sNewAttr = is.read(this.sNewAttr, 10, false); + this.sEnterText = is.read(this.sEnterText, 11, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ItemEffectBizData.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ItemEffectBizData.java new file mode 100644 index 0000000..cecdbbd --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ItemEffectBizData.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2024/4/19 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ItemEffectBizData extends TarsStructBase { + + private int iType; + private byte[] vData; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iType, 0); + os.write(this.iType, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iType = is.read(this.iType, 0, false); + this.iType = is.read(this.iType, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ItemEffectInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ItemEffectInfo.java new file mode 100644 index 0000000..0e20a21 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/ItemEffectInfo.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ItemEffectInfo extends TarsStructBase { + + private int iPriceLevel; + private int iStreamDuration; + private int iShowType; + private int iStreamId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPriceLevel, 0); + os.write(this.iStreamDuration, 1); + os.write(this.iShowType, 2); + os.write(this.iStreamId, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPriceLevel = is.read(this.iPriceLevel, 0, false); + this.iStreamDuration = is.read(this.iStreamDuration, 1, false); + this.iShowType = is.read(this.iShowType, 2, false); + this.iStreamId = is.read(this.iStreamId, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveAppUAEx.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveAppUAEx.java new file mode 100644 index 0000000..d3a6bda --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveAppUAEx.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveAppUAEx extends TarsStructBase { + + private String sIMEI = ""; + private String sAPN = ""; + private String sNetType = ""; + private String sDeviceId = ""; + private String sMId = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sIMEI, 1); + os.write(this.sAPN, 2); + os.write(this.sNetType, 3); + os.write(this.sDeviceId, 4); + os.write(this.sMId, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sIMEI = is.read(this.sIMEI, 1, false); + this.sAPN = is.read(this.sAPN, 2, false); + this.sNetType = is.read(this.sNetType, 3, false); + this.sDeviceId = is.read(this.sDeviceId, 4, false); + this.sMId = is.read(this.sMId, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveProxyValue.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveProxyValue.java new file mode 100644 index 0000000..76e25a1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveProxyValue.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveProxyValue extends TarsStructBase { + + private int eProxyType; + private List sProxy = CollUtil.newArrayList(""); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.eProxyType, 0); + os.write(this.sProxy, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.eProxyType = is.read(this.eProxyType, 0, false); + this.sProxy = is.readArray(this.sProxy, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveUserbase.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveUserbase.java new file mode 100644 index 0000000..b7e45aa --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/LiveUserbase.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveUserbase extends TarsStructBase { + + private int eSource; + private int eType; + private LiveAppUAEx tUAEx = new LiveAppUAEx(); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.eSource, 0); + os.write(this.eType, 1); + os.write(this.tUAEx, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.eSource = is.read(this.eSource, 0, false); + this.eType = is.read(this.eType, 1, false); + this.tUAEx = (LiveAppUAEx) is.directRead(this.tUAEx, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MessageContentExpand.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MessageContentExpand.java new file mode 100644 index 0000000..a734f54 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MessageContentExpand.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MessageContentExpand extends TarsStructBase { + + private int iAppId = 0; + private String sToast = ""; + private byte[] vData; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAppId, 0); + os.write(this.sToast, 1); + os.write(this.vData, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAppId = is.read(this.iAppId, 0, false); + this.sToast = is.read(this.sToast, 1, false); + this.vData = is.read(this.vData, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MessageTagInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MessageTagInfo.java new file mode 100644 index 0000000..338a855 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MessageTagInfo.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MessageTagInfo extends TarsStructBase { + + private int iAppId = 0; + private String sTag = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAppId, 0); + os.write(this.sTag, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAppId = is.read(this.iAppId, 0, false); + this.sTag = is.read(this.sTag, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MsgStatInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MsgStatInfo.java new file mode 100644 index 0000000..ad84348 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/MsgStatInfo.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MsgStatInfo extends TarsStructBase { + + private Map> mSignalPushUriCount = new HashMap<>(); + private Map> mP2pPushUriCount = new HashMap<>(); + private int iSupportAckMsgStat; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.mSignalPushUriCount, 0); + os.write(this.mP2pPushUriCount, 1); + os.write(this.iSupportAckMsgStat, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.mSignalPushUriCount = is.readMap(this.mSignalPushUriCount, 0, false); + this.mP2pPushUriCount = is.readMap(this.mP2pPushUriCount, 1, false); + this.iSupportAckMsgStat = is.read(this.iSupportAckMsgStat, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleInfo.java new file mode 100644 index 0000000..3a4ca0c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleInfo.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NobleInfo extends TarsStructBase { + + private long lUid; + private long lPid; + private long lValidDate; + private String sNobleName = ""; + private int iNobleLevel; + private int iNoblePet; + private int iNobleStatus; + private int iNobleType; + private int iRemainDays; + private NobleLevelAttr tLevelAttr = new NobleLevelAttr(); + private NoblePetAttr tPetAttr = new NoblePetAttr(); + private long lOpenTime; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.lPid, 1); + os.write(this.lValidDate, 2); + os.write(this.sNobleName, 3); + os.write(this.iNobleLevel, 4); + os.write(this.iNoblePet, 5); + os.write(this.iNobleStatus, 6); + os.write(this.iNobleType, 7); + os.write(this.iRemainDays, 8); + os.write(this.tLevelAttr, 9); + os.write(this.tPetAttr, 10); + os.write(this.lOpenTime, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.lPid = is.read(this.lPid, 1, false); + this.lValidDate = is.read(this.lValidDate, 2, false); + this.sNobleName = is.read(this.sNobleName, 3, false); + this.iNobleLevel = is.read(this.iNobleLevel, 4, false); + this.iNoblePet = is.read(this.iNoblePet, 5, false); + this.iNobleStatus = is.read(this.iNobleStatus, 6, false); + this.iNobleType = is.read(this.iNobleType, 7, false); + this.iRemainDays = is.read(this.iRemainDays, 8, false); + this.tLevelAttr = (NobleLevelAttr) is.directRead(this.tLevelAttr, 9, false); + this.tPetAttr = (NoblePetAttr) is.directRead(this.tPetAttr, 10, false); + this.lOpenTime = is.read(this.lOpenTime, 11, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleLevelAttr.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleLevelAttr.java new file mode 100644 index 0000000..f97f571 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleLevelAttr.java @@ -0,0 +1,79 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NobleLevelAttr extends TarsStructBase { + + private int iAttrType; + private long lValidDate; + private int iAttrStatus; + private int iProgress; + private int iTask; + private int iRemainDays; + private String sReserve = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAttrType, 0); + os.write(this.lValidDate, 1); + os.write(this.iAttrStatus, 2); + os.write(this.iProgress, 3); + os.write(this.iTask, 4); + os.write(this.iRemainDays, 5); + os.write(this.sReserve, 6); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAttrType = is.read(this.iAttrType, 0, false); + this.lValidDate = is.read(this.lValidDate, 1, false); + this.iAttrStatus = is.read(this.iAttrStatus, 2, false); + this.iProgress = is.read(this.iProgress, 3, false); + this.iTask = is.read(this.iTask, 4, false); + this.iRemainDays = is.read(this.iRemainDays, 5, false); + this.sReserve = is.read(this.sReserve, 6, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleLevelInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleLevelInfo.java new file mode 100644 index 0000000..f3b237c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NobleLevelInfo.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NobleLevelInfo extends TarsStructBase { + + private int iNobleLevel; + private int iAttrType; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iNobleLevel, 0); + os.write(this.iAttrType, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iNobleLevel = is.read(this.iNobleLevel, 0, true); + this.iAttrType = is.read(this.iAttrType, 1, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NoblePetAttr.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NoblePetAttr.java new file mode 100644 index 0000000..48cc078 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/NoblePetAttr.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NoblePetAttr extends TarsStructBase { + + private int iPetId; + private String sPetName = ""; + private String sPetAction = ""; + private int iFrame; + private int iBeginTime; + private int iEndTime; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPetId, 0); + os.write(this.sPetName, 1); + os.write(this.sPetAction, 2); + os.write(this.iFrame, 3); + os.write(this.iBeginTime, 4); + os.write(this.iEndTime, 5); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPetId = is.read(this.iPetId, 0, false); + this.sPetName = is.read(this.sPetName, 1, false); + this.sPetAction = is.read(this.sPetAction, 2, false); + this.iFrame = is.read(this.iFrame, 3, false); + this.iBeginTime = is.read(this.iBeginTime, 4, false); + this.iEndTime = is.read(this.iEndTime, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PresenterChannelInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PresenterChannelInfo.java new file mode 100644 index 0000000..b3d83da --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PresenterChannelInfo.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PresenterChannelInfo extends TarsStructBase { + + private long lYYId; + private long lTid; + private long lSid; + private int iSourceType; + private int iScreenType; + private long lUid; + private int iGameId; + private int iRoomId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lYYId, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 3); + os.write(this.iSourceType, 4); + os.write(this.iScreenType, 5); + os.write(this.lUid, 6); + os.write(this.iGameId, 7); + os.write(this.iRoomId, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lYYId = is.read(this.lYYId, 0, false); + this.lTid = is.read(this.lTid, 1, false); + this.lSid = is.read(this.lSid, 3, false); + this.iSourceType = is.read(this.iSourceType, 4, false); + this.iScreenType = is.read(this.iScreenType, 5, false); + this.lUid = is.read(this.lUid, 6, false); + this.iGameId = is.read(this.iGameId, 7, false); + this.iRoomId = is.read(this.iRoomId, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropView.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropView.java new file mode 100644 index 0000000..037bf59 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropView.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PropView extends TarsStructBase { + + private int id = 0; + private String name = ""; + private Map uids = new HashMap() {{ + put(-1L, (short) -1); + }}; + private String tips = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.id, 0); + os.write(this.name, 1); + os.write(this.uids, 2); + os.write(this.tips, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.id = is.read(this.id, 0, true); + this.name = is.read(this.name, 1, true); + this.uids = is.readMap(this.uids, 2, true); + this.tips = is.read(this.tips, 3, true); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropsIdentity.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropsIdentity.java new file mode 100644 index 0000000..ed5d8f9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropsIdentity.java @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PropsIdentity extends TarsStructBase { + + private int iPropsIdType = 0; + private String sPropsPic18 = ""; + private String sPropsPic24 = ""; + private String sPropsPicGif = ""; + private String sPropsBannerResource = ""; + private String sPropsBannerSize = ""; + private String sPropsBannerMaxTime = ""; + private String sPropsChatBannerResource = ""; + private String sPropsChatBannerSize = ""; + private String sPropsChatBannerMaxTime = ""; + private int iPropsChatBannerPos = 0; + private int iPropsChatBannerIsCombo = 0; + private String sPropsRollContent = ""; + private int iPropsBannerAnimationstyle = 0; + private String sPropFaceu = ""; + private String sPropH5Resource = ""; + private String sPropsWeb = ""; + private int sWitch = 0; + private String sCornerMark = ""; + private int iPropViewId = 0; + private String sPropStreamerResource = ""; + private short iStreamerFrameRate = 0; + private String sPropsPic108 = ""; + private String sPcBannerResource = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPropsIdType, 1); + os.write(this.sPropsPic18, 2); + os.write(this.sPropsPic24, 3); + os.write(this.sPropsPicGif, 4); + os.write(this.sPropsBannerResource, 5); + os.write(this.sPropsBannerSize, 6); + os.write(this.sPropsBannerMaxTime, 7); + os.write(this.sPropsChatBannerResource, 8); + os.write(this.sPropsChatBannerSize, 9); + os.write(this.sPropsChatBannerMaxTime, 10); + os.write(this.iPropsChatBannerPos, 11); + os.write(this.iPropsChatBannerIsCombo, 12); + os.write(this.sPropsRollContent, 13); + os.write(this.iPropsBannerAnimationstyle, 14); + os.write(this.sPropFaceu, 15); + os.write(this.sPropH5Resource, 16); + os.write(this.sPropsWeb, 17); + os.write(this.sWitch, 18); + os.write(this.sCornerMark, 19); + os.write(this.iPropViewId, 20); + os.write(this.sPropStreamerResource, 21); + os.write(this.iStreamerFrameRate, 22); + os.write(this.sPropsPic108, 23); + os.write(this.sPcBannerResource, 24); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPropsIdType = is.read(this.iPropsIdType, 1, true); + this.sPropsPic18 = is.read(this.sPropsPic18, 2, true); + this.sPropsPic24 = is.read(this.sPropsPic24, 3, true); + this.sPropsPicGif = is.read(this.sPropsPicGif, 4, true); + this.sPropsBannerResource = is.read(this.sPropsBannerResource, 5, true); + this.sPropsBannerSize = is.read(this.sPropsBannerSize, 6, true); + this.sPropsBannerMaxTime = is.read(this.sPropsBannerMaxTime, 7, true); + this.sPropsChatBannerResource = is.read(this.sPropsChatBannerResource, 8, true); + this.sPropsChatBannerSize = is.read(this.sPropsChatBannerSize, 9, true); + this.sPropsChatBannerMaxTime = is.read(this.sPropsChatBannerMaxTime, 10, true); + this.iPropsChatBannerPos = is.read(this.iPropsChatBannerPos, 11, true); + this.iPropsChatBannerIsCombo = is.read(this.iPropsChatBannerIsCombo, 12, true); + this.sPropsRollContent = is.read(this.sPropsRollContent, 13, true); + this.iPropsBannerAnimationstyle = is.read(this.iPropsBannerAnimationstyle, 14, true); + this.sPropFaceu = is.read(this.sPropFaceu, 15, true); + this.sPropH5Resource = is.read(this.sPropH5Resource, 16, true); + this.sPropsWeb = is.read(this.sPropsWeb, 17, true); + this.sWitch = is.read(this.sWitch, 18, true); + this.sCornerMark = is.read(this.sCornerMark, 19, true); + this.iPropViewId = is.read(this.iPropViewId, 20, true); + this.sPropStreamerResource = is.read(this.sPropStreamerResource, 21, true); + this.iStreamerFrameRate = is.read(this.iStreamerFrameRate, 22, true); + this.sPropsPic108 = is.read(this.sPropsPic108, 23, true); + this.sPcBannerResource = is.read(this.sPcBannerResource, 24, true); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropsItem.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropsItem.java new file mode 100644 index 0000000..5faa7cd --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/PropsItem.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PropsItem extends TarsStructBase { + + public static final PropsItem DEFAULT = new PropsItem() {{ + setSPropsName("未知礼物"); + setIPropsYb(-1); + }}; + + private int iPropsId = 0; + private String sPropsName = ""; + private int iPropsYb = 0; + private int iPropsGreenBean = 0; + private int iPropsWhiteBean = 0; + private int iPropsGoldenBean = 0; + private int iPropsRed = 0; + private int iPropsPopular = 0; + private int iPropsExpendNum = -1; + private int iPropsFansValue = -1; + private List vPropsNum = new ArrayList() {{ + add(-1); + }}; + private int iPropsMaxNum = 0; + private int iPropsBatterFlag = 0; + private List vPropsChannel = new ArrayList() {{ + add(-1); + }}; + private String sPropsToolTip = ""; + private List vPropsIdentity = new ArrayList() {{ + add(new PropsIdentity()); + }}; + private int iPropsWeights = 0; + private int iPropsLevel = 0; + private DisplayInfo tDisplayInfo = new DisplayInfo(); + private SpecialInfo tSpecialInfo = new SpecialInfo(); + private int iPropsGrade = 0; + private int iPropsGroupNum = 0; + private String sPropsCommBannerResource = ""; + private String sPropsOwnBannerResource = ""; + private int iPropsShowFlag = 0; + private int iTemplateType = 0; + private int iShelfStatus = 0; + private String sAndroidLogo = ""; + private String sIpadLogo = ""; + private String sIphoneLogo = ""; + private String sPropsCommBannerResourceEx = ""; + private String sPropsOwnBannerResourceEx = ""; + private List vPresenterUid = new ArrayList() {{ + add(-1L); + }}; + private List vPropView = new ArrayList() {{ + add(new PropView()); + }}; + private short iFaceUSwitch = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPropsId, 1); + os.write(this.sPropsName, 2); + os.write(this.iPropsYb, 3); + os.write(this.iPropsGreenBean, 4); + os.write(this.iPropsWhiteBean, 5); + os.write(this.iPropsGoldenBean, 6); + os.write(this.iPropsRed, 7); + os.write(this.iPropsPopular, 8); + os.write(this.iPropsExpendNum, 9); + os.write(this.iPropsFansValue, 10); + os.write(this.vPropsNum, 11); + os.write(this.iPropsMaxNum, 12); + os.write(this.iPropsBatterFlag, 13); + os.write(this.vPropsChannel, 14); + os.write(this.sPropsToolTip, 15); + os.write(this.vPropsIdentity, 16); + os.write(this.iPropsWeights, 17); + os.write(this.iPropsLevel, 18); + os.write(this.tDisplayInfo, 19); + os.write(this.tSpecialInfo, 20); + os.write(this.iPropsGrade, 21); + os.write(this.iPropsGroupNum, 22); + os.write(this.sPropsCommBannerResource, 23); + os.write(this.sPropsOwnBannerResource, 24); + os.write(this.iPropsShowFlag, 25); + os.write(this.iTemplateType, 26); + os.write(this.iShelfStatus, 27); + os.write(this.sAndroidLogo, 28); + os.write(this.sIpadLogo, 29); + os.write(this.sIphoneLogo, 30); + os.write(this.sPropsCommBannerResourceEx, 31); + os.write(this.sPropsOwnBannerResourceEx, 32); + os.write(this.vPresenterUid, 33); + os.write(this.vPropView, 34); + os.write(this.iFaceUSwitch, 35); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPropsId = is.read(this.iPropsId, 1, true); + this.sPropsName = is.read(this.sPropsName, 2, true); + this.iPropsYb = is.read(this.iPropsYb, 3, true); + this.iPropsGreenBean = is.read(this.iPropsGreenBean, 4, true); + this.iPropsWhiteBean = is.read(this.iPropsWhiteBean, 5, true); + this.iPropsGoldenBean = is.read(this.iPropsGoldenBean, 6, true); + this.iPropsRed = is.read(this.iPropsRed, 7, true); + this.iPropsPopular = is.read(this.iPropsPopular, 8, true); + this.iPropsExpendNum = is.read(this.iPropsExpendNum, 9, true); + this.iPropsFansValue = is.read(this.iPropsFansValue, 10, true); + this.vPropsNum = is.readArray(this.vPropsNum, 11, true); + this.iPropsMaxNum = is.read(this.iPropsMaxNum, 12, true); + this.iPropsBatterFlag = is.read(this.iPropsBatterFlag, 13, true); + this.vPropsChannel = is.readArray(this.vPropsChannel, 14, true); + this.sPropsToolTip = is.read(this.sPropsToolTip, 15, true); + this.vPropsIdentity = is.readArray(this.vPropsIdentity, 16, true); + this.iPropsWeights = is.read(this.iPropsWeights, 17, true); + this.iPropsLevel = is.read(this.iPropsLevel, 18, true); + this.tDisplayInfo = (DisplayInfo) is.directRead(this.tDisplayInfo, 19, true); + this.tSpecialInfo = (SpecialInfo) is.directRead(this.tSpecialInfo, 20, true); + this.iPropsGrade = is.read(this.iPropsGrade, 21, true); + this.iPropsGroupNum = is.read(this.iPropsGroupNum, 22, true); + this.sPropsCommBannerResource = is.read(this.sPropsCommBannerResource, 23, true); + this.sPropsOwnBannerResource = is.read(this.sPropsOwnBannerResource, 24, true); + this.iPropsShowFlag = is.read(this.iPropsShowFlag, 25, true); + this.iTemplateType = is.read(this.iTemplateType, 26, true); + this.iShelfStatus = is.read(this.iShelfStatus, 27, true); + this.sAndroidLogo = is.read(this.sAndroidLogo, 28, true); + this.sIpadLogo = is.read(this.sIpadLogo, 29, true); + this.sIphoneLogo = is.read(this.sIphoneLogo, 30, true); + this.sPropsCommBannerResourceEx = is.read(this.sPropsCommBannerResourceEx, 31, true); + this.sPropsOwnBannerResourceEx = is.read(this.sPropsOwnBannerResourceEx, 32, true); + this.vPresenterUid = is.readArray(this.vPresenterUid, 33, true); + this.vPropView = is.readArray(this.vPropView, 34, true); + this.iFaceUSwitch = is.read(this.iFaceUSwitch, 35, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SendMessageFormat.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SendMessageFormat.java new file mode 100644 index 0000000..a47ab8d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SendMessageFormat.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendMessageFormat extends TarsStructBase { + + private int iSenceType; + private long lFormatId; + private long lSizeTemplateId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iSenceType, 0); + os.write(this.lFormatId, 1); + os.write(this.lSizeTemplateId, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iSenceType = is.read(this.iSenceType, 0, false); + this.lFormatId = is.read(this.lFormatId, 1, false); + this.lSizeTemplateId = is.read(this.lSizeTemplateId, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SenderInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SenderInfo.java new file mode 100644 index 0000000..268498a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SenderInfo.java @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SenderInfo extends TarsStructBase { + + private long lUid; + private long lImid; + private String sNickName = ""; + private int iGender; + private String sAvatarUrl; + private int iNobleLevel; + private NobleLevelInfo tNobleLevelInfo = new NobleLevelInfo(); + private String sGuid; + private String sHuYaUA; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.lImid, 1); + os.write(this.sNickName, 2); + os.write(this.iGender, 3); + os.write(this.sAvatarUrl, 4); + os.write(this.iNobleLevel, 5); + os.write(this.tNobleLevelInfo, 6); + os.write(this.sGuid, 7); + os.write(this.sHuYaUA, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.lImid = is.read(this.lImid, 1, true); + this.sNickName = is.read(this.sNickName, 2, true); + this.iGender = is.read(this.iGender, 3, true); + this.sAvatarUrl = is.read(this.sAvatarUrl, 4, true); + this.iNobleLevel = is.read(this.iNobleLevel, 5, true); + this.tNobleLevelInfo = (NobleLevelInfo) is.directRead(this.tNobleLevelInfo, 6, true); + this.sGuid = is.read(this.sGuid, 7, true); + this.sHuYaUA = is.read(this.sHuYaUA, 8, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SpecialInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SpecialInfo.java new file mode 100644 index 0000000..2e10c17 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SpecialInfo.java @@ -0,0 +1,91 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SpecialInfo extends TarsStructBase { + + private int iFirstSingle = 0; + private int iFirstGroup = 0; + private String sFirstTips = ""; + private int iSecondSingle = 0; + private int iSecondGroup = 0; + private String sSecondTips = ""; + private int iThirdSingle = 0; + private int iThirdGroup = 0; + private String sThirdTips = ""; + private int iWorldSingle = 0; + private int iWorldGroup = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iFirstSingle, 1); + os.write(this.iFirstGroup, 2); + os.write(this.sFirstTips, 3); + os.write(this.iSecondSingle, 4); + os.write(this.iSecondGroup, 5); + os.write(this.sSecondTips, 6); + os.write(this.iThirdSingle, 7); + os.write(this.iThirdGroup, 8); + os.write(this.sThirdTips, 9); + os.write(this.iWorldSingle, 10); + os.write(this.iWorldGroup, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iFirstSingle = is.read(this.iFirstSingle, 1, true); + this.iFirstGroup = is.read(this.iFirstGroup, 2, true); + this.sFirstTips = is.read(this.sFirstTips, 3, true); + this.iSecondSingle = is.read(this.iSecondSingle, 4, true); + this.iSecondGroup = is.read(this.iSecondGroup, 5, true); + this.sSecondTips = is.read(this.sSecondTips, 6, true); + this.iThirdSingle = is.read(this.iThirdSingle, 7, true); + this.iThirdGroup = is.read(this.iThirdGroup, 8, true); + this.sThirdTips = is.read(this.sThirdTips, 9, true); + this.iWorldSingle = is.read(this.iWorldSingle, 10, true); + this.iWorldGroup = is.read(this.iWorldGroup, 11, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/StreamerNode.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/StreamerNode.java new file mode 100644 index 0000000..35e36e8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/StreamerNode.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2024/4/19 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class StreamerNode extends TarsStructBase { + + private short iGiftLevel; + private short iStreamerLevel; + private short iMaterialType; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iGiftLevel, 0); + os.write(this.iStreamerLevel, 1); + os.write(this.iMaterialType, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iGiftLevel = is.read(this.iGiftLevel, 0, false); + this.iStreamerLevel = is.read(this.iStreamerLevel, 1, false); + this.iMaterialType = is.read(this.iMaterialType, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SuperFansInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SuperFansInfo.java new file mode 100644 index 0000000..8914cfa --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/SuperFansInfo.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SuperFansInfo extends TarsStructBase { + + private long lSFExpiredTS; + private int iSFFlag; + private long lSFAnnualTS; + private int iSFVariety; + private long lOpenTS; + private long lMemoryDay; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lSFExpiredTS, 0); + os.write(this.iSFFlag, 1); + os.write(this.lSFAnnualTS, 2); + os.write(this.iSFVariety, 3); + os.write(this.lOpenTS, 4); + os.write(this.lMemoryDay, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lSFExpiredTS = is.read(this.lSFExpiredTS, 0, false); + this.iSFFlag = is.read(this.iSFFlag, 1, false); + this.lSFAnnualTS = is.read(this.lSFAnnualTS, 2, false); + this.iSFVariety = is.read(this.iSFVariety, 3, false); + this.lOpenTS = is.read(this.lOpenTS, 4, false); + this.lMemoryDay = is.read(this.lMemoryDay, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UidNickName.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UidNickName.java new file mode 100644 index 0000000..07504a1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UidNickName.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UidNickName extends TarsStructBase { + + private long lUid = 0; + private String sNickName = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sNickName, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sNickName = is.read(this.sNickName, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserId.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserId.java new file mode 100644 index 0000000..0d6d4c9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserId.java @@ -0,0 +1,83 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserId extends TarsStructBase { + + private long lUid; + private String sGuid = ""; + private String sToken = ""; + private String sHuYaUA = ""; + private String sCookie = ""; + private int iTokenType; + private String sDeviceInfo = ""; + private String sQIMEI = ""; + + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sGuid, 1); + os.write(this.sToken, 2); + os.write(this.sHuYaUA, 3); + os.write(this.sCookie, 4); + os.write(this.iTokenType, 5); + os.write(this.sDeviceInfo, 6); + os.write(this.sQIMEI, 7); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sGuid = is.read(this.sGuid, 1, false); + this.sToken = is.read(this.sToken, 2, false); + this.sHuYaUA = is.read(this.sHuYaUA, 3, false); + this.sCookie = is.read(this.sCookie, 4, false); + this.iTokenType = is.read(this.iTokenType, 5, false); + this.sDeviceInfo = is.read(this.sDeviceInfo, 6, false); + this.sQIMEI = is.read(this.sQIMEI, 7, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserIdentityInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserIdentityInfo.java new file mode 100644 index 0000000..cb2b0a0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserIdentityInfo.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserIdentityInfo extends TarsStructBase { + + private List vDecorationPrefix = CollUtil.newArrayList(new DecorationInfo()); + private List vDecorationSuffix = CollUtil.newArrayList(new DecorationInfo()); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vDecorationPrefix, 0); + os.write(this.vDecorationSuffix, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vDecorationPrefix = is.readArray(this.vDecorationPrefix, 0, false); + this.vDecorationSuffix = is.readArray(this.vDecorationSuffix, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserRidePetInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserRidePetInfo.java new file mode 100644 index 0000000..dd9a0d9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/UserRidePetInfo.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserRidePetInfo extends TarsStructBase { + + private long lPetId; + private String sPetName = ""; + private String sPetAction = ""; + private int iPetFlag; + private int iWeight; + private int iRideFlag; + private long lBeginTs; + private long lEndTs; + private int iSourceType; + private int iPetType; + private Map mPetDetail = new HashMap<>(); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lPetId, 0); + os.write(this.sPetName, 1); + os.write(this.sPetAction, 2); + os.write(this.iPetFlag, 3); + os.write(this.iWeight, 4); + os.write(this.iRideFlag, 5); + os.write(this.lBeginTs, 6); + os.write(this.lEndTs, 7); + os.write(this.iSourceType, 8); + os.write(this.iPetType, 9); + os.write(this.mPetDetail, 10); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lPetId = is.read(this.lPetId, 0, false); + this.sPetName = is.read(this.sPetName, 1, false); + this.sPetAction = is.read(this.sPetAction, 2, false); + this.iPetFlag = is.read(this.iPetFlag, 3, false); + this.iWeight = is.read(this.iWeight, 4, false); + this.iRideFlag = is.read(this.iRideFlag, 5, false); + this.lBeginTs = is.read(this.lBeginTs, 6, false); + this.lEndTs = is.read(this.lEndTs, 7, false); + this.iSourceType = is.read(this.iSourceType, 8, false); + this.iPetType = is.read(this.iPetType, 9, false); + this.mPetDetail = is.readMap(this.mPetDetail, 10, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSDeviceInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSDeviceInfo.java new file mode 100644 index 0000000..adef936 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSDeviceInfo.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSDeviceInfo extends TarsStructBase { + + private String sIMEI = ""; + private String sAPN = ""; + private String sNetType = ""; + private String sDeviceId = ""; + private String sMId = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sIMEI, 0); + os.write(this.sAPN, 1); + os.write(this.sNetType, 2); + os.write(this.sDeviceId, 3); + os.write(this.sMId, 4); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sIMEI = is.read(this.sIMEI, 0, false); + this.sAPN = is.read(this.sAPN, 1, false); + this.sNetType = is.read(this.sNetType, 2, false); + this.sDeviceId = is.read(this.sDeviceId, 3, false); + this.sMId = is.read(this.sMId, 4, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSMsgItem.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSMsgItem.java new file mode 100644 index 0000000..35e7835 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSMsgItem.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseHuyaCmdMsg; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSMsgItem extends BaseHuyaCmdMsg { + + private byte[] sMsg; + private long lMsgId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(super.getLUri(), 0); + os.write(this.sMsg, 1); + os.write(this.lMsgId, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + super.setLUri(is.read(super.getLUri(), 0, false)); + this.sMsg = is.read(this.sMsg, 1, false); + this.lMsgId = is.read(this.lMsgId, 2, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq_V2; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSUserInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSUserInfo.java new file mode 100644 index 0000000..14a7fc2 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WSUserInfo.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSUserInfo extends TarsStructBase { + + private long lUid; + private boolean bAnonymous = true; + private String sGuid = ""; + private String sToken = ""; + private long lTid; + private long lSid; + private long lGroupId; + private long lGroupType; + private String sAppId = ""; + private String sUA = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.bAnonymous, 1); + os.write(this.sGuid, 2); + os.write(this.sToken, 3); + os.write(this.lTid, 4); + os.write(this.lSid, 5); + os.write(this.lGroupId, 6); + os.write(this.lGroupType, 7); + os.write(this.sAppId, 8); + os.write(this.sUA, 9); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.bAnonymous = is.read(this.bAnonymous, 1, true); + this.sGuid = is.read(this.sGuid, 2, true); + this.sToken = is.read(this.sToken, 3, true); + this.lTid = is.read(this.lTid, 4, true); + this.lSid = is.read(this.lSid, 5, true); + this.lGroupId = is.read(this.lGroupId, 6, true); + this.lGroupType = is.read(this.lGroupType, 7, true); + this.sAppId = is.read(this.sAppId, 8, true); + this.sUA = is.read(this.sUA, 9, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WeekRankInfo.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WeekRankInfo.java new file mode 100644 index 0000000..a9b1707 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/dto/WeekRankInfo.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WeekRankInfo extends TarsStructBase { + + private long lUid; + private int iRank; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.iRank, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.iRank = is.read(this.iRank, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/factory/HuyaMsgFactory.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/factory/HuyaMsgFactory.java new file mode 100644 index 0000000..9fcf6ab --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/factory/HuyaMsgFactory.java @@ -0,0 +1,273 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.factory; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.databind.JsonNode; +import tech.ordinaryroad.live.chat.client.codec.huya.api.HuyaApis; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaClientTemplateTypeEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaLiveSource; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaWupFunctionEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.WebSocketCommand; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.req.*; +import tech.ordinaryroad.live.chat.client.codec.huya.util.HuyaCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class HuyaMsgFactory { + + private static final TimedCache FACTORY_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1), new ConcurrentHashMap<>()); + public static final String KEY_COOKIE_GUID = "guid"; + public static final String KEY_COOKIE_YYUID = "yyuid"; + + /** + * 浏览器地址中的房间id,支持短id + */ + private final Object roomId; + private final JsonNode roomInfo; + private volatile static byte[] heartbeatMsg; + private volatile static byte[] giftListReqMsg; + + public HuyaMsgFactory(Object roomId) { + this.roomId = roomId; + this.roomInfo = HuyaApis.roomInit(roomId); + } + + public static HuyaMsgFactory getInstance(Object roomId) { + if (!FACTORY_CACHE.containsKey(roomId)) { + FACTORY_CACHE.put(roomId, new HuyaMsgFactory(roomId)); + } + return FACTORY_CACHE.get(roomId); + } + + /** + * 创建弹幕包 + * + * @param msg 弹幕内容 + * @param ver VER + * @param cookie Cookie + * @return WebSocketCommand + */ + public WebSocketCommand createSendMessageReq(String msg, String ver, String cookie) { + String yyuid = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_YYUID, () -> { + throw new BaseException("cookie中缺少参数" + KEY_COOKIE_YYUID); + }); + String guid = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_GUID, () -> { + throw new BaseException("cookie中缺少参数" + KEY_COOKIE_GUID); + }); + SendMessageReq sendMessageReq = new SendMessageReq(); + sendMessageReq.getTUserId().setLUid(NumberUtil.parseLong(yyuid)); + sendMessageReq.getTUserId().setSGuid(guid); + sendMessageReq.getTUserId().setSHuYaUA("webh5&" + ver + "&websocket"); + sendMessageReq.getTUserId().setSCookie(cookie); + sendMessageReq.getTUserId().setSDeviceInfo("chrome"); + sendMessageReq.setSContent(msg); + sendMessageReq.setLPid(roomInfo.get("lChannelId").asLong()); + + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName("liveui"); + wupReq.getTarsServantRequest().setFunctionName("sendMessage"); + wupReq.getUniAttribute().put("tReq", sendMessageReq); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(wupReq.encode()); + return webSocketCommand; + } + + /** + * 创建认证包 + * 1. doLaunch + * 2. registerGroup + * 3. updateUserInfo + * + * @return AuthWebSocketFrame + */ + public WebSocketCommand createAuth(String ver, String cookie) { + // sFuncName + // getLivingInfo, huyaliveui + // getPresenterLiveScheduleInfo, presenterui + // doLaunch, liveui + // chat:1724691, live:1724691 + // getWebdbUserInfo, liveui + // OnUserHeartBeat, onlineuif +// try { +// UserInfo wsUserInfo = new UserInfo(); +// wsUserInfo.setLUid(roomInfo.get("lYyid").asLong()); +// wsUserInfo.setBAnonymous(roomInfo.get("lYyid").asLong() == 0); +// wsUserInfo.setLTid(roomInfo.get("lChannelId").asLong()); +// wsUserInfo.setLSid(roomInfo.get("lSubChannelId").asLong()); +// wsUserInfo.setLGroupId(roomInfo.get("lYyid").asLong()); +// wsUserInfo.setLGroupType(3); +// wsUserInfo.setSAppId(""); +// wsUserInfo.setSUA("webh5&%s&websocket".formatted(HuyaLiveChatClientConfig.VER)); +// +// WebSocketCommand webSocketCommand = new WebSocketCommand(); +// webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_RegisterReq.getCode()); +// webSocketCommand.setVData(wsUserInfo.toByteArray()); +// return webSocketCommand +// } catch (Exception e) { +// throw new BaseException("认证包创建失败,请检查房间号是否正确。roomId: %d, msg: %s".formatted(roomId, e.getMessage())); +// } + return createLiveLaunchReq(ver, cookie); + } + + public WebSocketCommand createGetLivingInfoReq(String ver, String cookie) { + GetLivingInfoReq getLivingInfoReq = new GetLivingInfoReq(); +// getLivingInfoReq.getTId().setSGuid("0a7dca72a3ce1b654001dd2ade2ae857"); + getLivingInfoReq.getTId().setSHuYaUA("webh5&" + ver + "&websocket"); + getLivingInfoReq.getTId().setSDeviceInfo("chrome"); + getLivingInfoReq.getTId().setSCookie(StrUtil.nullToEmpty(cookie)); +// getLivingInfoReq.getTId().setSCookie("vplayer_sbanner_1724691_1724691=1; SoundValue=0.50; alphaValue=0.80; game_did=R24J2g0mBzvdXJf7a9nheSl3zIci2BOp0-t; isInLiveRoom=true; guid=0a7dca72a3ce1b654001dd2ade2ae857; __yamid_tt1=0.8029935065011269; __yamid_new=CA75D4CD5C100001165B82B52140C900; guid=0a7dca72a3ce1b654001dd2ade2ae857; udb_guiddata=af5dbdbf76254a6e8a0a293ccae9b688; udb_deviceid=w_761623483861815296; udb_passdata=3; __yasmid=0.8029935065011269; _yasids=__rootsid%3DCA767045C1100001EC5A145C1E90FE00; Hm_lvt_51700b6c722f5bb4cf39906a596ea41f=1696473760,1696476745,1696483565,1696484212; Hm_lpvt_51700b6c722f5bb4cf39906a596ea41f=1696484212; huya_ua=webh5&0.0.1&activity; _rep_cnt=2; sdid=0UnHUgv0/qmfD4KAKlwzhqX98QrnPCcck6fN494iawS5Kmymgreu89o7gYta/QvQsBDeSeSRp4/grQ5fEuFAYrL59coAKuxuukiwgTLjfjEDWVkn9LtfFJw/Qo4kgKr8OZHDqNnuwg612sGyflFn1dkUeZYTToCzzl4GCHq7MUDahxGuPR8mUddfImFtjccs1; huya_flash_rep_cnt=74; huya_web_rep_cnt=125; rep_cnt=44"); + getLivingInfoReq.setLPresenterUid(roomInfo.get("lChannelId").asLong()); + + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName("huyaliveui"); + wupReq.getTarsServantRequest().setFunctionName("getLivingInfo"); + wupReq.getUniAttribute().put("tReq", getLivingInfoReq); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(wupReq.encode()); + return webSocketCommand; + } + + public WebSocketCommand createLiveLaunchReq(String ver, String cookie) { + LiveLaunchReq liveLaunchReq = new LiveLaunchReq(); + liveLaunchReq.setBSupportDomain(true); +// liveLaunchReq.getTId().setSGuid(UUID.fastUUID().toString(true)); + liveLaunchReq.getTId().setSHuYaUA("webh5&" + ver + "&websocket"); + liveLaunchReq.getTId().setSDeviceInfo("chrome"); + liveLaunchReq.getTId().setSCookie(StrUtil.nullToEmpty(cookie)); + liveLaunchReq.getTLiveUB().setESource(HuyaLiveSource.WEB_HUYA.getCode()); + + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName("liveui"); + wupReq.getTarsServantRequest().setFunctionName("doLaunch"); + wupReq.getUniAttribute().put("tReq", liveLaunchReq); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(wupReq.encode()); + return webSocketCommand; + } + + public WebSocketCommand createRegisterGroupReq() { + String lYyid = roomInfo.get("lChannelId").asText(); + + WSRegisterGroupReq wsRegisterGroupReq = new WSRegisterGroupReq(); + wsRegisterGroupReq.setVGroupId(CollUtil.newArrayList("live:" + lYyid, "chat:" + lYyid)); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmdC2S_RegisterGroupReq.getCode()); + webSocketCommand.setVData(wsRegisterGroupReq.toByteArray()); + return webSocketCommand; + } + + public WebSocketCommand createUpdateUserInfoReq() { + WSUpdateUserInfoReq wsUpdateUserInfoReq = new WSUpdateUserInfoReq(); + wsUpdateUserInfoReq.setSAppSrc("HUYA&ZH&2052"); + wsUpdateUserInfoReq.getTWSMsgStatInfo().setISupportAckMsgStat(1); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmdC2S_UpdateUserInfoReq.getCode()); + webSocketCommand.setVData(wsUpdateUserInfoReq.toByteArray()); + return webSocketCommand; + } + + /** + * 创建获取礼物列表请求包 + * + * @return WebSocketCommand + */ + public WebSocketCommand createGiftListReq(String ver) { + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(this.getGiftListReqMsg(ver)); + return webSocketCommand; + } + + public WebSocketCommand createHeartbeat(String ver, String cookie) { + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmdC2S_HeartBeatReq.getCode()); + webSocketCommand.setVData(this.getHeartbeatMsg(ver, cookie)); + return webSocketCommand; + } + + /** + * 心跳包单例模式 + */ + public byte[] getHeartbeatMsg(String ver, String cookie) { + if (heartbeatMsg == null) { + synchronized (HuyaMsgFactory.this) { + if (heartbeatMsg == null) { + UserHeartBeatReq userHeartBeatReq = new UserHeartBeatReq(); +// userHeartBeatReq.getTId().setSGuid(""); + userHeartBeatReq.getTId().setSHuYaUA("webh5&" + ver + "&websocket"); + userHeartBeatReq.getTId().setSDeviceInfo("chrome"); + userHeartBeatReq.getTId().setSCookie(StrUtil.nullToEmpty(cookie)); +// userHeartBeatReq.setLSid(roomInfo.get("lSubChannelId").asLong()); + userHeartBeatReq.setLPid(roomInfo.get("lChannelId").asLong()); +// userHeartBeatReq.setELineType(HuyaStreamLineTypeEnum.STREAM_LINE_WS.getCode()); + userHeartBeatReq.setELineType(-1); + + heartbeatMsg = HuyaCodecUtil.encode("onlineui", HuyaWupFunctionEnum.OnUserHeartBeat, userHeartBeatReq); + } + } + } + return heartbeatMsg; + } + + /** + * 礼物列表请求包单例模式 + */ + public byte[] getGiftListReqMsg(String ver) { + if (giftListReqMsg == null) { + synchronized (HuyaMsgFactory.this) { + if (giftListReqMsg == null) { + GetPropsListReq getPropsListReq = new GetPropsListReq(); + getPropsListReq.getTUserId().setLUid(roomInfo.get("lYyid").asLong()); + getPropsListReq.getTUserId().setSHuYaUA("webh5&" + ver + "&websocket"); + getPropsListReq.setITemplateType(HuyaClientTemplateTypeEnum.TPL_MIRROR.getCode()); + + giftListReqMsg = HuyaCodecUtil.encode("PropsUIServer", HuyaWupFunctionEnum.getPropsList, getPropsListReq); + } + } + } + return giftListReqMsg; + } + +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/GetLivingInfoReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/GetLivingInfoReq.java new file mode 100644 index 0000000..4adbff2 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/GetLivingInfoReq.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GetLivingInfoReq extends TarsStructBase { + + private UserId tId = new UserId(); + private long lTopSid; + private long lSubSid; + private long lPresenterUid; + private String sTraceSource = ""; + private String sPassword = ""; + private long iRoomId; + private int iFreeFlowFlag; + private int iIpStack; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tId, 0); + os.write(this.lTopSid, 1); + os.write(this.lSubSid, 2); + os.write(this.lPresenterUid, 3); + os.write(this.sTraceSource, 4); + os.write(this.sPassword, 5); + os.write(this.iRoomId, 6); + os.write(this.iFreeFlowFlag, 7); + os.write(this.iIpStack, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tId = (UserId) is.directRead(this.tId, 0, false); + this.lTopSid = is.read(this.lTopSid, 1, false); + this.lSubSid = is.read(this.lSubSid, 2, false); + this.lPresenterUid = is.read(this.lPresenterUid, 3, false); + this.sTraceSource = is.read(this.sTraceSource, 4, false); + this.sPassword = is.read(this.sPassword, 5, false); + this.iRoomId = is.read(this.iRoomId, 6, false); + this.iFreeFlowFlag = is.read(this.iFreeFlowFlag, 7, false); + this.iIpStack = is.read(this.iIpStack, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/GetPropsListReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/GetPropsListReq.java new file mode 100644 index 0000000..d8b5d9a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/GetPropsListReq.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GetPropsListReq extends TarsStructBase { + + private UserId tUserId = new UserId(); + private String sMd5 = ""; + private int iTemplateType; + private String sVersion = ""; + private int iAppId; + private long lPresenterUid; + private long lSid; + private long lSubSid; + private int iGameId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tUserId, 1); + os.write(this.sMd5, 2); + os.write(this.iTemplateType, 3); + os.write(this.sVersion, 4); + os.write(this.iAppId, 5); + os.write(this.lPresenterUid, 6); + os.write(this.lSid, 7); + os.write(this.lSubSid, 8); + os.write(this.iGameId, 9); + } + + @Override + public void readFrom(TarsInputStream is) { + is.read(this.tUserId, 1, false); + is.read(this.sMd5, 2, false); + is.read(this.iTemplateType, 3, false); + is.read(this.sVersion, 4, false); + is.read(this.iAppId, 5, false); + is.read(this.lPresenterUid, 6, false); + is.read(this.lSid, 7, false); + is.read(this.lSubSid, 8, false); + is.read(this.iGameId, 9, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/LiveLaunchReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/LiveLaunchReq.java new file mode 100644 index 0000000..e4a6cdc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/LiveLaunchReq.java @@ -0,0 +1,69 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.LiveUserbase; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveLaunchReq extends TarsStructBase { + + private UserId tId = new UserId(); + private LiveUserbase tLiveUB = new LiveUserbase(); + private boolean bSupportDomain; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tId, 0); + os.write(this.tLiveUB, 1); + os.write(this.bSupportDomain, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tId = (UserId) is.directRead(this.tId, 0, false); + this.tLiveUB = (LiveUserbase) is.directRead(this.tLiveUB, 1, false); + this.bSupportDomain = is.read(this.bSupportDomain, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/SendMessageReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/SendMessageReq.java new file mode 100644 index 0000000..548fb24 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/SendMessageReq.java @@ -0,0 +1,99 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.*; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendMessageReq extends TarsStructBase { + + private UserId tUserId = new UserId(); + private long lTid; + private long lSid; + private String sContent = ""; + private int iShowMode; + private ContentFormat tFormat = new ContentFormat(); + private BulletFormat tBulletFormat = new BulletFormat(); + private List vAtSomeone = CollUtil.newArrayList(new UidNickName()); + private long lPid; + private List vTagInfo = CollUtil.newArrayList(new MessageTagInfo()); + private SendMessageFormat tSenceFormat = new SendMessageFormat(); + private int iMessageMode; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tUserId, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 2); + os.write(this.sContent, 3); + os.write(this.iShowMode, 4); + os.write(this.tFormat, 5); + os.write(this.tBulletFormat, 6); + os.write(this.vAtSomeone, 7); + os.write(this.lPid, 8); + os.write(this.vTagInfo, 9); + os.write(this.tSenceFormat, 10); + os.write(this.iMessageMode, 11); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.tUserId = (UserId) is.directRead(this.tUserId, 0, false); + this.lTid = is.read(this.lTid, 1, false); + this.lSid = is.read(this.lSid, 2, false); + this.sContent = is.read(this.sContent, 3, false); + this.iShowMode = is.read(this.iShowMode, 4, false); + this.tFormat = (ContentFormat) is.directRead(this.tFormat, 5, false); + this.tBulletFormat = (BulletFormat) is.directRead(this.tBulletFormat, 6, false); + this.vAtSomeone = is.readArray(this.vAtSomeone, 7, false); + this.lPid = is.read(this.lPid, 8, false); + this.vTagInfo = is.readArray(this.vTagInfo, 9, false); + this.tSenceFormat = (SendMessageFormat) is.directRead(this.tSenceFormat, 10, false); + this.iMessageMode = is.read(this.iMessageMode, 11, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/UserHeartBeatReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/UserHeartBeatReq.java new file mode 100644 index 0000000..3e1373c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/UserHeartBeatReq.java @@ -0,0 +1,90 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserHeartBeatReq extends TarsStructBase { + + private UserId tId = new UserId(); + private long lTid; + private long lSid; + private long lPid; + private boolean bWatchVideo; + private int eLineType; + private int iFps; + private int iAttendee; + private int iBandwidth; + private int iLastHeartElapseTime; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tId, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 2); + os.write(this.lPid, 4); + os.write(this.bWatchVideo, 5); + os.write(this.eLineType, 6); + os.write(this.iFps, 7); + os.write(this.iAttendee, 8); + os.write(this.iBandwidth, 9); + os.write(this.iLastHeartElapseTime, 10); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.tId = (UserId) is.directRead(this.tId, 0, false); + this.lTid = is.read(this.lTid, 1, false); + this.lSid = is.read(this.lSid, 2, false); + this.lPid = is.read(this.lPid, 4, false); + this.bWatchVideo = is.read(this.bWatchVideo, 5, false); + this.eLineType = is.read(this.eLineType, 6, false); + this.iFps = is.read(this.iFps, 7, false); + this.iAttendee = is.read(this.iAttendee, 8, false); + this.iBandwidth = is.read(this.iBandwidth, 9, false); + this.iLastHeartElapseTime = is.read(this.iLastHeartElapseTime, 10, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/VerifyCookieReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/VerifyCookieReq.java new file mode 100644 index 0000000..f407ddf --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/VerifyCookieReq.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class VerifyCookieReq extends TarsStructBase { + + private long lUid; + private String sUA = ""; + private String sCookie = ""; + private String sGuid = ""; + private int bAutoRegisterUid; + private String sAppSrc = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sUA, 1); + os.write(this.sCookie, 2); + os.write(this.sGuid, 3); + os.write(this.bAutoRegisterUid, 4); + os.write(this.sAppSrc, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.sUA = is.read(this.sUA, 1, true); + this.sCookie = is.read(this.sCookie, 2, true); + this.sGuid = is.read(this.sGuid, 3, true); + this.bAutoRegisterUid = is.read(this.bAutoRegisterUid, 4, true); + this.sAppSrc = is.read(this.sAppSrc, 5, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSLaunchReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSLaunchReq.java new file mode 100644 index 0000000..101688e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSLaunchReq.java @@ -0,0 +1,74 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.WSDeviceInfo; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSLaunchReq extends TarsStructBase { + + private long lUid; + private String sGuid = ""; + private String sUA = ""; + private String sAppSrc = ""; + private WSDeviceInfo tDeviceInfo = new WSDeviceInfo(); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sGuid, 1); + os.write(this.sUA, 2); + os.write(this.sAppSrc, 3); + os.write(this.tDeviceInfo, 4); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sGuid = is.read(this.sGuid, 1, false); + this.sUA = is.read(this.sUA, 2, false); + this.sAppSrc = is.read(this.sAppSrc, 3, false); + this.tDeviceInfo = (WSDeviceInfo) is.directRead(this.tDeviceInfo, 4, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSRegisterGroupReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSRegisterGroupReq.java new file mode 100644 index 0000000..acdfb62 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSRegisterGroupReq.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSRegisterGroupReq extends TarsStructBase { + + private List vGroupId = CollUtil.newArrayList(""); + private String sToken = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vGroupId, 0); + os.write(this.sToken, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vGroupId = is.readArray(this.vGroupId, 0, false); + this.sToken = is.read(this.sToken, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSUpdateUserInfoReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSUpdateUserInfoReq.java new file mode 100644 index 0000000..6c21313 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WSUpdateUserInfoReq.java @@ -0,0 +1,87 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.MsgStatInfo; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WSUpdateUserInfoReq extends TarsStructBase { + + private String sAppSrc = ""; + private String sGuid = ""; + private int iReportMsgIdRatio; + private int iSupportAck; + private MsgStatInfo tWSMsgStatInfo = new MsgStatInfo(); + private Map mCustomHeader = new HashMap<>(); + private int iMsgDegradeLevel; + + public WSUpdateUserInfoReq(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sAppSrc, 0); + os.write(this.sGuid, 1); + os.write(this.iReportMsgIdRatio, 2); + os.write(this.iSupportAck, 3); + os.write(this.tWSMsgStatInfo, 6); + os.write(this.mCustomHeader, 7); + os.write(this.iMsgDegradeLevel, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sAppSrc = is.read(this.sAppSrc, 0, false); + this.sGuid = is.read(this.sGuid, 1, false); + this.iReportMsgIdRatio = is.read(this.iReportMsgIdRatio, 2, false); + this.iSupportAck = is.read(this.iSupportAck, 3, false); + this.tWSMsgStatInfo = (MsgStatInfo) is.directRead(this.tWSMsgStatInfo, 6, false); + this.mCustomHeader = is.readStringMap( 7, false); + this.iMsgDegradeLevel = is.read(this.iMsgDegradeLevel, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WupReq.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WupReq.java new file mode 100644 index 0000000..e4c11d7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/msg/req/WupReq.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.msg.req; + +import lombok.NoArgsConstructor; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.BaseWup; + +/** + * @author mjz + * @date 2023/10/3 + */ +@NoArgsConstructor +public class WupReq extends BaseWup { + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_WupReq; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/util/HuyaCodecUtil.java b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/util/HuyaCodecUtil.java new file mode 100644 index 0000000..f4780f4 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/main/java/tech/ordinaryroad/live/chat/client/codec/huya/util/HuyaCodecUtil.java @@ -0,0 +1,167 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.huya.util; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.ByteUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import io.netty.buffer.ByteBuf; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaDecorationAppTypeEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaDecorationViewTypeEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaWupFunctionEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.*; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.IHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.BadgeInfo; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.DecorationInfo; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.req.WupReq; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import java.nio.charset.StandardCharsets; +import java.util.*; + +/** + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +public class HuyaCodecUtil { + + public static List decode(ByteBuf in) { + List msgList = new ArrayList<>(); + Queue pendingByteBuf = new LinkedList<>(); + + do { + msgList.addAll(doDecode(in, pendingByteBuf)); + in = pendingByteBuf.poll(); + } while (in != null); + + return msgList; + } + + /** + * 执行解码操作,有压缩则先解压,解压后可能得到多条消息 + * + * @param in handler收到的一条消息 + * @param pendingByteBuf 用于存放未读取完的ByteBuf + */ + private static List doDecode(ByteBuf in, Queue pendingByteBuf) { + byte[] bytes = new byte[in.readableBytes()]; + in.readBytes(bytes); + + WebSocketCommand webSocketCommand = new WebSocketCommand(newUtf8TarsInputStream(bytes)); + HuyaOperationEnum operationEnum = webSocketCommand.getOperationEnum(); + if (operationEnum == null) { + throw new BaseException(String.format("未知operation: %d", webSocketCommand.getOperation())); + } + + switch (operationEnum) { + case EWSCmd_RegisterRsp: { + return Collections.singletonList(new WSRegisterRsp(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmdS2C_RegisterGroupRsp: { + return Collections.singletonList(new WSRegisterGroupRsp(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmd_WupRsp: { + return Collections.singletonList(new WupRsp(webSocketCommand.getVData())); + } + case EWSCmdS2C_MsgPushReq: { + return Collections.singletonList(new WSPushMessage(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmdS2C_VerifyCookieRsp: { + return Collections.singletonList(new VerifyCookieRsp(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmdS2C_MsgPushReq_V2: { + WSPushMessage_V2 pushMessageV2 = new WSPushMessage_V2(newUtf8TarsInputStream(webSocketCommand.getVData())); + return pushMessageV2.getVMsgItem(); + } + default: { + return Collections.singletonList(webSocketCommand); + } + } + } + + public static byte[] encode(String servantName, HuyaWupFunctionEnum function, TarsStructBase req) { + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName(servantName); + wupReq.getTarsServantRequest().setFunctionName(function.name()); + wupReq.getUniAttribute().put("tReq", req); + return wupReq.encode(); + } + + public static TarsInputStream newUtf8TarsInputStream(byte[] bytes) { + TarsInputStream tarsInputStream = new TarsInputStream(bytes); + tarsInputStream.setServerEncoding(StandardCharsets.UTF_8.name()); + return tarsInputStream; + } + + public static Optional decodeDecorationInfo(DecorationInfo decorationInfo) { + int iViewType = decorationInfo.getIViewType(); + HuyaDecorationViewTypeEnum huyaDecorationViewTypeEnum = HuyaDecorationViewTypeEnum.getByCode(iViewType); + if (huyaDecorationViewTypeEnum == null) { + return Optional.empty(); + } + + switch (huyaDecorationViewTypeEnum) { + case kDecorationViewTypeCustomized: { + int iAppId = decorationInfo.getIAppId(); + HuyaDecorationAppTypeEnum huyaDecorationAppTypeEnum = HuyaDecorationAppTypeEnum.getByCode(iAppId); + if (huyaDecorationAppTypeEnum == null) { + return Optional.empty(); + } + + switch (huyaDecorationAppTypeEnum) { + case kDecorationAppTypeFans: { + BadgeInfo badgeInfo = new BadgeInfo(); + badgeInfo.readFrom(HuyaCodecUtil.newUtf8TarsInputStream(decorationInfo.getVData())); + return Optional.of(badgeInfo); + } + default: { + return Optional.empty(); + } + } + } + default: { + return Optional.empty(); + } + } + } + + public static String ab2str(byte[] bytes) { + char[] chars = new char[bytes.length]; + for (int i = 0; i < bytes.length; i++) { + int unsignedInt = ByteUtil.byteToUnsignedInt(bytes[i]); + chars[i] = (char) unsignedInt; + } + return ArrayUtil.join(chars, ""); + } + + public static String btoa(String string) { + return Base64.encode(string); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/test/java/tech/ordinaryroad/live/chat/client/codec/huya/api/HuyaApisTest.java b/live-chat-client-codec/live-chat-client-codec-huya/src/test/java/tech/ordinaryroad/live/chat/client/codec/huya/api/HuyaApisTest.java new file mode 100644 index 0000000..9b59819 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/test/java/tech/ordinaryroad/live/chat/client/codec/huya/api/HuyaApisTest.java @@ -0,0 +1,20 @@ +package tech.ordinaryroad.live.chat.client.codec.huya.api; + +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * @author mjz + * @date 2023/10/1 + */ +class HuyaApisTest { + + @Test + void roomInit() { + assertEquals(HuyaApis.roomInit(189201).size(), 3); + assertThrows(BaseException.class, () -> HuyaApis.roomInit(-1)); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-huya/src/test/java/tech/ordinaryroad/live/chat/client/codec/huya/util/HuyaCodecUtilTest.java b/live-chat-client-codec/live-chat-client-codec-huya/src/test/java/tech/ordinaryroad/live/chat/client/codec/huya/util/HuyaCodecUtilTest.java new file mode 100644 index 0000000..a4804ba --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-huya/src/test/java/tech/ordinaryroad/live/chat/client/codec/huya/util/HuyaCodecUtilTest.java @@ -0,0 +1,99 @@ +package tech.ordinaryroad.live.chat.client.codec.huya.util; + +import cn.hutool.core.codec.Base64; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.ConnectParaInfo; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.LiveLaunchRsp; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.WebSocketCommand; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.WupRsp; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.UserId; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.req.*; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/3 + */ +class HuyaCodecUtilTest { + + private String ver = "2309271152"; + private String exp = "15547.23738,16582.25335,32083.50834"; + private String appSrc = "HUYA&ZH&2052"; + + @Test + void ab2str() { + ConnectParaInfo wsConnectParaInfo = ConnectParaInfo.newWSConnectParaInfo(ver, exp, appSrc); + byte[] byteArray = wsConnectParaInfo.toByteArray(); + String s = HuyaCodecUtil.ab2str(byteArray); + System.out.println(s); + } + + @Test + void btoa() { + ConnectParaInfo wsConnectParaInfo = ConnectParaInfo.newWSConnectParaInfo(ver, exp, appSrc); + byte[] byteArray = wsConnectParaInfo.toByteArray(); + String s = HuyaCodecUtil.ab2str(byteArray); + + String btoa = HuyaCodecUtil.btoa(s); + System.out.println(btoa); + } + + @Test + void decodeHeartbeatTest() { + byte[] decode = Base64.decode("AAMdAAEEKAAABCgQAyw8QAFWCG9ubGluZXVpZg9PblVzZXJIZWFydEJlYXR9AAED+QgAAQYEdFJlcR0AAQPrCgoMFiAwYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NyYANhp3ZWJoNSYyMzA5MjcxMTUyJndlYnNvY2tldEcAAAOKdnBsYXllcl9zYmFubmVyXzE3MjQ2OTFfMTcyNDY5MT0xOyBTb3VuZFZhbHVlPTAuNTA7IGFscGhhVmFsdWU9MC44MDsgZ2FtZV9kaWQ9UjI0SjJnMG1CenZkWEpmN2E5bmhlU2wzekljaTJCT3AwLXQ7IGlzSW5MaXZlUm9vbT10cnVlOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyBfX3lhbWlkX3R0MT0wLjgwMjk5MzUwNjUwMTEyNjk7IF9feWFtaWRfbmV3PUNBNzVENENENUMxMDAwMDExNjVCODJCNTIxNDBDOTAwOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyB1ZGJfZ3VpZGRhdGE9YWY1ZGJkYmY3NjI1NGE2ZThhMGEyOTNjY2FlOWI2ODg7IHVkYl9kZXZpY2VpZD13Xzc2MTYyMzQ4Mzg2MTgxNTI5NjsgdWRiX3Bhc3NkYXRhPTM7IF9feWFzbWlkPTAuODAyOTkzNTA2NTAxMTI2OTsgSG1fbHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0MDk0MjAsMTY5NjQxMTgwNiwxNjk2NDczNzYwLDE2OTY0NzY3NDU7IF95YXNpZHM9X19yb290c2lkJTNEQ0E3NjY5MjcwM0IwMDAwMTNGRkJCRkVBNjY4Nzk5RDA7IEhtX2xwdnRfNTE3MDBiNmM3MjJmNWJiNGNmMzk5MDZhNTk2ZWE0MWY9MTY5NjQ3Njg4MDsgaHV5YV91YT13ZWJoNSYwLjAuMSZhY3Rpdml0eTsgX3JlcF9jbnQ9Mzsgc2RpZD0wVW5IVWd2MC9xbWZENEtBS2x3emhxU1drU1d3a3RzZXhQSWNsTnQzUGJ3TVFha1dOTmZrMlc4KzFkNlFNZzVZYnU1bC9GcDRpaHRUTDdCd0Q2bTQ0MENHUUNkU0htZW1kOUNNLzVKRVZkanJXVmtuOUx0ZkZKdy9RbzRrZ0tyOE9aSERxTm51d2c2MTJzR3lmbEZuMWRrVWVaWVRUb0N6emw0R0NIcTdNVURhaHhHdVBSOG1VZGRmSW1GdGpjY3MxOyBodXlhX2ZsYXNoX3JlcF9jbnQ9NTc7IHJlcF9jbnQ9NDA7IGh1eWFfd2ViX3JlcF9jbnQ9MTY2XGYGY2hyb21lCxwsQgAaURNcYP98jJysC4yYDKgMLDYlYTgzMDdmMWM0YzRmNGVmMDphODMwN2YxYzRjNGY0ZWYwOjA6MExcZiAyYmZlZjAzNmEwMzBkOTgyN2ZjYmQwMmU5ZmM0NzY1OQ=="); + WupReq wupReq = new WupReq(); + wupReq.decode(decode); + UserHeartBeatReq userHeartBeatReq = new UserHeartBeatReq(); + userHeartBeatReq = wupReq.getUniAttribute().getByClass("tReq", userHeartBeatReq); + long lPid = userHeartBeatReq.getLPid(); + } + + @Test + void decodeRegisterGroupReq() { + byte[] decode = Base64.decode("ABAdAAAhCQACBgxsaXZlOjE3MjQ2OTEGDGNoYXQ6MTcyNDY5MRYAIAE2AExcZgA="); + WebSocketCommand webSocketCommand = new WebSocketCommand(HuyaCodecUtil.newUtf8TarsInputStream(decode)); + byte[] vData = webSocketCommand.getVData(); + WSRegisterGroupReq wsRegisterGroupReq = new WSRegisterGroupReq(); + wsRegisterGroupReq.readFrom(HuyaCodecUtil.newUtf8TarsInputStream(vData)); + List vGroupId = wsRegisterGroupReq.getVGroupId(); + } + + @Test + void decodeLiveLaunchReq() { + byte[] decode = Base64.decode("AAMdAAEEJAAABCQQAyw8QARWBmxpdmV1aWYIZG9MYXVuY2h9AAED/ggAAQYEdFJlcR0AAQPwCgoMFiAwYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NyYANhp3ZWJoNSYyMzA5MjcxMTUyJndlYnNvY2tldEcAAAOKdnBsYXllcl9zYmFubmVyXzE3MjQ2OTFfMTcyNDY5MT0xOyBTb3VuZFZhbHVlPTAuNTA7IGFscGhhVmFsdWU9MC44MDsgZ2FtZV9kaWQ9UjI0SjJnMG1CenZkWEpmN2E5bmhlU2wzekljaTJCT3AwLXQ7IGlzSW5MaXZlUm9vbT10cnVlOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyBfX3lhbWlkX3R0MT0wLjgwMjk5MzUwNjUwMTEyNjk7IF9feWFtaWRfbmV3PUNBNzVENENENUMxMDAwMDExNjVCODJCNTIxNDBDOTAwOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyB1ZGJfZ3VpZGRhdGE9YWY1ZGJkYmY3NjI1NGE2ZThhMGEyOTNjY2FlOWI2ODg7IHVkYl9kZXZpY2VpZD13Xzc2MTYyMzQ4Mzg2MTgxNTI5NjsgdWRiX3Bhc3NkYXRhPTM7IF9feWFzbWlkPTAuODAyOTkzNTA2NTAxMTI2OTsgSG1fbHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0MDk0MjAsMTY5NjQxMTgwNiwxNjk2NDczNzYwLDE2OTY0NzY3NDU7IF95YXNpZHM9X19yb290c2lkJTNEQ0E3NjY5MjcwM0IwMDAwMTNGRkJCRkVBNjY4Nzk5RDA7IEhtX2xwdnRfNTE3MDBiNmM3MjJmNWJiNGNmMzk5MDZhNTk2ZWE0MWY9MTY5NjQ3Njg4MDsgaHV5YV91YT13ZWJoNSYwLjAuMSZhY3Rpdml0eTsgX3JlcF9jbnQ9Mzsgc2RpZD0wVW5IVWd2MC9xbWZENEtBS2x3emhxU1drU1d3a3RzZXhQSWNsTnQzUGJ3TVFha1dOTmZrMlc4KzFkNlFNZzVZYnU1bC9GcDRpaHRUTDdCd0Q2bTQ0MENHUUNkU0htZW1kOUNNLzVKRVZkanJXVmtuOUx0ZkZKdy9RbzRrZ0tyOE9aSERxTm51d2c2MTJzR3lmbEZuMWRrVWVaWVRUb0N6emw0R0NIcTdNVURhaHhHdVBSOG1VZGRmSW1GdGpjY3MxOyBodXlhX2ZsYXNoX3JlcF9jbnQ9NTc7IHJlcF9jbnQ9NDA7IGh1eWFfd2ViX3JlcF9jbnQ9MTY2XGYGY2hyb21lCxoAAxwqFgAmADYARgBWAAsLIAELjJgMqAwsNiU5N2Q5NzQ4NTYyMzdiMWZiOjk3ZDk3NDg1NjIzN2IxZmI6MDowTFxmIGU2OTYzZjMwMTRmYzZlY2U2M2ExNmU3ZTlhMzMzOWVl"); + WupReq wupReq = new WupReq(); + wupReq.decode(decode); + LiveLaunchReq liveLaunchReq = new LiveLaunchReq(); + liveLaunchReq = wupReq.getUniAttribute().getByClass("tReq", liveLaunchReq); + UserId tId = liveLaunchReq.getTId(); + System.out.println(wupReq.getTarsServantRequest().getVersion()); + } + + @Test + void decodeLiveLaunchRsp() { + byte[] decode = Base64.decode("AAQdAAECXAAAAlwQAyw8QARWBmxpdmV1aWYIZG9MYXVuY2h9AAECNggAAgYAHQAAAQwGBHRSc3AdAAECIQoGIDBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3EmUeNXopAAUKAAEZAAQGETExMS4xOS4yMzkuMTExOjgwBhAxMTEuMTkuMjI1LjIzOjgwBhAxMTEuNjMuMTgwLjk4OjgwBhExMTEuNjMuMTgwLjEwMDo4MAsKAAUZAAQGFzZmMTNlZjZmLXdzLnZhLmh1eWEuY29tBhc2ZjEzZTExNy13cy52YS5odXlhLmNvbQYXNmYzZmI0NjItd3MudmEuaHV5YS5jb20GFzZmM2ZiNDY0LXdzLnZhLmh1eWEuY29tCwoABhkABAYRMTExLjE5LjIzOS4xMTE6ODAGEDExMS4xOS4yMjUuMjM6ODAGEDExMS42My4xODAuOTg6ODAGETExMS42My4xODAuMTAwOjgwCwoABxkABAYRMTExLjE5LjIzOS4xMTE6ODAGEDExMS4xOS4yMjUuMjM6ODAGEDExMS42My4xODAuOTg6ODAGETExMS42My4xODAuMTAwOjgwCwoACRkACAYOMTIwLjE5NS4xNTguNDYGDzExMy4xMDcuMjM2LjE5NQYMMTQuMTcuMTA5LjY2Bg8xMDMuMjI3LjEyMS4xMDAGDzExNS4yMzguMTg5LjIyNQYPMTgzLjIzMi4xMzYuMTMwBg4yMjEuMjI4Ljc5LjIyNQYMNjAuMjE3LjI1MC4xCzxGDTExMi40My45Mi4xMTgLjJgMqAwsNiU5N2Q5NzQ4NTYyMzdiMWZiOjk3ZDk3NDg1NjIzN2IxZmI6MDowTFxmAA=="); + WupRsp wupRsp = new WupRsp(); + wupRsp.decode(decode); + LiveLaunchRsp liveLaunchRsp = new LiveLaunchRsp(); + liveLaunchRsp = wupRsp.getUniAttribute().getByClass("tRsp", liveLaunchRsp); + int eAccess = liveLaunchRsp.getEAccess(); + } + + @Test + void decodeGetLivingInfoReq() { + byte[] decode = Base64.decode("AAMdAAEEKAAABCgQAyw8QAFWCmh1eWFsaXZldWlmDWdldExpdmluZ0luZm99AAED+QgAAQYEdFJlcR0AAQPrCgoMFiAwYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NyYANhp3ZWJoNSYyMzA5MjcxMTUyJndlYnNvY2tldEcAAAOKdnBsYXllcl9zYmFubmVyXzE3MjQ2OTFfMTcyNDY5MT0xOyBTb3VuZFZhbHVlPTAuNTA7IGFscGhhVmFsdWU9MC44MDsgZ2FtZV9kaWQ9UjI0SjJnMG1CenZkWEpmN2E5bmhlU2wzekljaTJCT3AwLXQ7IGlzSW5MaXZlUm9vbT10cnVlOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyBfX3lhbWlkX3R0MT0wLjgwMjk5MzUwNjUwMTEyNjk7IF9feWFtaWRfbmV3PUNBNzVENENENUMxMDAwMDExNjVCODJCNTIxNDBDOTAwOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyB1ZGJfZ3VpZGRhdGE9YWY1ZGJkYmY3NjI1NGE2ZThhMGEyOTNjY2FlOWI2ODg7IHVkYl9kZXZpY2VpZD13Xzc2MTYyMzQ4Mzg2MTgxNTI5NjsgdWRiX3Bhc3NkYXRhPTM7IF9feWFzbWlkPTAuODAyOTkzNTA2NTAxMTI2OTsgX3lhc2lkcz1fX3Jvb3RzaWQlM0RDQTc2NzA0NUMxMTAwMDAxRUM1QTE0NUMxRTkwRkUwMDsgSG1fbHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0NzM3NjAsMTY5NjQ3Njc0NSwxNjk2NDgzNTY1LDE2OTY0ODQyMTI7IEhtX2xwdnRfNTE3MDBiNmM3MjJmNWJiNGNmMzk5MDZhNTk2ZWE0MWY9MTY5NjQ4NDIxMjsgaHV5YV91YT13ZWJoNSYwLjAuMSZhY3Rpdml0eTsgX3JlcF9jbnQ9Mjsgc2RpZD0wVW5IVWd2MC9xbWZENEtBS2x3emhxWDk4UXJuUENjY2s2Zk40OTRpYXdTNUtteW1ncmV1ODlvN2dZdGEvUXZRc0JEZVNlU1JwNC9nclE1ZkV1RkFZckw1OWNvQUt1eHV1a2l3Z1RMamZqRURXVmtuOUx0ZkZKdy9RbzRrZ0tyOE9aSERxTm51d2c2MTJzR3lmbEZuMWRrVWVaWVRUb0N6emw0R0NIcTdNVURhaHhHdVBSOG1VZGRmSW1GdGpjY3MxOyBodXlhX2ZsYXNoX3JlcF9jbnQ9NzQ7IGh1eWFfd2ViX3JlcF9jbnQ9MTI1OyByZXBfY250PTQ0XGYGY2hyb21lCxwsMgAaURNGAFYAbHyMC4yYDKgMLDYlZTcxMDQ2OTExYzk2N2JjNDplNzEwNDY5MTFjOTY3YmM0OjA6MExcZiBjNTRlM2NkYmIyNGJjYzcyYmU1MjU5NTY4ZGVmY2Q1Ng=="); + WupReq wupReq = new WupReq(); + wupReq.decode(decode); + GetLivingInfoReq getLivingInfoReq = new GetLivingInfoReq(); + getLivingInfoReq = wupReq.getUniAttribute().getByClass("tReq", getLivingInfoReq); + + byte[] decode2 = Base64.decode("AAAEJxwsPEABVgpodXlhbGl2ZXVpZg1nZXRMaXZpbmdJbmZvfQABA/kIAAEGBHRSZXEdAAED6woKDBYgMGE3ZGNhNzJhM2NlMWI2NTQwMDFkZDJhZGUyYWU4NTcmADYad2ViaDUmMjMwOTI3MTE1MiZ3ZWJzb2NrZXRHAAADinZwbGF5ZXJfc2Jhbm5lcl8xNzI0NjkxXzE3MjQ2OTE9MTsgU291bmRWYWx1ZT0wLjUwOyBhbHBoYVZhbHVlPTAuODA7IGdhbWVfZGlkPVIyNEoyZzBtQnp2ZFhKZjdhOW5oZVNsM3pJY2kyQk9wMC10OyBpc0luTGl2ZVJvb209dHJ1ZTsgZ3VpZD0wYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NzsgX195YW1pZF90dDE9MC44MDI5OTM1MDY1MDExMjY5OyBfX3lhbWlkX25ldz1DQTc1RDRDRDVDMTAwMDAxMTY1QjgyQjUyMTQwQzkwMDsgZ3VpZD0wYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NzsgdWRiX2d1aWRkYXRhPWFmNWRiZGJmNzYyNTRhNmU4YTBhMjkzY2NhZTliNjg4OyB1ZGJfZGV2aWNlaWQ9d183NjE2MjM0ODM4NjE4MTUyOTY7IHVkYl9wYXNzZGF0YT0zOyBfX3lhc21pZD0wLjgwMjk5MzUwNjUwMTEyNjk7IF95YXNpZHM9X19yb290c2lkJTNEQ0E3NjcwNDVDMTEwMDAwMUVDNUExNDVDMUU5MEZFMDA7IEhtX2x2dF81MTcwMGI2YzcyMmY1YmI0Y2YzOTkwNmE1OTZlYTQxZj0xNjk2NDczNzYwLDE2OTY0NzY3NDUsMTY5NjQ4MzU2NSwxNjk2NDg0MjEyOyBIbV9scHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0ODQyMTI7IGh1eWFfdWE9d2ViaDUmMC4wLjEmYWN0aXZpdHk7IF9yZXBfY250PTI7IHNkaWQ9MFVuSFVndjAvcW1mRDRLQUtsd3pocVg5OFFyblBDY2NrNmZONDk0aWF3UzVLbXltZ3JldTg5bzdnWXRhL1F2UXNCRGVTZVNScDQvZ3JRNWZFdUZBWXJMNTljb0FLdXh1dWtpd2dUTGpmakVEV1ZrbjlMdGZGSncvUW80a2dLcjhPWkhEcU5udXdnNjEyc0d5ZmxGbjFka1VlWllUVG9DenpsNEdDSHE3TVVEYWh4R3VQUjhtVWRkZkltRnRqY2NzMTsgaHV5YV9mbGFzaF9yZXBfY250PTc0OyBodXlhX3dlYl9yZXBfY250PTEyNTsgcmVwX2NudD00NFxmBmNocm9tZQscLDIAGlETRgBWAGx8jAuMmAyoDA=="); + WupReq wupReq2 = new WupReq(); + wupReq2.decode(decode2); + GetLivingInfoReq getLivingInfoReq2 = new GetLivingInfoReq(); + getLivingInfoReq2 = wupReq2.getUniAttribute().getByClass("tReq", getLivingInfoReq2); + + UserId tId = getLivingInfoReq.getTId(); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/pom.xml b/live-chat-client-codec/live-chat-client-codec-kuaishou/pom.xml new file mode 100644 index 0000000..467afb6 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/pom.xml @@ -0,0 +1,50 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client-codec + 0.7.0 + + jar + + live-chat-client-codec-kuaishou + live-chat-client-codec-kuaishou + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-commons-base + + + tech.ordinaryroad + live-chat-client-commons-util + + + + io.netty + netty-codec + + + + com.google.protobuf + protobuf-java + + + + ch.qos.logback + logback-classic + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/api/KuaishouApis.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/api/KuaishouApis.java new file mode 100644 index 0000000..7bdeca8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/api/KuaishouApis.java @@ -0,0 +1,301 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.api; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.URLUtil; +import cn.hutool.http.*; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ArrayNode; +import lombok.*; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatHttpUtil; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; + +/** + * @author mjz + * @date 2024/1/5 + */ +public class KuaishouApis { + + /** + * 接口返回结果缓存 + * {@link #KEY_RESULT_CACHE_GIFT_ITEMS}:所有礼物信息 + */ + public static final TimedCache> RESULT_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1)); + public static final String KEY_RESULT_CACHE_GIFT_ITEMS = "GIFT_ITEMS"; + public static final String PATTERN_LIVE_STREAM_ID = "\"liveStream\":\\{\"id\":\"([\\w\\d-_]+)\""; + public static final String USER_AGENT = GlobalHeaders.INSTANCE.header(Header.USER_AGENT).replace("Hutool", ""); + /** + * 礼物连击缓存 + */ + private static final TimedCache WEB_GIFT_FEED_CACHE = new TimedCache<>(300 * 1000L, new ConcurrentHashMap<>()); + + public static RoomInitResult roomInit(Object roomId, String cookie) { + @Cleanup + HttpResponse response = createGetRequest("https://live.kuaishou.com/u/" + roomId, cookie) + .execute(); + + if (StrUtil.isBlank(cookie)) { + cookie = OrLiveChatCookieUtil.toString(response.getCookies()); + } + + String body = response.body(); + String liveStreamId = ReUtil.getGroup1(PATTERN_LIVE_STREAM_ID, body); + JsonNode websocketinfo = websocketinfo(roomId, liveStreamId, cookie); + if (!websocketinfo.has("token")) { + throwExceptionWithTip("主播未开播,token获取失败 " + websocketinfo); + } + ArrayNode websocketUrls = websocketinfo.withArray("websocketUrls"); + ArrayList websocketUrlList = CollUtil.newArrayList(); + for (JsonNode websocketUrl : websocketUrls) { + websocketUrlList.add(websocketUrl.asText()); + } + return RoomInitResult.builder() + .token(websocketinfo.required("token").asText()) + .websocketUrls(websocketUrlList) + .liveStreamId(liveStreamId) + .build(); + } + + public static RoomInitResult roomInit(Object roomId) { + return roomInit(roomId, null); + } + + public static JsonNode websocketinfo(Object roomId, String liveStreamId, String cookie) { + if (StrUtil.isBlank(liveStreamId)) { + throwExceptionWithTip("主播未开播,liveStreamId为空"); + } + @Cleanup + HttpResponse response = createGetRequest("https://live.kuaishou.com/live_api/liveroom/websocketinfo?liveStreamId=" + liveStreamId, cookie) + .header(Header.REFERER, "https://live.kuaishou.com/u/" + roomId) + .execute(); + return responseInterceptor(response.body()); + } + + public static Map allgifts() { + Map map = new HashMap<>(); + @Cleanup + HttpResponse response = createGetRequest("https://live.kuaishou.com/live_api/emoji/allgifts", null).execute(); + JsonNode jsonNode = responseInterceptor(response.body()); + jsonNode.fields().forEachRemaining(stringJsonNodeEntry -> map.put(stringJsonNodeEntry.getKey(), OrJacksonUtil.getInstance().convertValue(stringJsonNodeEntry.getValue(), GiftInfo.class))); + return map; + } + + /** + * 根据礼物ID获取礼物信息 + * + * @param id 礼物ID + * @return 礼物信息 + */ + public static GiftInfo getGiftInfoById(String id) { + if (!RESULT_CACHE.containsKey(KEY_RESULT_CACHE_GIFT_ITEMS)) { + RESULT_CACHE.put(KEY_RESULT_CACHE_GIFT_ITEMS, allgifts()); + } + return RESULT_CACHE.get(KEY_RESULT_CACHE_GIFT_ITEMS).get(id); + } + + @SneakyThrows + public static JsonNode sendComment(String cookie, Object roomId, SendCommentRequest request) { + @Cleanup + HttpResponse response = createPostRequest("https://live.kuaishou.com/live_api/liveroom/sendComment", cookie) + .body(OrJacksonUtil.getInstance().writeValueAsString(request), ContentType.JSON.getValue()) + .header(Header.REFERER, "https://live.kuaishou.com/u/" + roomId) + .execute(); + return responseInterceptor(response.body()); + } + + @SneakyThrows + public static JsonNode clickLike(String cookie, Object roomId, String liveStreamId, int count) { + @Cleanup + HttpResponse response = createPostRequest("https://live.kuaishou.com/live_api/liveroom/like", cookie) + .body(OrJacksonUtil.getInstance().createObjectNode() + .put("liveStreamId", liveStreamId) + .put("count", count) + .toString(), ContentType.JSON.getValue() + ) + .header(Header.ORIGIN, "https://live.kuaishou.com") + .header(Header.REFERER, "https://live.kuaishou.com/u/" + roomId) + .execute(); + return responseInterceptor(response.body()); + } + + public static HttpRequest createRequest(Method method, String url, String cookie) { + return OrLiveChatHttpUtil.createRequest(method, url) + .cookie(cookie) + .header(Header.HOST, URLUtil.url(url).getHost()) + .header(Header.USER_AGENT, USER_AGENT); + } + + public static HttpRequest createGetRequest(String url, String cookie) { + return createRequest(Method.GET, url, cookie); + } + + public static HttpRequest createPostRequest(String url, String cookie) { + return createRequest(Method.POST, url, cookie); + } + + private static JsonNode responseInterceptor(String responseString) { + try { + JsonNode jsonNode = OrJacksonUtil.getInstance().readTree(responseString); + JsonNode data = jsonNode.required("data"); + if (data.has("result")) { + int result = data.get("result").asInt(); + if (result != 1) { + String message = ""; + switch (result) { + case 2: { + message = "请求过快,请稍后重试"; + break; + } + case 400002: { + message = "需要进行验证"; + break; + } + default: { + message = ""; + } + } + throwExceptionWithTip("接口访问失败:" + message + ",返回结果:" + jsonNode); + } + } + return data; + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + + private static void throwExceptionWithTip(String message) { + throw new BaseException("『可能已触发滑块验证,建议配置Cookie或打开浏览器进行滑块验证后重试』" + message); + } + + /** + * 计算快手直播间收到礼物的个数 + * + * @param msg KuaishouGiftMsg + * @return 礼物个数 + */ + public static int calculateGiftCount(KuaishouGiftMsg msg) { + if (msg == null || msg.getMsg() == null) { + return 0; + } + + int giftCount; + WebGiftFeedOuterClass.WebGiftFeed webGiftFeed = msg.getMsg(); + String mergeKey = webGiftFeed.getMergeKey(); + if (WEB_GIFT_FEED_CACHE.containsKey(mergeKey)) { + WebGiftFeedOuterClass.WebGiftFeed webGiftFeedByMergeKey = WEB_GIFT_FEED_CACHE.get(mergeKey); + int comboCountByMergeKey = webGiftFeedByMergeKey.getComboCount(); + giftCount = webGiftFeed.getComboCount() - comboCountByMergeKey; + } else { + int batchSize = webGiftFeed.getBatchSize(); + int comboCount = webGiftFeed.getComboCount(); + if (comboCount == 1) { + giftCount = batchSize; + } else { + giftCount = comboCount; + } + } + WEB_GIFT_FEED_CACHE.put(mergeKey, webGiftFeed); + + msg.setCalculatedGiftCount(giftCount); + return giftCount; + } + + /** + * 获取粉丝牌名称 + */ + public static String getBadgeName(LiveAudienceStateOuterClass.LiveAudienceState liveAudienceState) { + String badgeName = null; + try { + for (LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 liveAudienceState11 : liveAudienceState.getLiveAudienceState11List()) { + String badgeIcon = liveAudienceState11.getLiveAudienceState111().getBadgeIcon(); + if (StrUtil.startWithIgnoreCase(badgeIcon, "fans")) { + badgeName = liveAudienceState11.getLiveAudienceState111().getBadgeName(); + break; + } + } + } catch (Exception e) { + // ignore + } + return badgeName; + } + + /** + * 获取粉丝牌等级 + */ + public static byte getBadgeLevel(LiveAudienceStateOuterClass.LiveAudienceState liveAudienceState) { + byte badgeLevel = 0; + try { + badgeLevel = (byte) liveAudienceState.getLiveFansGroupState().getIntimacyLevel(); + } catch (Exception e) { + // ignore + } + return badgeLevel; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class SendCommentRequest { + private String liveStreamId; + private String content; + private String color; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class RoomInitResult { + private String token; + private String liveStreamId; + private List websocketUrls; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + public static class GiftInfo { + private String giftName; + private String giftUrl; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouCmdMsg.java new file mode 100644 index 0000000..76090dc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouCmdMsg.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass; + +/** + * @author mjz + * @date 2024/4/26 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouCmdMsg implements IKuaishouCmdMsg { + + private SocketMessageOuterClass.SocketMessage msg; + + @Override + public String getCmd() { + if (msg == null) { + return null; + } + return msg.getPayloadType().name(); + } + + @Override + public void setCmd(String cmd) { + // ignore + } + + @Override + public PayloadTypeOuterClass.PayloadType getCmdEnum() { + if (msg == null) { + return null; + } + return msg.getPayloadType(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouDanmuMsg.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouDanmuMsg.java new file mode 100644 index 0000000..457efc3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouDanmuMsg.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouDanmuMsg implements IKuaishouMsg, IDanmuMsg { + + private WebCommentFeedOuterClass.WebCommentFeed msg; + + @Override + public String getBadgeName() { + return KuaishouApis.getBadgeName(msg.getSenderState()); + } + + @Override + public byte getBadgeLevel() { + return KuaishouApis.getBadgeLevel(msg.getSenderState()); + } + + @Override + public String getUid() { + return msg.getUser().getPrincipalId(); + } + + @Override + public String getUsername() { + return msg.getUser().getUserName(); + } + + @Override + public String getUserAvatar() { + return msg.getUser().getHeadUrl(); + } + + @Override + public String getContent() { + return msg.getContent(); + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouGiftMsg.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouGiftMsg.java new file mode 100644 index 0000000..b3a12dd --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouGiftMsg.java @@ -0,0 +1,120 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouGiftMsg implements IKuaishouMsg, IGiftMsg { + + private WebGiftFeedOuterClass.WebGiftFeed msg; + /** + * 计算后得到的礼物个数 + */ + private int calculatedGiftCount; + + public KuaishouGiftMsg(WebGiftFeedOuterClass.WebGiftFeed msg) { + this.msg = msg; + } + + @Override + public String getBadgeName() { + return KuaishouApis.getBadgeName(msg.getLiveAudienceState()); + } + + @Override + public byte getBadgeLevel() { + return KuaishouApis.getBadgeLevel(msg.getLiveAudienceState()); + } + + @Override + public String getUid() { + return msg.getUser().getPrincipalId(); + } + + @Override + public String getUsername() { + return msg.getUser().getUserName(); + } + + @Override + public String getUserAvatar() { + return msg.getUser().getHeadUrl(); + } + + @Override + public String getGiftName() { + return KuaishouApis.getGiftInfoById(this.getGiftId()).getGiftName(); + } + + @Override + public String getGiftImg() { + return KuaishouApis.getGiftInfoById(this.getGiftId()).getGiftUrl(); + } + + @Override + public String getGiftId() { + return Integer.toString(msg.getIntGiftId()); + } + + @Override + public int getGiftCount() { + return this.calculatedGiftCount; + } + + @Override + public int getGiftPrice() { + return 0; + } + + @Override + public String getReceiveUid() { + return null; + } + + @Override + public String getReceiveUsername() { + return null; + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouLikeMsg.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouLikeMsg.java new file mode 100644 index 0000000..9746dd3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouLikeMsg.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILikeMsg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouLikeMsg implements IKuaishouMsg, ILikeMsg { + + private WebLikeFeedOuterClass.WebLikeFeed msg; + + @Override + public String getBadgeName() { + return KuaishouApis.getBadgeName(msg.getLiveAudienceState()); + } + + @Override + public byte getBadgeLevel() { + return KuaishouApis.getBadgeLevel(msg.getLiveAudienceState()); + } + + @Override + public String getUid() { + return msg.getUser().getPrincipalId(); + } + + @Override + public String getUsername() { + return msg.getUser().getUserName(); + } + + @Override + public String getUserAvatar() { + return msg.getUser().getHeadUrl(); + } + + @Override + public String toString() { + return msg.toString(); + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouRoomStatsMsg.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouRoomStatsMsg.java new file mode 100644 index 0000000..491884e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/KuaishouRoomStatsMsg.java @@ -0,0 +1,56 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IRoomStatsMsg; + +/** + * @author mjz + * @date 2024/4/25 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouRoomStatsMsg implements IKuaishouMsg, IRoomStatsMsg { + + private String likedCount; + private String watchingCount; + + @Override + public String getLikedCount() { + return this.likedCount; + } + + @Override + public String getWatchingCount() { + return this.watchingCount; + } +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/base/IKuaishouCmdMsg.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/base/IKuaishouCmdMsg.java new file mode 100644 index 0000000..9eea165 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/base/IKuaishouCmdMsg.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base; + +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouCmdMsg extends IKuaishouMsg, ICmdMsg { +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/base/IKuaishouMsg.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/base/IKuaishouMsg.java new file mode 100644 index 0000000..9b2657b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/msg/base/IKuaishouMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouMsg extends IMsg { +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/AuditAudienceMaskOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/AuditAudienceMaskOuterClass.java new file mode 100644 index 0000000..6c2363a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/AuditAudienceMaskOuterClass.java @@ -0,0 +1,1156 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: AuditAudienceMask.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class AuditAudienceMaskOuterClass { + private AuditAudienceMaskOuterClass() {} + 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 AuditAudienceMaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:AuditAudienceMask) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + java.util.List + getIconCdnNodeViewList(); + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getIconCdnNodeView(int index); + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + int getIconCdnNodeViewCount(); + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + java.util.List + getIconCdnNodeViewOrBuilderList(); + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder getIconCdnNodeViewOrBuilder( + int index); + + /** + * string title = 2; + * @return The title. + */ + java.lang.String getTitle(); + /** + * string title = 2; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * string detail = 3; + * @return The detail. + */ + java.lang.String getDetail(); + /** + * string detail = 3; + * @return The bytes for detail. + */ + com.google.protobuf.ByteString + getDetailBytes(); + } + /** + * Protobuf type {@code AuditAudienceMask} + */ + public static final class AuditAudienceMask extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:AuditAudienceMask) + AuditAudienceMaskOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuditAudienceMask.newBuilder() to construct. + private AuditAudienceMask(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuditAudienceMask() { + iconCdnNodeView_ = java.util.Collections.emptyList(); + title_ = ""; + detail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuditAudienceMask(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder.class); + } + + public static final int ICONCDNNODEVIEW_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List iconCdnNodeView_; + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + @java.lang.Override + public java.util.List getIconCdnNodeViewList() { + return iconCdnNodeView_; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + @java.lang.Override + public java.util.List + getIconCdnNodeViewOrBuilderList() { + return iconCdnNodeView_; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + @java.lang.Override + public int getIconCdnNodeViewCount() { + return iconCdnNodeView_.size(); + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getIconCdnNodeView(int index) { + return iconCdnNodeView_.get(index); + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder getIconCdnNodeViewOrBuilder( + int index) { + return iconCdnNodeView_.get(index); + } + + public static final int TITLE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * string title = 2; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * string title = 2; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETAIL_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object detail_ = ""; + /** + * string detail = 3; + * @return The detail. + */ + @java.lang.Override + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } + } + /** + * string detail = 3; + * @return The bytes for detail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < iconCdnNodeView_.size(); i++) { + output.writeMessage(1, iconCdnNodeView_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, detail_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < iconCdnNodeView_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, iconCdnNodeView_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, detail_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask) obj; + + if (!getIconCdnNodeViewList() + .equals(other.getIconCdnNodeViewList())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDetail() + .equals(other.getDetail())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIconCdnNodeViewCount() > 0) { + hash = (37 * hash) + ICONCDNNODEVIEW_FIELD_NUMBER; + hash = (53 * hash) + getIconCdnNodeViewList().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDetail().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 AuditAudienceMask} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:AuditAudienceMask) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (iconCdnNodeViewBuilder_ == null) { + iconCdnNodeView_ = java.util.Collections.emptyList(); + } else { + iconCdnNodeView_ = null; + iconCdnNodeViewBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + title_ = ""; + detail_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result) { + if (iconCdnNodeViewBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + iconCdnNodeView_ = java.util.Collections.unmodifiableList(iconCdnNodeView_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.iconCdnNodeView_ = iconCdnNodeView_; + } else { + result.iconCdnNodeView_ = iconCdnNodeViewBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.detail_ = detail_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance()) return this; + if (iconCdnNodeViewBuilder_ == null) { + if (!other.iconCdnNodeView_.isEmpty()) { + if (iconCdnNodeView_.isEmpty()) { + iconCdnNodeView_ = other.iconCdnNodeView_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.addAll(other.iconCdnNodeView_); + } + onChanged(); + } + } else { + if (!other.iconCdnNodeView_.isEmpty()) { + if (iconCdnNodeViewBuilder_.isEmpty()) { + iconCdnNodeViewBuilder_.dispose(); + iconCdnNodeViewBuilder_ = null; + iconCdnNodeView_ = other.iconCdnNodeView_; + bitField0_ = (bitField0_ & ~0x00000001); + iconCdnNodeViewBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIconCdnNodeViewFieldBuilder() : null; + } else { + iconCdnNodeViewBuilder_.addAllMessages(other.iconCdnNodeView_); + } + } + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.parser(), + extensionRegistry); + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(m); + } else { + iconCdnNodeViewBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + detail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List iconCdnNodeView_ = + java.util.Collections.emptyList(); + private void ensureIconCdnNodeViewIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + iconCdnNodeView_ = new java.util.ArrayList(iconCdnNodeView_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder> iconCdnNodeViewBuilder_; + + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public java.util.List getIconCdnNodeViewList() { + if (iconCdnNodeViewBuilder_ == null) { + return java.util.Collections.unmodifiableList(iconCdnNodeView_); + } else { + return iconCdnNodeViewBuilder_.getMessageList(); + } + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public int getIconCdnNodeViewCount() { + if (iconCdnNodeViewBuilder_ == null) { + return iconCdnNodeView_.size(); + } else { + return iconCdnNodeViewBuilder_.getCount(); + } + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getIconCdnNodeView(int index) { + if (iconCdnNodeViewBuilder_ == null) { + return iconCdnNodeView_.get(index); + } else { + return iconCdnNodeViewBuilder_.getMessage(index); + } + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder setIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView value) { + if (iconCdnNodeViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.set(index, value); + onChanged(); + } else { + iconCdnNodeViewBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder setIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder builderForValue) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.set(index, builderForValue.build()); + onChanged(); + } else { + iconCdnNodeViewBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder addIconCdnNodeView(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView value) { + if (iconCdnNodeViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(value); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder addIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView value) { + if (iconCdnNodeViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(index, value); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder addIconCdnNodeView( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder builderForValue) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(builderForValue.build()); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder addIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder builderForValue) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(index, builderForValue.build()); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder addAllIconCdnNodeView( + java.lang.Iterable values) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, iconCdnNodeView_); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder clearIconCdnNodeView() { + if (iconCdnNodeViewBuilder_ == null) { + iconCdnNodeView_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + iconCdnNodeViewBuilder_.clear(); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public Builder removeIconCdnNodeView(int index) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.remove(index); + onChanged(); + } else { + iconCdnNodeViewBuilder_.remove(index); + } + return this; + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder getIconCdnNodeViewBuilder( + int index) { + return getIconCdnNodeViewFieldBuilder().getBuilder(index); + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder getIconCdnNodeViewOrBuilder( + int index) { + if (iconCdnNodeViewBuilder_ == null) { + return iconCdnNodeView_.get(index); } else { + return iconCdnNodeViewBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public java.util.List + getIconCdnNodeViewOrBuilderList() { + if (iconCdnNodeViewBuilder_ != null) { + return iconCdnNodeViewBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(iconCdnNodeView_); + } + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder addIconCdnNodeViewBuilder() { + return getIconCdnNodeViewFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance()); + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder addIconCdnNodeViewBuilder( + int index) { + return getIconCdnNodeViewFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance()); + } + /** + * repeated .LiveCdnNodeView iconCdnNodeView = 1; + */ + public java.util.List + getIconCdnNodeViewBuilderList() { + return getIconCdnNodeViewFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder> + getIconCdnNodeViewFieldBuilder() { + if (iconCdnNodeViewBuilder_ == null) { + iconCdnNodeViewBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder>( + iconCdnNodeView_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + iconCdnNodeView_ = null; + } + return iconCdnNodeViewBuilder_; + } + + private java.lang.Object title_ = ""; + /** + * string title = 2; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string title = 2; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string title = 2; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string title = 2; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string title = 2; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object detail_ = ""; + /** + * string detail = 3; + * @return The detail. + */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string detail = 3; + * @return The bytes for detail. + */ + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string detail = 3; + * @param value The detail to set. + * @return This builder for chaining. + */ + public Builder setDetail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + detail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string detail = 3; + * @return This builder for chaining. + */ + public Builder clearDetail() { + detail_ = getDefaultInstance().getDetail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string detail = 3; + * @param value The bytes for detail to set. + * @return This builder for chaining. + */ + public Builder setDetailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + detail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:AuditAudienceMask) + } + + // @@protoc_insertion_point(class_scope:AuditAudienceMask) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuditAudienceMask parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_AuditAudienceMask_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_AuditAudienceMask_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\027AuditAudienceMask.proto\032\025LiveCdnNodeVi" + + "ew.proto\"]\n\021AuditAudienceMask\022)\n\017iconCdn" + + "NodeView\030\001 \003(\0132\020.LiveCdnNodeView\022\r\n\005titl" + + "e\030\002 \001(\t\022\016\n\006detail\030\003 \001(\tB<\n:tech.ordinary" + + "road.live.chat.client.codec.kuaishou.pro" + + "tobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.getDescriptor(), + }); + internal_static_AuditAudienceMask_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_AuditAudienceMask_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_AuditAudienceMask_descriptor, + new java.lang.String[] { "IconCdnNodeView", "Title", "Detail", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSErrorOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSErrorOuterClass.java new file mode 100644 index 0000000..47ec94e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSErrorOuterClass.java @@ -0,0 +1,549 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSError.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSErrorOuterClass { + private CSErrorOuterClass() {} + 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 CSErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSError) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 code = 1; + * @return The code. + */ + int getCode(); + } + /** + * Protobuf type {@code CSError} + */ + public static final class CSError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSError) + CSErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSError.newBuilder() to construct. + private CSError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSError() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSError) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * uint32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSError) + } + + // @@protoc_insertion_point(class_scope:CSError) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSErrorOuterClass.CSError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSError_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\rCSError.proto\"\027\n\007CSError\022\014\n\004code\030\001 \001(\r" + + "B<\n:tech.ordinaryroad.live.chat.client.c" + + "odec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSError_descriptor, + new java.lang.String[] { "Code", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSHeartbeatOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSHeartbeatOuterClass.java new file mode 100644 index 0000000..3f3feb6 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSHeartbeatOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSHeartbeat.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSHeartbeatOuterClass { + private CSHeartbeatOuterClass() {} + 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 CSHeartbeatOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSHeartbeat) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + long getTimestamp(); + } + /** + * Protobuf type {@code CSHeartbeat} + */ + public static final class CSHeartbeat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSHeartbeat) + CSHeartbeatOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSHeartbeat.newBuilder() to construct. + private CSHeartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSHeartbeat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSHeartbeat(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSHeartbeat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSHeartbeat) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * uint64 timestamp = 1; + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSHeartbeat) + } + + // @@protoc_insertion_point(class_scope:CSHeartbeat) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSHeartbeat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSHeartbeat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSHeartbeat_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\021CSHeartbeat.proto\" \n\013CSHeartbeat\022\021\n\tti" + + "mestamp\030\001 \001(\004B<\n:tech.ordinaryroad.live." + + "chat.client.codec.kuaishou.protobufb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSHeartbeat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSHeartbeat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSHeartbeat_descriptor, + new java.lang.String[] { "Timestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSPingOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSPingOuterClass.java new file mode 100644 index 0000000..0ec4aef --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSPingOuterClass.java @@ -0,0 +1,1030 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSPing.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSPingOuterClass { + private CSPingOuterClass() {} + 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 CSPingOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSPing) + com.google.protobuf.MessageOrBuilder { + + /** + * string echoData = 1; + * @return The echoData. + */ + java.lang.String getEchoData(); + /** + * string echoData = 1; + * @return The bytes for echoData. + */ + com.google.protobuf.ByteString + getEchoDataBytes(); + + /** + * .ClientId clientId = 2; + * @return The enum numeric value on the wire for clientId. + */ + int getClientIdValue(); + /** + * .ClientId clientId = 2; + * @return The clientId. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId getClientId(); + + /** + * string deviceId = 3; + * @return The deviceId. + */ + java.lang.String getDeviceId(); + /** + * string deviceId = 3; + * @return The bytes for deviceId. + */ + com.google.protobuf.ByteString + getDeviceIdBytes(); + + /** + * string appVer = 4; + * @return The appVer. + */ + java.lang.String getAppVer(); + /** + * string appVer = 4; + * @return The bytes for appVer. + */ + com.google.protobuf.ByteString + getAppVerBytes(); + } + /** + * Protobuf type {@code CSPing} + */ + public static final class CSPing extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSPing) + CSPingOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSPing.newBuilder() to construct. + private CSPing(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSPing() { + echoData_ = ""; + clientId_ = 0; + deviceId_ = ""; + appVer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSPing(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing.Builder.class); + } + + public static final int ECHODATA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object echoData_ = ""; + /** + * string echoData = 1; + * @return The echoData. + */ + @java.lang.Override + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } + } + /** + * string echoData = 1; + * @return The bytes for echoData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENTID_FIELD_NUMBER = 2; + private int clientId_ = 0; + /** + * .ClientId clientId = 2; + * @return The enum numeric value on the wire for clientId. + */ + @java.lang.Override public int getClientIdValue() { + return clientId_; + } + /** + * .ClientId clientId = 2; + * @return The clientId. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId getClientId() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId.forNumber(clientId_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId.UNRECOGNIZED : result; + } + + public static final int DEVICEID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceId_ = ""; + /** + * string deviceId = 3; + * @return The deviceId. + */ + @java.lang.Override + 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 deviceId = 3; + * @return The bytes for deviceId. + */ + @java.lang.Override + 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 APPVER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object appVer_ = ""; + /** + * string appVer = 4; + * @return The appVer. + */ + @java.lang.Override + public java.lang.String getAppVer() { + java.lang.Object ref = appVer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appVer_ = s; + return s; + } + } + /** + * string appVer = 4; + * @return The bytes for appVer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAppVerBytes() { + java.lang.Object ref = appVer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, echoData_); + } + if (clientId_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId.NONE.getNumber()) { + output.writeEnum(2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appVer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, appVer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, echoData_); + } + if (clientId_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId.NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appVer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, appVer_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing) obj; + + if (!getEchoData() + .equals(other.getEchoData())) return false; + if (clientId_ != other.clientId_) return false; + if (!getDeviceId() + .equals(other.getDeviceId())) return false; + if (!getAppVer() + .equals(other.getAppVer())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ECHODATA_FIELD_NUMBER; + hash = (53 * hash) + getEchoData().hashCode(); + hash = (37 * hash) + CLIENTID_FIELD_NUMBER; + hash = (53 * hash) + clientId_; + hash = (37 * hash) + DEVICEID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + hash = (37 * hash) + APPVER_FIELD_NUMBER; + hash = (53 * hash) + getAppVer().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSPing} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSPing) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + echoData_ = ""; + clientId_ = 0; + deviceId_ = ""; + appVer_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.echoData_ = echoData_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceId_ = deviceId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.appVer_ = appVer_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing.getDefaultInstance()) return this; + if (!other.getEchoData().isEmpty()) { + echoData_ = other.echoData_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.clientId_ != 0) { + setClientIdValue(other.getClientIdValue()); + } + if (!other.getDeviceId().isEmpty()) { + deviceId_ = other.deviceId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAppVer().isEmpty()) { + appVer_ = other.appVer_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + echoData_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + clientId_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + deviceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + appVer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object echoData_ = ""; + /** + * string echoData = 1; + * @return The echoData. + */ + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string echoData = 1; + * @return The bytes for echoData. + */ + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string echoData = 1; + * @param value The echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoData( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string echoData = 1; + * @return This builder for chaining. + */ + public Builder clearEchoData() { + echoData_ = getDefaultInstance().getEchoData(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string echoData = 1; + * @param value The bytes for echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int clientId_ = 0; + /** + * .ClientId clientId = 2; + * @return The enum numeric value on the wire for clientId. + */ + @java.lang.Override public int getClientIdValue() { + return clientId_; + } + /** + * .ClientId clientId = 2; + * @param value The enum numeric value on the wire for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdValue(int value) { + clientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .ClientId clientId = 2; + * @return The clientId. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId getClientId() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId.forNumber(clientId_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId.UNRECOGNIZED : result; + } + /** + * .ClientId clientId = 2; + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.ClientId value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + clientId_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .ClientId clientId = 2; + * @return This builder for chaining. + */ + public Builder clearClientId() { + bitField0_ = (bitField0_ & ~0x00000002); + clientId_ = 0; + onChanged(); + return this; + } + + private java.lang.Object deviceId_ = ""; + /** + * string deviceId = 3; + * @return The deviceId. + */ + 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 deviceId = 3; + * @return The bytes for deviceId. + */ + 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 deviceId = 3; + * @param value The deviceId to set. + * @return This builder for chaining. + */ + public Builder setDeviceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string deviceId = 3; + * @return This builder for chaining. + */ + public Builder clearDeviceId() { + deviceId_ = getDefaultInstance().getDeviceId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string deviceId = 3; + * @param value The bytes for deviceId to set. + * @return This builder for chaining. + */ + public Builder setDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object appVer_ = ""; + /** + * string appVer = 4; + * @return The appVer. + */ + public java.lang.String getAppVer() { + java.lang.Object ref = appVer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appVer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string appVer = 4; + * @return The bytes for appVer. + */ + public com.google.protobuf.ByteString + getAppVerBytes() { + java.lang.Object ref = appVer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string appVer = 4; + * @param value The appVer to set. + * @return This builder for chaining. + */ + public Builder setAppVer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + appVer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string appVer = 4; + * @return This builder for chaining. + */ + public Builder clearAppVer() { + appVer_ = getDefaultInstance().getAppVer(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string appVer = 4; + * @param value The bytes for appVer to set. + * @return This builder for chaining. + */ + public Builder setAppVerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + appVer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSPing) + } + + // @@protoc_insertion_point(class_scope:CSPing) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSPing parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSPingOuterClass.CSPing getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSPing_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSPing_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\014CSPing.proto\032\016ClientId.proto\"Y\n\006CSPing" + + "\022\020\n\010echoData\030\001 \001(\t\022\033\n\010clientId\030\002 \001(\0162\t.C" + + "lientId\022\020\n\010deviceId\030\003 \001(\t\022\016\n\006appVer\030\004 \001(" + + "\tB<\n:tech.ordinaryroad.live.chat.client." + + "codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.getDescriptor(), + }); + internal_static_CSPing_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSPing_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSPing_descriptor, + new java.lang.String[] { "EchoData", "ClientId", "DeviceId", "AppVer", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebEnterRoomOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebEnterRoomOuterClass.java new file mode 100644 index 0000000..ffe6b80 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebEnterRoomOuterClass.java @@ -0,0 +1,1365 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebEnterRoom.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSWebEnterRoomOuterClass { + private CSWebEnterRoomOuterClass() {} + 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 CSWebEnterRoomOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebEnterRoom) + com.google.protobuf.MessageOrBuilder { + + /** + * string token = 1; + * @return The token. + */ + java.lang.String getToken(); + /** + * string token = 1; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + * string liveStreamId = 2; + * @return The liveStreamId. + */ + java.lang.String getLiveStreamId(); + /** + * string liveStreamId = 2; + * @return The bytes for liveStreamId. + */ + com.google.protobuf.ByteString + getLiveStreamIdBytes(); + + /** + * uint32 reconnectCount = 3; + * @return The reconnectCount. + */ + int getReconnectCount(); + + /** + * uint32 lastErrorCode = 4; + * @return The lastErrorCode. + */ + int getLastErrorCode(); + + /** + * string expTag = 5; + * @return The expTag. + */ + java.lang.String getExpTag(); + /** + * string expTag = 5; + * @return The bytes for expTag. + */ + com.google.protobuf.ByteString + getExpTagBytes(); + + /** + * string attach = 6; + * @return The attach. + */ + java.lang.String getAttach(); + /** + * string attach = 6; + * @return The bytes for attach. + */ + com.google.protobuf.ByteString + getAttachBytes(); + + /** + * string pageId = 7; + * @return The pageId. + */ + java.lang.String getPageId(); + /** + * string pageId = 7; + * @return The bytes for pageId. + */ + com.google.protobuf.ByteString + getPageIdBytes(); + } + /** + * Protobuf type {@code CSWebEnterRoom} + */ + public static final class CSWebEnterRoom extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebEnterRoom) + CSWebEnterRoomOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebEnterRoom.newBuilder() to construct. + private CSWebEnterRoom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSWebEnterRoom() { + token_ = ""; + liveStreamId_ = ""; + expTag_ = ""; + attach_ = ""; + pageId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebEnterRoom(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + * string token = 1; + * @return The token. + */ + @java.lang.Override + 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; + } + } + /** + * string token = 1; + * @return The bytes for token. + */ + @java.lang.Override + 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 LIVESTREAMID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object liveStreamId_ = ""; + /** + * string liveStreamId = 2; + * @return The liveStreamId. + */ + @java.lang.Override + public java.lang.String getLiveStreamId() { + java.lang.Object ref = liveStreamId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveStreamId_ = s; + return s; + } + } + /** + * string liveStreamId = 2; + * @return The bytes for liveStreamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLiveStreamIdBytes() { + java.lang.Object ref = liveStreamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveStreamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECONNECTCOUNT_FIELD_NUMBER = 3; + private int reconnectCount_ = 0; + /** + * uint32 reconnectCount = 3; + * @return The reconnectCount. + */ + @java.lang.Override + public int getReconnectCount() { + return reconnectCount_; + } + + public static final int LASTERRORCODE_FIELD_NUMBER = 4; + private int lastErrorCode_ = 0; + /** + * uint32 lastErrorCode = 4; + * @return The lastErrorCode. + */ + @java.lang.Override + public int getLastErrorCode() { + return lastErrorCode_; + } + + public static final int EXPTAG_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object expTag_ = ""; + /** + * string expTag = 5; + * @return The expTag. + */ + @java.lang.Override + public java.lang.String getExpTag() { + java.lang.Object ref = expTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expTag_ = s; + return s; + } + } + /** + * string expTag = 5; + * @return The bytes for expTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExpTagBytes() { + java.lang.Object ref = expTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTACH_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object attach_ = ""; + /** + * string attach = 6; + * @return The attach. + */ + @java.lang.Override + public java.lang.String getAttach() { + java.lang.Object ref = attach_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attach_ = s; + return s; + } + } + /** + * string attach = 6; + * @return The bytes for attach. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttachBytes() { + java.lang.Object ref = attach_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attach_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGEID_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object pageId_ = ""; + /** + * string pageId = 7; + * @return The pageId. + */ + @java.lang.Override + public java.lang.String getPageId() { + java.lang.Object ref = pageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageId_ = s; + return s; + } + } + /** + * string pageId = 7; + * @return The bytes for pageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageIdBytes() { + java.lang.Object ref = pageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveStreamId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, liveStreamId_); + } + if (reconnectCount_ != 0) { + output.writeUInt32(3, reconnectCount_); + } + if (lastErrorCode_ != 0) { + output.writeUInt32(4, lastErrorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expTag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, expTag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attach_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, attach_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveStreamId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, liveStreamId_); + } + if (reconnectCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, reconnectCount_); + } + if (lastErrorCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, lastErrorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expTag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, expTag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attach_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, attach_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!getLiveStreamId() + .equals(other.getLiveStreamId())) return false; + if (getReconnectCount() + != other.getReconnectCount()) return false; + if (getLastErrorCode() + != other.getLastErrorCode()) return false; + if (!getExpTag() + .equals(other.getExpTag())) return false; + if (!getAttach() + .equals(other.getAttach())) return false; + if (!getPageId() + .equals(other.getPageId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + LIVESTREAMID_FIELD_NUMBER; + hash = (53 * hash) + getLiveStreamId().hashCode(); + hash = (37 * hash) + RECONNECTCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getReconnectCount(); + hash = (37 * hash) + LASTERRORCODE_FIELD_NUMBER; + hash = (53 * hash) + getLastErrorCode(); + hash = (37 * hash) + EXPTAG_FIELD_NUMBER; + hash = (53 * hash) + getExpTag().hashCode(); + hash = (37 * hash) + ATTACH_FIELD_NUMBER; + hash = (53 * hash) + getAttach().hashCode(); + hash = (37 * hash) + PAGEID_FIELD_NUMBER; + hash = (53 * hash) + getPageId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSWebEnterRoom} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSWebEnterRoom) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + liveStreamId_ = ""; + reconnectCount_ = 0; + lastErrorCode_ = 0; + expTag_ = ""; + attach_ = ""; + pageId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.liveStreamId_ = liveStreamId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.reconnectCount_ = reconnectCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastErrorCode_ = lastErrorCode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.expTag_ = expTag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.attach_ = attach_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pageId_ = pageId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLiveStreamId().isEmpty()) { + liveStreamId_ = other.liveStreamId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getReconnectCount() != 0) { + setReconnectCount(other.getReconnectCount()); + } + if (other.getLastErrorCode() != 0) { + setLastErrorCode(other.getLastErrorCode()); + } + if (!other.getExpTag().isEmpty()) { + expTag_ = other.expTag_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getAttach().isEmpty()) { + attach_ = other.attach_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getPageId().isEmpty()) { + pageId_ = other.pageId_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + liveStreamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + reconnectCount_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + lastErrorCode_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + expTag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + attach_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + pageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + * string token = 1; + * @return The token. + */ + 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; + } + } + /** + * string token = 1; + * @return The bytes for token. + */ + 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; + } + } + /** + * string token = 1; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string token = 1; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string token = 1; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object liveStreamId_ = ""; + /** + * string liveStreamId = 2; + * @return The liveStreamId. + */ + public java.lang.String getLiveStreamId() { + java.lang.Object ref = liveStreamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveStreamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string liveStreamId = 2; + * @return The bytes for liveStreamId. + */ + public com.google.protobuf.ByteString + getLiveStreamIdBytes() { + java.lang.Object ref = liveStreamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveStreamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string liveStreamId = 2; + * @param value The liveStreamId to set. + * @return This builder for chaining. + */ + public Builder setLiveStreamId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + liveStreamId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string liveStreamId = 2; + * @return This builder for chaining. + */ + public Builder clearLiveStreamId() { + liveStreamId_ = getDefaultInstance().getLiveStreamId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string liveStreamId = 2; + * @param value The bytes for liveStreamId to set. + * @return This builder for chaining. + */ + public Builder setLiveStreamIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + liveStreamId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int reconnectCount_ ; + /** + * uint32 reconnectCount = 3; + * @return The reconnectCount. + */ + @java.lang.Override + public int getReconnectCount() { + return reconnectCount_; + } + /** + * uint32 reconnectCount = 3; + * @param value The reconnectCount to set. + * @return This builder for chaining. + */ + public Builder setReconnectCount(int value) { + + reconnectCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 reconnectCount = 3; + * @return This builder for chaining. + */ + public Builder clearReconnectCount() { + bitField0_ = (bitField0_ & ~0x00000004); + reconnectCount_ = 0; + onChanged(); + return this; + } + + private int lastErrorCode_ ; + /** + * uint32 lastErrorCode = 4; + * @return The lastErrorCode. + */ + @java.lang.Override + public int getLastErrorCode() { + return lastErrorCode_; + } + /** + * uint32 lastErrorCode = 4; + * @param value The lastErrorCode to set. + * @return This builder for chaining. + */ + public Builder setLastErrorCode(int value) { + + lastErrorCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 lastErrorCode = 4; + * @return This builder for chaining. + */ + public Builder clearLastErrorCode() { + bitField0_ = (bitField0_ & ~0x00000008); + lastErrorCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object expTag_ = ""; + /** + * string expTag = 5; + * @return The expTag. + */ + public java.lang.String getExpTag() { + java.lang.Object ref = expTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string expTag = 5; + * @return The bytes for expTag. + */ + public com.google.protobuf.ByteString + getExpTagBytes() { + java.lang.Object ref = expTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string expTag = 5; + * @param value The expTag to set. + * @return This builder for chaining. + */ + public Builder setExpTag( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + expTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string expTag = 5; + * @return This builder for chaining. + */ + public Builder clearExpTag() { + expTag_ = getDefaultInstance().getExpTag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string expTag = 5; + * @param value The bytes for expTag to set. + * @return This builder for chaining. + */ + public Builder setExpTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + expTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object attach_ = ""; + /** + * string attach = 6; + * @return The attach. + */ + public java.lang.String getAttach() { + java.lang.Object ref = attach_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attach_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string attach = 6; + * @return The bytes for attach. + */ + public com.google.protobuf.ByteString + getAttachBytes() { + java.lang.Object ref = attach_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attach_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string attach = 6; + * @param value The attach to set. + * @return This builder for chaining. + */ + public Builder setAttach( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attach_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string attach = 6; + * @return This builder for chaining. + */ + public Builder clearAttach() { + attach_ = getDefaultInstance().getAttach(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string attach = 6; + * @param value The bytes for attach to set. + * @return This builder for chaining. + */ + public Builder setAttachBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attach_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object pageId_ = ""; + /** + * string pageId = 7; + * @return The pageId. + */ + public java.lang.String getPageId() { + java.lang.Object ref = pageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pageId = 7; + * @return The bytes for pageId. + */ + public com.google.protobuf.ByteString + getPageIdBytes() { + java.lang.Object ref = pageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pageId = 7; + * @param value The pageId to set. + * @return This builder for chaining. + */ + public Builder setPageId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * string pageId = 7; + * @return This builder for chaining. + */ + public Builder clearPageId() { + pageId_ = getDefaultInstance().getPageId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * string pageId = 7; + * @param value The bytes for pageId to set. + * @return This builder for chaining. + */ + public Builder setPageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebEnterRoom) + } + + // @@protoc_insertion_point(class_scope:CSWebEnterRoom) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSWebEnterRoom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebEnterRoom_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebEnterRoom_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\024CSWebEnterRoom.proto\"\224\001\n\016CSWebEnterRoo" + + "m\022\r\n\005token\030\001 \001(\t\022\024\n\014liveStreamId\030\002 \001(\t\022\026" + + "\n\016reconnectCount\030\003 \001(\r\022\025\n\rlastErrorCode\030" + + "\004 \001(\r\022\016\n\006expTag\030\005 \001(\t\022\016\n\006attach\030\006 \001(\t\022\016\n" + + "\006pageId\030\007 \001(\tB<\n:tech.ordinaryroad.live." + + "chat.client.codec.kuaishou.protobufb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebEnterRoom_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebEnterRoom_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebEnterRoom_descriptor, + new java.lang.String[] { "Token", "LiveStreamId", "ReconnectCount", "LastErrorCode", "ExpTag", "Attach", "PageId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebErrorOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebErrorOuterClass.java new file mode 100644 index 0000000..19ff1ae --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebErrorOuterClass.java @@ -0,0 +1,698 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebError.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSWebErrorOuterClass { + private CSWebErrorOuterClass() {} + 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 CSWebErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebError) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 code = 1; + * @return The code. + */ + int getCode(); + + /** + * string msg = 2; + * @return The msg. + */ + java.lang.String getMsg(); + /** + * string msg = 2; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + } + /** + * Protobuf type {@code CSWebError} + */ + public static final class CSWebError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebError) + CSWebErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebError.newBuilder() to construct. + private CSWebError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSWebError() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSWebError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSWebError) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * uint32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 2; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string msg = 2; + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string msg = 2; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebError) + } + + // @@protoc_insertion_point(class_scope:CSWebError) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSWebError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebError_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\020CSWebError.proto\"\'\n\nCSWebError\022\014\n\004code" + + "\030\001 \001(\r\022\013\n\003msg\030\002 \001(\tB<\n:tech.ordinaryroad" + + ".live.chat.client.codec.kuaishou.protobu" + + "fb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebError_descriptor, + new java.lang.String[] { "Code", "Msg", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebHeartbeatOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebHeartbeatOuterClass.java new file mode 100644 index 0000000..02de313 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebHeartbeatOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebHeartbeat.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSWebHeartbeatOuterClass { + private CSWebHeartbeatOuterClass() {} + 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 CSWebHeartbeatOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebHeartbeat) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + long getTimestamp(); + } + /** + * Protobuf type {@code CSWebHeartbeat} + */ + public static final class CSWebHeartbeat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebHeartbeat) + CSWebHeartbeatOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebHeartbeat.newBuilder() to construct. + private CSWebHeartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSWebHeartbeat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebHeartbeat(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSWebHeartbeat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSWebHeartbeat) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * uint64 timestamp = 1; + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebHeartbeat) + } + + // @@protoc_insertion_point(class_scope:CSWebHeartbeat) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSWebHeartbeat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebHeartbeat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebHeartbeat_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\024CSWebHeartbeat.proto\"#\n\016CSWebHeartbeat" + + "\022\021\n\ttimestamp\030\001 \001(\004B<\n:tech.ordinaryroad" + + ".live.chat.client.codec.kuaishou.protobu" + + "fb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebHeartbeat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebHeartbeat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebHeartbeat_descriptor, + new java.lang.String[] { "Timestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebUserExitOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebUserExitOuterClass.java new file mode 100644 index 0000000..624d44d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebUserExitOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebUserExit.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSWebUserExitOuterClass { + private CSWebUserExitOuterClass() {} + 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 CSWebUserExitOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebUserExit) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code CSWebUserExit} + */ + public static final class CSWebUserExit extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebUserExit) + CSWebUserExitOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebUserExit.newBuilder() to construct. + private CSWebUserExit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSWebUserExit() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebUserExit(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSWebUserExit} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSWebUserExit) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebUserExit) + } + + // @@protoc_insertion_point(class_scope:CSWebUserExit) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSWebUserExit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebUserExit_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebUserExit_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\023CSWebUserExit.proto\"\035\n\rCSWebUserExit\022\014" + + "\n\004time\030\001 \001(\004B<\n:tech.ordinaryroad.live.c" + + "hat.client.codec.kuaishou.protobufb\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebUserExit_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebUserExit_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebUserExit_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebUserPauseOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebUserPauseOuterClass.java new file mode 100644 index 0000000..1718a39 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/CSWebUserPauseOuterClass.java @@ -0,0 +1,659 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebUserPause.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class CSWebUserPauseOuterClass { + private CSWebUserPauseOuterClass() {} + 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 CSWebUserPauseOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebUserPause) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + + /** + * .WebUserPauseType pauseType = 2; + * @return The enum numeric value on the wire for pauseType. + */ + int getPauseTypeValue(); + /** + * .WebUserPauseType pauseType = 2; + * @return The pauseType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType getPauseType(); + } + /** + * Protobuf type {@code CSWebUserPause} + */ + public static final class CSWebUserPause extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebUserPause) + CSWebUserPauseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebUserPause.newBuilder() to construct. + private CSWebUserPause(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CSWebUserPause() { + pauseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebUserPause(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int PAUSETYPE_FIELD_NUMBER = 2; + private int pauseType_ = 0; + /** + * .WebUserPauseType pauseType = 2; + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * .WebUserPauseType pauseType = 2; + * @return The pauseType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNKNOWN_USER_PAUSE_TYPE.getNumber()) { + output.writeEnum(2, pauseType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNKNOWN_USER_PAUSE_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, pauseType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause) obj; + + if (getTime() + != other.getTime()) return false; + if (pauseType_ != other.pauseType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + PAUSETYPE_FIELD_NUMBER; + hash = (53 * hash) + pauseType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 CSWebUserPause} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:CSWebUserPause) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPauseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + pauseType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pauseType_ = pauseType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.pauseType_ != 0) { + setPauseTypeValue(other.getPauseTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + pauseType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private int pauseType_ = 0; + /** + * .WebUserPauseType pauseType = 2; + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * .WebUserPauseType pauseType = 2; + * @param value The enum numeric value on the wire for pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseTypeValue(int value) { + pauseType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .WebUserPauseType pauseType = 2; + * @return The pauseType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNRECOGNIZED : result; + } + /** + * .WebUserPauseType pauseType = 2; + * @param value The pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + pauseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebUserPauseType pauseType = 2; + * @return This builder for chaining. + */ + public Builder clearPauseType() { + bitField0_ = (bitField0_ & ~0x00000002); + pauseType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebUserPause) + } + + // @@protoc_insertion_point(class_scope:CSWebUserPause) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CSWebUserPause parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebUserPause_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebUserPause_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\024CSWebUserPause.proto\032\026WebUserPauseType" + + ".proto\"D\n\016CSWebUserPause\022\014\n\004time\030\001 \001(\004\022$" + + "\n\tpauseType\030\002 \001(\0162\021.WebUserPauseTypeB<\n:" + + "tech.ordinaryroad.live.chat.client.codec" + + ".kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.getDescriptor(), + }); + internal_static_CSWebUserPause_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebUserPause_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebUserPause_descriptor, + new java.lang.String[] { "Time", "PauseType", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ClientIdOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ClientIdOuterClass.java new file mode 100644 index 0000000..e3f8d5e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ClientIdOuterClass.java @@ -0,0 +1,217 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ClientId.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class ClientIdOuterClass { + private ClientIdOuterClass() {} + 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 ClientId} + */ + public enum ClientId + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0), + /** + * IPHONE = 1; + */ + IPHONE(1), + /** + * ANDROID = 2; + */ + ANDROID(2), + /** + * WEB = 3; + */ + WEB(3), + /** + * PC = 6; + */ + PC(6), + /** + * IPHONE_LIVE_MATE = 8; + */ + IPHONE_LIVE_MATE(8), + /** + * ANDROID_LIVE_MATE = 9; + */ + ANDROID_LIVE_MATE(9), + UNRECOGNIZED(-1), + ; + + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * IPHONE = 1; + */ + public static final int IPHONE_VALUE = 1; + /** + * ANDROID = 2; + */ + public static final int ANDROID_VALUE = 2; + /** + * WEB = 3; + */ + public static final int WEB_VALUE = 3; + /** + * PC = 6; + */ + public static final int PC_VALUE = 6; + /** + * IPHONE_LIVE_MATE = 8; + */ + public static final int IPHONE_LIVE_MATE_VALUE = 8; + /** + * ANDROID_LIVE_MATE = 9; + */ + public static final int ANDROID_LIVE_MATE_VALUE = 9; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ClientId valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ClientId forNumber(int value) { + switch (value) { + case 0: return NONE; + case 1: return IPHONE; + case 2: return ANDROID; + case 3: return WEB; + case 6: return PC; + case 8: return IPHONE_LIVE_MATE; + case 9: return ANDROID_LIVE_MATE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ClientId> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ClientId findValueByNumber(int number) { + return ClientId.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ClientIdOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final ClientId[] VALUES = values(); + + public static ClientId 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 ClientId(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:ClientId) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\016ClientId.proto*k\n\010ClientId\022\010\n\004NONE\020\000\022\n" + + "\n\006IPHONE\020\001\022\013\n\007ANDROID\020\002\022\007\n\003WEB\020\003\022\006\n\002PC\020\006" + + "\022\024\n\020IPHONE_LIVE_MATE\020\010\022\025\n\021ANDROID_LIVE_M" + + "ATE\020\tB<\n:tech.ordinaryroad.live.chat.cli" + + "ent.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ConfigSwitchItemOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ConfigSwitchItemOuterClass.java new file mode 100644 index 0000000..6bf2a0d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ConfigSwitchItemOuterClass.java @@ -0,0 +1,659 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ConfigSwitchItem.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class ConfigSwitchItemOuterClass { + private ConfigSwitchItemOuterClass() {} + 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 ConfigSwitchItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:ConfigSwitchItem) + com.google.protobuf.MessageOrBuilder { + + /** + * .ConfigSwitchType configSwitchType = 1; + * @return The enum numeric value on the wire for configSwitchType. + */ + int getConfigSwitchTypeValue(); + /** + * .ConfigSwitchType configSwitchType = 1; + * @return The configSwitchType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType getConfigSwitchType(); + + /** + * bool value = 2; + * @return The value. + */ + boolean getValue(); + } + /** + * Protobuf type {@code ConfigSwitchItem} + */ + public static final class ConfigSwitchItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:ConfigSwitchItem) + ConfigSwitchItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigSwitchItem.newBuilder() to construct. + private ConfigSwitchItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConfigSwitchItem() { + configSwitchType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConfigSwitchItem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder.class); + } + + public static final int CONFIGSWITCHTYPE_FIELD_NUMBER = 1; + private int configSwitchType_ = 0; + /** + * .ConfigSwitchType configSwitchType = 1; + * @return The enum numeric value on the wire for configSwitchType. + */ + @java.lang.Override public int getConfigSwitchTypeValue() { + return configSwitchType_; + } + /** + * .ConfigSwitchType configSwitchType = 1; + * @return The configSwitchType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType getConfigSwitchType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.forNumber(configSwitchType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNRECOGNIZED : result; + } + + public static final int VALUE_FIELD_NUMBER = 2; + private boolean value_ = false; + /** + * bool value = 2; + * @return The value. + */ + @java.lang.Override + public boolean getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (configSwitchType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNKNOWN.getNumber()) { + output.writeEnum(1, configSwitchType_); + } + if (value_ != false) { + output.writeBool(2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (configSwitchType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, configSwitchType_); + } + if (value_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem) obj; + + if (configSwitchType_ != other.configSwitchType_) return false; + if (getValue() + != other.getValue()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONFIGSWITCHTYPE_FIELD_NUMBER; + hash = (53 * hash) + configSwitchType_; + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getValue()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 ConfigSwitchItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:ConfigSwitchItem) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + configSwitchType_ = 0; + value_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.configSwitchType_ = configSwitchType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance()) return this; + if (other.configSwitchType_ != 0) { + setConfigSwitchTypeValue(other.getConfigSwitchTypeValue()); + } + if (other.getValue() != false) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + configSwitchType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + value_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int configSwitchType_ = 0; + /** + * .ConfigSwitchType configSwitchType = 1; + * @return The enum numeric value on the wire for configSwitchType. + */ + @java.lang.Override public int getConfigSwitchTypeValue() { + return configSwitchType_; + } + /** + * .ConfigSwitchType configSwitchType = 1; + * @param value The enum numeric value on the wire for configSwitchType to set. + * @return This builder for chaining. + */ + public Builder setConfigSwitchTypeValue(int value) { + configSwitchType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .ConfigSwitchType configSwitchType = 1; + * @return The configSwitchType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType getConfigSwitchType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.forNumber(configSwitchType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNRECOGNIZED : result; + } + /** + * .ConfigSwitchType configSwitchType = 1; + * @param value The configSwitchType to set. + * @return This builder for chaining. + */ + public Builder setConfigSwitchType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + configSwitchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .ConfigSwitchType configSwitchType = 1; + * @return This builder for chaining. + */ + public Builder clearConfigSwitchType() { + bitField0_ = (bitField0_ & ~0x00000001); + configSwitchType_ = 0; + onChanged(); + return this; + } + + private boolean value_ ; + /** + * bool value = 2; + * @return The value. + */ + @java.lang.Override + public boolean getValue() { + return value_; + } + /** + * bool value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(boolean value) { + + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:ConfigSwitchItem) + } + + // @@protoc_insertion_point(class_scope:ConfigSwitchItem) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigSwitchItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_ConfigSwitchItem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_ConfigSwitchItem_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\026ConfigSwitchItem.proto\032\026ConfigSwitchTy" + + "pe.proto\"N\n\020ConfigSwitchItem\022+\n\020configSw" + + "itchType\030\001 \001(\0162\021.ConfigSwitchType\022\r\n\005val" + + "ue\030\002 \001(\010B<\n:tech.ordinaryroad.live.chat." + + "client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.getDescriptor(), + }); + internal_static_ConfigSwitchItem_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_ConfigSwitchItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_ConfigSwitchItem_descriptor, + new java.lang.String[] { "ConfigSwitchType", "Value", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ConfigSwitchTypeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ConfigSwitchTypeOuterClass.java new file mode 100644 index 0000000..1e6f091 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/ConfigSwitchTypeOuterClass.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ConfigSwitchType.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class ConfigSwitchTypeOuterClass { + private ConfigSwitchTypeOuterClass() {} + 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 ConfigSwitchType} + */ + public enum ConfigSwitchType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * HIDE_BARRAGE = 1; + */ + HIDE_BARRAGE(1), + /** + * HIDE_SPECIAL_EFFECT = 2; + */ + HIDE_SPECIAL_EFFECT(2), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * HIDE_BARRAGE = 1; + */ + public static final int HIDE_BARRAGE_VALUE = 1; + /** + * HIDE_SPECIAL_EFFECT = 2; + */ + public static final int HIDE_SPECIAL_EFFECT_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigSwitchType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConfigSwitchType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return HIDE_BARRAGE; + case 2: return HIDE_SPECIAL_EFFECT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ConfigSwitchType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigSwitchType findValueByNumber(int number) { + return ConfigSwitchType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final ConfigSwitchType[] VALUES = values(); + + public static ConfigSwitchType 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 ConfigSwitchType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:ConfigSwitchType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026ConfigSwitchType.proto*J\n\020ConfigSwitch" + + "Type\022\013\n\007UNKNOWN\020\000\022\020\n\014HIDE_BARRAGE\020\001\022\027\n\023H" + + "IDE_SPECIAL_EFFECT\020\002B<\n:tech.ordinaryroa" + + "d.live.chat.client.codec.kuaishou.protob" + + "ufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/GzoneNameplateOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/GzoneNameplateOuterClass.java new file mode 100644 index 0000000..4062a94 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/GzoneNameplateOuterClass.java @@ -0,0 +1,1080 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GzoneNameplate.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class GzoneNameplateOuterClass { + private GzoneNameplateOuterClass() {} + 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 GzoneNameplateOrBuilder extends + // @@protoc_insertion_point(interface_extends:GzoneNameplate) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 id = 1; + * @return The id. + */ + long getId(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .PicUrl urls = 3; + */ + java.util.List + getUrlsList(); + /** + * repeated .PicUrl urls = 3; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getUrls(int index); + /** + * repeated .PicUrl urls = 3; + */ + int getUrlsCount(); + /** + * repeated .PicUrl urls = 3; + */ + java.util.List + getUrlsOrBuilderList(); + /** + * repeated .PicUrl urls = 3; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getUrlsOrBuilder( + int index); + } + /** + * Protobuf type {@code GzoneNameplate} + */ + public static final class GzoneNameplate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GzoneNameplate) + GzoneNameplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use GzoneNameplate.newBuilder() to construct. + private GzoneNameplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GzoneNameplate() { + name_ = ""; + urls_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GzoneNameplate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private long id_ = 0L; + /** + * int64 id = 1; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + 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; + * @return The bytes for name. + */ + @java.lang.Override + 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 URLS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List urls_; + /** + * repeated .PicUrl urls = 3; + */ + @java.lang.Override + public java.util.List getUrlsList() { + return urls_; + } + /** + * repeated .PicUrl urls = 3; + */ + @java.lang.Override + public java.util.List + getUrlsOrBuilderList() { + return urls_; + } + /** + * repeated .PicUrl urls = 3; + */ + @java.lang.Override + public int getUrlsCount() { + return urls_.size(); + } + /** + * repeated .PicUrl urls = 3; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getUrls(int index) { + return urls_.get(index); + } + /** + * repeated .PicUrl urls = 3; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getUrlsOrBuilder( + int index) { + return urls_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0L) { + output.writeInt64(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < urls_.size(); i++) { + output.writeMessage(3, urls_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < urls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, urls_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate) obj; + + if (getId() + != other.getId()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getUrlsList() + .equals(other.getUrlsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getUrlsCount() > 0) { + hash = (37 * hash) + URLS_FIELD_NUMBER; + hash = (53 * hash) + getUrlsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 GzoneNameplate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GzoneNameplate) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = 0L; + name_ = ""; + if (urlsBuilder_ == null) { + urls_ = java.util.Collections.emptyList(); + } else { + urls_ = null; + urlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result) { + if (urlsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + urls_ = java.util.Collections.unmodifiableList(urls_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.urls_ = urls_; + } else { + result.urls_ = urlsBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance()) return this; + if (other.getId() != 0L) { + setId(other.getId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (urlsBuilder_ == null) { + if (!other.urls_.isEmpty()) { + if (urls_.isEmpty()) { + urls_ = other.urls_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUrlsIsMutable(); + urls_.addAll(other.urls_); + } + onChanged(); + } + } else { + if (!other.urls_.isEmpty()) { + if (urlsBuilder_.isEmpty()) { + urlsBuilder_.dispose(); + urlsBuilder_ = null; + urls_ = other.urls_; + bitField0_ = (bitField0_ & ~0x00000004); + urlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUrlsFieldBuilder() : null; + } else { + urlsBuilder_.addAllMessages(other.urls_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + id_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.parser(), + extensionRegistry); + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.add(m); + } else { + urlsBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long id_ ; + /** + * int64 id = 1; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + * int64 id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000001); + id_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 2; + * @return The name. + */ + 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; + * @return The bytes for name. + */ + 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; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List urls_ = + java.util.Collections.emptyList(); + private void ensureUrlsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + urls_ = new java.util.ArrayList(urls_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> urlsBuilder_; + + /** + * repeated .PicUrl urls = 3; + */ + public java.util.List getUrlsList() { + if (urlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(urls_); + } else { + return urlsBuilder_.getMessageList(); + } + } + /** + * repeated .PicUrl urls = 3; + */ + public int getUrlsCount() { + if (urlsBuilder_ == null) { + return urls_.size(); + } else { + return urlsBuilder_.getCount(); + } + } + /** + * repeated .PicUrl urls = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getUrls(int index) { + if (urlsBuilder_ == null) { + return urls_.get(index); + } else { + return urlsBuilder_.getMessage(index); + } + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder setUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (urlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.set(index, value); + onChanged(); + } else { + urlsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder setUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.set(index, builderForValue.build()); + onChanged(); + } else { + urlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder addUrls(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (urlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.add(value); + onChanged(); + } else { + urlsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder addUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (urlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.add(index, value); + onChanged(); + } else { + urlsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder addUrls( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.add(builderForValue.build()); + onChanged(); + } else { + urlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder addUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.add(index, builderForValue.build()); + onChanged(); + } else { + urlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder addAllUrls( + java.lang.Iterable values) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, urls_); + onChanged(); + } else { + urlsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder clearUrls() { + if (urlsBuilder_ == null) { + urls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + urlsBuilder_.clear(); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public Builder removeUrls(int index) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.remove(index); + onChanged(); + } else { + urlsBuilder_.remove(index); + } + return this; + } + /** + * repeated .PicUrl urls = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder getUrlsBuilder( + int index) { + return getUrlsFieldBuilder().getBuilder(index); + } + /** + * repeated .PicUrl urls = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getUrlsOrBuilder( + int index) { + if (urlsBuilder_ == null) { + return urls_.get(index); } else { + return urlsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .PicUrl urls = 3; + */ + public java.util.List + getUrlsOrBuilderList() { + if (urlsBuilder_ != null) { + return urlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(urls_); + } + } + /** + * repeated .PicUrl urls = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addUrlsBuilder() { + return getUrlsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * repeated .PicUrl urls = 3; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addUrlsBuilder( + int index) { + return getUrlsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * repeated .PicUrl urls = 3; + */ + public java.util.List + getUrlsBuilderList() { + return getUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getUrlsFieldBuilder() { + if (urlsBuilder_ == null) { + urlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder>( + urls_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + urls_ = null; + } + return urlsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GzoneNameplate) + } + + // @@protoc_insertion_point(class_scope:GzoneNameplate) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GzoneNameplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GzoneNameplate_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GzoneNameplate_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\024GzoneNameplate.proto\032\014PicUrl.proto\"A\n\016" + + "GzoneNameplate\022\n\n\002id\030\001 \001(\003\022\014\n\004name\030\002 \001(\t" + + "\022\025\n\004urls\030\003 \003(\0132\007.PicUrlB<\n:tech.ordinary" + + "road.live.chat.client.codec.kuaishou.pro" + + "tobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(), + }); + internal_static_GzoneNameplate_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_GzoneNameplate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GzoneNameplate_descriptor, + new java.lang.String[] { "Id", "Name", "Urls", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveAudienceStateOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveAudienceStateOuterClass.java new file mode 100644 index 0000000..225b166 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveAudienceStateOuterClass.java @@ -0,0 +1,3350 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: LiveAudienceState.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class LiveAudienceStateOuterClass { + private LiveAudienceStateOuterClass() {} + 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 LiveAudienceStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveAudienceState) + com.google.protobuf.MessageOrBuilder { + + /** + * bool isFromFansTop = 1; + * @return The isFromFansTop. + */ + boolean getIsFromFansTop(); + + /** + * bool isKoi = 2; + * @return The isKoi. + */ + boolean getIsKoi(); + + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @return The enum numeric value on the wire for assistantType. + */ + int getAssistantTypeValue(); + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @return The assistantType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType getAssistantType(); + + /** + * uint32 fansGroupIntimacyLevel = 4; + * @return The fansGroupIntimacyLevel. + */ + int getFansGroupIntimacyLevel(); + + /** + * .GzoneNameplate nameplate = 5; + * @return Whether the nameplate field is set. + */ + boolean hasNameplate(); + /** + * .GzoneNameplate nameplate = 5; + * @return The nameplate. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getNameplate(); + /** + * .GzoneNameplate nameplate = 5; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder getNameplateOrBuilder(); + + /** + * .LiveFansGroupState liveFansGroupState = 6; + * @return Whether the liveFansGroupState field is set. + */ + boolean hasLiveFansGroupState(); + /** + * .LiveFansGroupState liveFansGroupState = 6; + * @return The liveFansGroupState. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getLiveFansGroupState(); + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder getLiveFansGroupStateOrBuilder(); + + /** + * uint32 wealthGrade = 7; + * @return The wealthGrade. + */ + int getWealthGrade(); + + /** + * string badgeKey = 8; + * @return The badgeKey. + */ + java.lang.String getBadgeKey(); + /** + * string badgeKey = 8; + * @return The bytes for badgeKey. + */ + com.google.protobuf.ByteString + getBadgeKeyBytes(); + + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + java.util.List + getLiveAudienceState11List(); + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 getLiveAudienceState11(int index); + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + int getLiveAudienceState11Count(); + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + java.util.List + getLiveAudienceState11OrBuilderList(); + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11OrBuilder getLiveAudienceState11OrBuilder( + int index); + } + /** + * Protobuf type {@code LiveAudienceState} + */ + public static final class LiveAudienceState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveAudienceState) + LiveAudienceStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveAudienceState.newBuilder() to construct. + private LiveAudienceState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LiveAudienceState() { + assistantType_ = 0; + badgeKey_ = ""; + liveAudienceState11_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveAudienceState(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder.class); + } + + /** + * Protobuf enum {@code LiveAudienceState.AssistantType} + */ + public enum AssistantType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_ASSISTANT_TYPE = 0; + */ + UNKNOWN_ASSISTANT_TYPE(0), + /** + * SUPER = 1; + */ + SUPER(1), + /** + * JUNIOR = 2; + */ + JUNIOR(2), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_ASSISTANT_TYPE = 0; + */ + public static final int UNKNOWN_ASSISTANT_TYPE_VALUE = 0; + /** + * SUPER = 1; + */ + public static final int SUPER_VALUE = 1; + /** + * JUNIOR = 2; + */ + public static final int JUNIOR_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AssistantType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AssistantType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_ASSISTANT_TYPE; + case 1: return SUPER; + case 2: return JUNIOR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AssistantType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AssistantType findValueByNumber(int number) { + return AssistantType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDescriptor().getEnumTypes().get(0); + } + + private static final AssistantType[] VALUES = values(); + + public static AssistantType 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 AssistantType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:LiveAudienceState.AssistantType) + } + + public interface LiveAudienceState_11OrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveAudienceState.LiveAudienceState_11) + com.google.protobuf.MessageOrBuilder { + + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + * @return Whether the liveAudienceState111 field is set. + */ + boolean hasLiveAudienceState111(); + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + * @return The liveAudienceState111. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 getLiveAudienceState111(); + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1OrBuilder getLiveAudienceState111OrBuilder(); + } + /** + * Protobuf type {@code LiveAudienceState.LiveAudienceState_11} + */ + public static final class LiveAudienceState_11 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveAudienceState.LiveAudienceState_11) + LiveAudienceState_11OrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveAudienceState_11.newBuilder() to construct. + private LiveAudienceState_11(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LiveAudienceState_11() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveAudienceState_11(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder.class); + } + + public interface LiveAudienceState_11_1OrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * string s1 = 1;
+         * 
+ * + * string badgeIcon = 2; + * @return The badgeIcon. + */ + java.lang.String getBadgeIcon(); + /** + *
+         * string s1 = 1;
+         * 
+ * + * string badgeIcon = 2; + * @return The bytes for badgeIcon. + */ + com.google.protobuf.ByteString + getBadgeIconBytes(); + + /** + *
+         * uint32 int3 = 3;
+         * 
+ * + * string badgeName = 4; + * @return The badgeName. + */ + java.lang.String getBadgeName(); + /** + *
+         * uint32 int3 = 3;
+         * 
+ * + * string badgeName = 4; + * @return The bytes for badgeName. + */ + com.google.protobuf.ByteString + getBadgeNameBytes(); + } + /** + * Protobuf type {@code LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1} + */ + public static final class LiveAudienceState_11_1 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1) + LiveAudienceState_11_1OrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveAudienceState_11_1.newBuilder() to construct. + private LiveAudienceState_11_1(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LiveAudienceState_11_1() { + badgeIcon_ = ""; + badgeName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveAudienceState_11_1(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.Builder.class); + } + + public static final int BADGEICON_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object badgeIcon_ = ""; + /** + *
+         * string s1 = 1;
+         * 
+ * + * string badgeIcon = 2; + * @return The badgeIcon. + */ + @java.lang.Override + public java.lang.String getBadgeIcon() { + java.lang.Object ref = badgeIcon_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeIcon_ = s; + return s; + } + } + /** + *
+         * string s1 = 1;
+         * 
+ * + * string badgeIcon = 2; + * @return The bytes for badgeIcon. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBadgeIconBytes() { + java.lang.Object ref = badgeIcon_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeIcon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BADGENAME_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object badgeName_ = ""; + /** + *
+         * uint32 int3 = 3;
+         * 
+ * + * string badgeName = 4; + * @return The badgeName. + */ + @java.lang.Override + public java.lang.String getBadgeName() { + java.lang.Object ref = badgeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeName_ = s; + return s; + } + } + /** + *
+         * uint32 int3 = 3;
+         * 
+ * + * string badgeName = 4; + * @return The bytes for badgeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBadgeNameBytes() { + java.lang.Object ref = badgeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeIcon_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, badgeIcon_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, badgeName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeIcon_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, badgeIcon_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, badgeName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1) obj; + + if (!getBadgeIcon() + .equals(other.getBadgeIcon())) return false; + if (!getBadgeName() + .equals(other.getBadgeName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BADGEICON_FIELD_NUMBER; + hash = (53 * hash) + getBadgeIcon().hashCode(); + hash = (37 * hash) + BADGENAME_FIELD_NUMBER; + hash = (53 * hash) + getBadgeName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + badgeIcon_ = ""; + badgeName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.badgeIcon_ = badgeIcon_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.badgeName_ = badgeName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.getDefaultInstance()) return this; + if (!other.getBadgeIcon().isEmpty()) { + badgeIcon_ = other.badgeIcon_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBadgeName().isEmpty()) { + badgeName_ = other.badgeName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + badgeIcon_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 34: { + badgeName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object badgeIcon_ = ""; + /** + *
+           * string s1 = 1;
+           * 
+ * + * string badgeIcon = 2; + * @return The badgeIcon. + */ + public java.lang.String getBadgeIcon() { + java.lang.Object ref = badgeIcon_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeIcon_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+           * string s1 = 1;
+           * 
+ * + * string badgeIcon = 2; + * @return The bytes for badgeIcon. + */ + public com.google.protobuf.ByteString + getBadgeIconBytes() { + java.lang.Object ref = badgeIcon_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeIcon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+           * string s1 = 1;
+           * 
+ * + * string badgeIcon = 2; + * @param value The badgeIcon to set. + * @return This builder for chaining. + */ + public Builder setBadgeIcon( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + badgeIcon_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+           * string s1 = 1;
+           * 
+ * + * string badgeIcon = 2; + * @return This builder for chaining. + */ + public Builder clearBadgeIcon() { + badgeIcon_ = getDefaultInstance().getBadgeIcon(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+           * string s1 = 1;
+           * 
+ * + * string badgeIcon = 2; + * @param value The bytes for badgeIcon to set. + * @return This builder for chaining. + */ + public Builder setBadgeIconBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + badgeIcon_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object badgeName_ = ""; + /** + *
+           * uint32 int3 = 3;
+           * 
+ * + * string badgeName = 4; + * @return The badgeName. + */ + public java.lang.String getBadgeName() { + java.lang.Object ref = badgeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+           * uint32 int3 = 3;
+           * 
+ * + * string badgeName = 4; + * @return The bytes for badgeName. + */ + public com.google.protobuf.ByteString + getBadgeNameBytes() { + java.lang.Object ref = badgeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+           * uint32 int3 = 3;
+           * 
+ * + * string badgeName = 4; + * @param value The badgeName to set. + * @return This builder for chaining. + */ + public Builder setBadgeName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + badgeName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+           * uint32 int3 = 3;
+           * 
+ * + * string badgeName = 4; + * @return This builder for chaining. + */ + public Builder clearBadgeName() { + badgeName_ = getDefaultInstance().getBadgeName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+           * uint32 int3 = 3;
+           * 
+ * + * string badgeName = 4; + * @param value The bytes for badgeName to set. + * @return This builder for chaining. + */ + public Builder setBadgeNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + badgeName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1) + } + + // @@protoc_insertion_point(class_scope:LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LiveAudienceState_11_1 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int LIVEAUDIENCESTATE_11_1_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState111_; + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + * @return Whether the liveAudienceState111 field is set. + */ + @java.lang.Override + public boolean hasLiveAudienceState111() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + * @return The liveAudienceState111. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 getLiveAudienceState111() { + return liveAudienceState111_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.getDefaultInstance() : liveAudienceState111_; + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1OrBuilder getLiveAudienceState111OrBuilder() { + return liveAudienceState111_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.getDefaultInstance() : liveAudienceState111_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLiveAudienceState111()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLiveAudienceState111()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11) obj; + + if (hasLiveAudienceState111() != other.hasLiveAudienceState111()) return false; + if (hasLiveAudienceState111()) { + if (!getLiveAudienceState111() + .equals(other.getLiveAudienceState111())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLiveAudienceState111()) { + hash = (37 * hash) + LIVEAUDIENCESTATE_11_1_FIELD_NUMBER; + hash = (53 * hash) + getLiveAudienceState111().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 LiveAudienceState.LiveAudienceState_11} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:LiveAudienceState.LiveAudienceState_11) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLiveAudienceState111FieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + liveAudienceState111_ = null; + if (liveAudienceState111Builder_ != null) { + liveAudienceState111Builder_.dispose(); + liveAudienceState111Builder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_LiveAudienceState_11_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.liveAudienceState111_ = liveAudienceState111Builder_ == null + ? liveAudienceState111_ + : liveAudienceState111Builder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.getDefaultInstance()) return this; + if (other.hasLiveAudienceState111()) { + mergeLiveAudienceState111(other.getLiveAudienceState111()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getLiveAudienceState111FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState111_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1OrBuilder> liveAudienceState111Builder_; + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + * @return Whether the liveAudienceState111 field is set. + */ + public boolean hasLiveAudienceState111() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + * @return The liveAudienceState111. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 getLiveAudienceState111() { + if (liveAudienceState111Builder_ == null) { + return liveAudienceState111_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.getDefaultInstance() : liveAudienceState111_; + } else { + return liveAudienceState111Builder_.getMessage(); + } + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + public Builder setLiveAudienceState111(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 value) { + if (liveAudienceState111Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + liveAudienceState111_ = value; + } else { + liveAudienceState111Builder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + public Builder setLiveAudienceState111( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.Builder builderForValue) { + if (liveAudienceState111Builder_ == null) { + liveAudienceState111_ = builderForValue.build(); + } else { + liveAudienceState111Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + public Builder mergeLiveAudienceState111(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 value) { + if (liveAudienceState111Builder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + liveAudienceState111_ != null && + liveAudienceState111_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.getDefaultInstance()) { + getLiveAudienceState111Builder().mergeFrom(value); + } else { + liveAudienceState111_ = value; + } + } else { + liveAudienceState111Builder_.mergeFrom(value); + } + if (liveAudienceState111_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + public Builder clearLiveAudienceState111() { + bitField0_ = (bitField0_ & ~0x00000001); + liveAudienceState111_ = null; + if (liveAudienceState111Builder_ != null) { + liveAudienceState111Builder_.dispose(); + liveAudienceState111Builder_ = null; + } + onChanged(); + return this; + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.Builder getLiveAudienceState111Builder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLiveAudienceState111FieldBuilder().getBuilder(); + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1OrBuilder getLiveAudienceState111OrBuilder() { + if (liveAudienceState111Builder_ != null) { + return liveAudienceState111Builder_.getMessageOrBuilder(); + } else { + return liveAudienceState111_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.getDefaultInstance() : liveAudienceState111_; + } + } + /** + * .LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1OrBuilder> + getLiveAudienceState111FieldBuilder() { + if (liveAudienceState111Builder_ == null) { + liveAudienceState111Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.LiveAudienceState_11_1OrBuilder>( + getLiveAudienceState111(), + getParentForChildren(), + isClean()); + liveAudienceState111_ = null; + } + return liveAudienceState111Builder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveAudienceState.LiveAudienceState_11) + } + + // @@protoc_insertion_point(class_scope:LiveAudienceState.LiveAudienceState_11) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LiveAudienceState_11 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int ISFROMFANSTOP_FIELD_NUMBER = 1; + private boolean isFromFansTop_ = false; + /** + * bool isFromFansTop = 1; + * @return The isFromFansTop. + */ + @java.lang.Override + public boolean getIsFromFansTop() { + return isFromFansTop_; + } + + public static final int ISKOI_FIELD_NUMBER = 2; + private boolean isKoi_ = false; + /** + * bool isKoi = 2; + * @return The isKoi. + */ + @java.lang.Override + public boolean getIsKoi() { + return isKoi_; + } + + public static final int ASSISTANTTYPE_FIELD_NUMBER = 3; + private int assistantType_ = 0; + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @return The enum numeric value on the wire for assistantType. + */ + @java.lang.Override public int getAssistantTypeValue() { + return assistantType_; + } + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @return The assistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType getAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.forNumber(assistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNRECOGNIZED : result; + } + + public static final int FANSGROUPINTIMACYLEVEL_FIELD_NUMBER = 4; + private int fansGroupIntimacyLevel_ = 0; + /** + * uint32 fansGroupIntimacyLevel = 4; + * @return The fansGroupIntimacyLevel. + */ + @java.lang.Override + public int getFansGroupIntimacyLevel() { + return fansGroupIntimacyLevel_; + } + + public static final int NAMEPLATE_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate nameplate_; + /** + * .GzoneNameplate nameplate = 5; + * @return Whether the nameplate field is set. + */ + @java.lang.Override + public boolean hasNameplate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .GzoneNameplate nameplate = 5; + * @return The nameplate. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getNameplate() { + return nameplate_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } + /** + * .GzoneNameplate nameplate = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder getNameplateOrBuilder() { + return nameplate_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } + + public static final int LIVEFANSGROUPSTATE_FIELD_NUMBER = 6; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState liveFansGroupState_; + /** + * .LiveFansGroupState liveFansGroupState = 6; + * @return Whether the liveFansGroupState field is set. + */ + @java.lang.Override + public boolean hasLiveFansGroupState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + * @return The liveFansGroupState. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getLiveFansGroupState() { + return liveFansGroupState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder getLiveFansGroupStateOrBuilder() { + return liveFansGroupState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } + + public static final int WEALTHGRADE_FIELD_NUMBER = 7; + private int wealthGrade_ = 0; + /** + * uint32 wealthGrade = 7; + * @return The wealthGrade. + */ + @java.lang.Override + public int getWealthGrade() { + return wealthGrade_; + } + + public static final int BADGEKEY_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object badgeKey_ = ""; + /** + * string badgeKey = 8; + * @return The badgeKey. + */ + @java.lang.Override + public java.lang.String getBadgeKey() { + java.lang.Object ref = badgeKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeKey_ = s; + return s; + } + } + /** + * string badgeKey = 8; + * @return The bytes for badgeKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBadgeKeyBytes() { + java.lang.Object ref = badgeKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIVEAUDIENCESTATE_11_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List liveAudienceState11_; + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + @java.lang.Override + public java.util.List getLiveAudienceState11List() { + return liveAudienceState11_; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + @java.lang.Override + public java.util.List + getLiveAudienceState11OrBuilderList() { + return liveAudienceState11_; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + @java.lang.Override + public int getLiveAudienceState11Count() { + return liveAudienceState11_.size(); + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 getLiveAudienceState11(int index) { + return liveAudienceState11_.get(index); + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11OrBuilder getLiveAudienceState11OrBuilder( + int index) { + return liveAudienceState11_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (isFromFansTop_ != false) { + output.writeBool(1, isFromFansTop_); + } + if (isKoi_ != false) { + output.writeBool(2, isKoi_); + } + if (assistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(3, assistantType_); + } + if (fansGroupIntimacyLevel_ != 0) { + output.writeUInt32(4, fansGroupIntimacyLevel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getNameplate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getLiveFansGroupState()); + } + if (wealthGrade_ != 0) { + output.writeUInt32(7, wealthGrade_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, badgeKey_); + } + for (int i = 0; i < liveAudienceState11_.size(); i++) { + output.writeMessage(11, liveAudienceState11_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isFromFansTop_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, isFromFansTop_); + } + if (isKoi_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isKoi_); + } + if (assistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, assistantType_); + } + if (fansGroupIntimacyLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, fansGroupIntimacyLevel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getNameplate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getLiveFansGroupState()); + } + if (wealthGrade_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, wealthGrade_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, badgeKey_); + } + for (int i = 0; i < liveAudienceState11_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, liveAudienceState11_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState) obj; + + if (getIsFromFansTop() + != other.getIsFromFansTop()) return false; + if (getIsKoi() + != other.getIsKoi()) return false; + if (assistantType_ != other.assistantType_) return false; + if (getFansGroupIntimacyLevel() + != other.getFansGroupIntimacyLevel()) return false; + if (hasNameplate() != other.hasNameplate()) return false; + if (hasNameplate()) { + if (!getNameplate() + .equals(other.getNameplate())) return false; + } + if (hasLiveFansGroupState() != other.hasLiveFansGroupState()) return false; + if (hasLiveFansGroupState()) { + if (!getLiveFansGroupState() + .equals(other.getLiveFansGroupState())) return false; + } + if (getWealthGrade() + != other.getWealthGrade()) return false; + if (!getBadgeKey() + .equals(other.getBadgeKey())) return false; + if (!getLiveAudienceState11List() + .equals(other.getLiveAudienceState11List())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ISFROMFANSTOP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFromFansTop()); + hash = (37 * hash) + ISKOI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsKoi()); + hash = (37 * hash) + ASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + assistantType_; + hash = (37 * hash) + FANSGROUPINTIMACYLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getFansGroupIntimacyLevel(); + if (hasNameplate()) { + hash = (37 * hash) + NAMEPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNameplate().hashCode(); + } + if (hasLiveFansGroupState()) { + hash = (37 * hash) + LIVEFANSGROUPSTATE_FIELD_NUMBER; + hash = (53 * hash) + getLiveFansGroupState().hashCode(); + } + hash = (37 * hash) + WEALTHGRADE_FIELD_NUMBER; + hash = (53 * hash) + getWealthGrade(); + hash = (37 * hash) + BADGEKEY_FIELD_NUMBER; + hash = (53 * hash) + getBadgeKey().hashCode(); + if (getLiveAudienceState11Count() > 0) { + hash = (37 * hash) + LIVEAUDIENCESTATE_11_FIELD_NUMBER; + hash = (53 * hash) + getLiveAudienceState11List().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 LiveAudienceState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:LiveAudienceState) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getNameplateFieldBuilder(); + getLiveFansGroupStateFieldBuilder(); + getLiveAudienceState11FieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + isFromFansTop_ = false; + isKoi_ = false; + assistantType_ = 0; + fansGroupIntimacyLevel_ = 0; + nameplate_ = null; + if (nameplateBuilder_ != null) { + nameplateBuilder_.dispose(); + nameplateBuilder_ = null; + } + liveFansGroupState_ = null; + if (liveFansGroupStateBuilder_ != null) { + liveFansGroupStateBuilder_.dispose(); + liveFansGroupStateBuilder_ = null; + } + wealthGrade_ = 0; + badgeKey_ = ""; + if (liveAudienceState11Builder_ == null) { + liveAudienceState11_ = java.util.Collections.emptyList(); + } else { + liveAudienceState11_ = null; + liveAudienceState11Builder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState result) { + if (liveAudienceState11Builder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + liveAudienceState11_ = java.util.Collections.unmodifiableList(liveAudienceState11_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.liveAudienceState11_ = liveAudienceState11_; + } else { + result.liveAudienceState11_ = liveAudienceState11Builder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.isFromFansTop_ = isFromFansTop_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isKoi_ = isKoi_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assistantType_ = assistantType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.fansGroupIntimacyLevel_ = fansGroupIntimacyLevel_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nameplate_ = nameplateBuilder_ == null + ? nameplate_ + : nameplateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.liveFansGroupState_ = liveFansGroupStateBuilder_ == null + ? liveFansGroupState_ + : liveFansGroupStateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.wealthGrade_ = wealthGrade_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.badgeKey_ = badgeKey_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance()) return this; + if (other.getIsFromFansTop() != false) { + setIsFromFansTop(other.getIsFromFansTop()); + } + if (other.getIsKoi() != false) { + setIsKoi(other.getIsKoi()); + } + if (other.assistantType_ != 0) { + setAssistantTypeValue(other.getAssistantTypeValue()); + } + if (other.getFansGroupIntimacyLevel() != 0) { + setFansGroupIntimacyLevel(other.getFansGroupIntimacyLevel()); + } + if (other.hasNameplate()) { + mergeNameplate(other.getNameplate()); + } + if (other.hasLiveFansGroupState()) { + mergeLiveFansGroupState(other.getLiveFansGroupState()); + } + if (other.getWealthGrade() != 0) { + setWealthGrade(other.getWealthGrade()); + } + if (!other.getBadgeKey().isEmpty()) { + badgeKey_ = other.badgeKey_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (liveAudienceState11Builder_ == null) { + if (!other.liveAudienceState11_.isEmpty()) { + if (liveAudienceState11_.isEmpty()) { + liveAudienceState11_ = other.liveAudienceState11_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.addAll(other.liveAudienceState11_); + } + onChanged(); + } + } else { + if (!other.liveAudienceState11_.isEmpty()) { + if (liveAudienceState11Builder_.isEmpty()) { + liveAudienceState11Builder_.dispose(); + liveAudienceState11Builder_ = null; + liveAudienceState11_ = other.liveAudienceState11_; + bitField0_ = (bitField0_ & ~0x00000100); + liveAudienceState11Builder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLiveAudienceState11FieldBuilder() : null; + } else { + liveAudienceState11Builder_.addAllMessages(other.liveAudienceState11_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + isFromFansTop_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + isKoi_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + assistantType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + fansGroupIntimacyLevel_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getNameplateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getLiveFansGroupStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + wealthGrade_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + badgeKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 90: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.parser(), + extensionRegistry); + if (liveAudienceState11Builder_ == null) { + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.add(m); + } else { + liveAudienceState11Builder_.addMessage(m); + } + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean isFromFansTop_ ; + /** + * bool isFromFansTop = 1; + * @return The isFromFansTop. + */ + @java.lang.Override + public boolean getIsFromFansTop() { + return isFromFansTop_; + } + /** + * bool isFromFansTop = 1; + * @param value The isFromFansTop to set. + * @return This builder for chaining. + */ + public Builder setIsFromFansTop(boolean value) { + + isFromFansTop_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool isFromFansTop = 1; + * @return This builder for chaining. + */ + public Builder clearIsFromFansTop() { + bitField0_ = (bitField0_ & ~0x00000001); + isFromFansTop_ = false; + onChanged(); + return this; + } + + private boolean isKoi_ ; + /** + * bool isKoi = 2; + * @return The isKoi. + */ + @java.lang.Override + public boolean getIsKoi() { + return isKoi_; + } + /** + * bool isKoi = 2; + * @param value The isKoi to set. + * @return This builder for chaining. + */ + public Builder setIsKoi(boolean value) { + + isKoi_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool isKoi = 2; + * @return This builder for chaining. + */ + public Builder clearIsKoi() { + bitField0_ = (bitField0_ & ~0x00000002); + isKoi_ = false; + onChanged(); + return this; + } + + private int assistantType_ = 0; + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @return The enum numeric value on the wire for assistantType. + */ + @java.lang.Override public int getAssistantTypeValue() { + return assistantType_; + } + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @param value The enum numeric value on the wire for assistantType to set. + * @return This builder for chaining. + */ + public Builder setAssistantTypeValue(int value) { + assistantType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @return The assistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType getAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.forNumber(assistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNRECOGNIZED : result; + } + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @param value The assistantType to set. + * @return This builder for chaining. + */ + public Builder setAssistantType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + assistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .LiveAudienceState.AssistantType assistantType = 3; + * @return This builder for chaining. + */ + public Builder clearAssistantType() { + bitField0_ = (bitField0_ & ~0x00000004); + assistantType_ = 0; + onChanged(); + return this; + } + + private int fansGroupIntimacyLevel_ ; + /** + * uint32 fansGroupIntimacyLevel = 4; + * @return The fansGroupIntimacyLevel. + */ + @java.lang.Override + public int getFansGroupIntimacyLevel() { + return fansGroupIntimacyLevel_; + } + /** + * uint32 fansGroupIntimacyLevel = 4; + * @param value The fansGroupIntimacyLevel to set. + * @return This builder for chaining. + */ + public Builder setFansGroupIntimacyLevel(int value) { + + fansGroupIntimacyLevel_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 fansGroupIntimacyLevel = 4; + * @return This builder for chaining. + */ + public Builder clearFansGroupIntimacyLevel() { + bitField0_ = (bitField0_ & ~0x00000008); + fansGroupIntimacyLevel_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate nameplate_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder> nameplateBuilder_; + /** + * .GzoneNameplate nameplate = 5; + * @return Whether the nameplate field is set. + */ + public boolean hasNameplate() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .GzoneNameplate nameplate = 5; + * @return The nameplate. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getNameplate() { + if (nameplateBuilder_ == null) { + return nameplate_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } else { + return nameplateBuilder_.getMessage(); + } + } + /** + * .GzoneNameplate nameplate = 5; + */ + public Builder setNameplate(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate value) { + if (nameplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nameplate_ = value; + } else { + nameplateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .GzoneNameplate nameplate = 5; + */ + public Builder setNameplate( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder builderForValue) { + if (nameplateBuilder_ == null) { + nameplate_ = builderForValue.build(); + } else { + nameplateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .GzoneNameplate nameplate = 5; + */ + public Builder mergeNameplate(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate value) { + if (nameplateBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + nameplate_ != null && + nameplate_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance()) { + getNameplateBuilder().mergeFrom(value); + } else { + nameplate_ = value; + } + } else { + nameplateBuilder_.mergeFrom(value); + } + if (nameplate_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .GzoneNameplate nameplate = 5; + */ + public Builder clearNameplate() { + bitField0_ = (bitField0_ & ~0x00000010); + nameplate_ = null; + if (nameplateBuilder_ != null) { + nameplateBuilder_.dispose(); + nameplateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .GzoneNameplate nameplate = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder getNameplateBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getNameplateFieldBuilder().getBuilder(); + } + /** + * .GzoneNameplate nameplate = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder getNameplateOrBuilder() { + if (nameplateBuilder_ != null) { + return nameplateBuilder_.getMessageOrBuilder(); + } else { + return nameplate_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } + } + /** + * .GzoneNameplate nameplate = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder> + getNameplateFieldBuilder() { + if (nameplateBuilder_ == null) { + nameplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder>( + getNameplate(), + getParentForChildren(), + isClean()); + nameplate_ = null; + } + return nameplateBuilder_; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState liveFansGroupState_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder> liveFansGroupStateBuilder_; + /** + * .LiveFansGroupState liveFansGroupState = 6; + * @return Whether the liveFansGroupState field is set. + */ + public boolean hasLiveFansGroupState() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + * @return The liveFansGroupState. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getLiveFansGroupState() { + if (liveFansGroupStateBuilder_ == null) { + return liveFansGroupState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } else { + return liveFansGroupStateBuilder_.getMessage(); + } + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + public Builder setLiveFansGroupState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState value) { + if (liveFansGroupStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + liveFansGroupState_ = value; + } else { + liveFansGroupStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + public Builder setLiveFansGroupState( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder builderForValue) { + if (liveFansGroupStateBuilder_ == null) { + liveFansGroupState_ = builderForValue.build(); + } else { + liveFansGroupStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + public Builder mergeLiveFansGroupState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState value) { + if (liveFansGroupStateBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + liveFansGroupState_ != null && + liveFansGroupState_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance()) { + getLiveFansGroupStateBuilder().mergeFrom(value); + } else { + liveFansGroupState_ = value; + } + } else { + liveFansGroupStateBuilder_.mergeFrom(value); + } + if (liveFansGroupState_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + public Builder clearLiveFansGroupState() { + bitField0_ = (bitField0_ & ~0x00000020); + liveFansGroupState_ = null; + if (liveFansGroupStateBuilder_ != null) { + liveFansGroupStateBuilder_.dispose(); + liveFansGroupStateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder getLiveFansGroupStateBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getLiveFansGroupStateFieldBuilder().getBuilder(); + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder getLiveFansGroupStateOrBuilder() { + if (liveFansGroupStateBuilder_ != null) { + return liveFansGroupStateBuilder_.getMessageOrBuilder(); + } else { + return liveFansGroupState_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } + } + /** + * .LiveFansGroupState liveFansGroupState = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder> + getLiveFansGroupStateFieldBuilder() { + if (liveFansGroupStateBuilder_ == null) { + liveFansGroupStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder>( + getLiveFansGroupState(), + getParentForChildren(), + isClean()); + liveFansGroupState_ = null; + } + return liveFansGroupStateBuilder_; + } + + private int wealthGrade_ ; + /** + * uint32 wealthGrade = 7; + * @return The wealthGrade. + */ + @java.lang.Override + public int getWealthGrade() { + return wealthGrade_; + } + /** + * uint32 wealthGrade = 7; + * @param value The wealthGrade to set. + * @return This builder for chaining. + */ + public Builder setWealthGrade(int value) { + + wealthGrade_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * uint32 wealthGrade = 7; + * @return This builder for chaining. + */ + public Builder clearWealthGrade() { + bitField0_ = (bitField0_ & ~0x00000040); + wealthGrade_ = 0; + onChanged(); + return this; + } + + private java.lang.Object badgeKey_ = ""; + /** + * string badgeKey = 8; + * @return The badgeKey. + */ + public java.lang.String getBadgeKey() { + java.lang.Object ref = badgeKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string badgeKey = 8; + * @return The bytes for badgeKey. + */ + public com.google.protobuf.ByteString + getBadgeKeyBytes() { + java.lang.Object ref = badgeKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string badgeKey = 8; + * @param value The badgeKey to set. + * @return This builder for chaining. + */ + public Builder setBadgeKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + badgeKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * string badgeKey = 8; + * @return This builder for chaining. + */ + public Builder clearBadgeKey() { + badgeKey_ = getDefaultInstance().getBadgeKey(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * string badgeKey = 8; + * @param value The bytes for badgeKey to set. + * @return This builder for chaining. + */ + public Builder setBadgeKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + badgeKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.util.List liveAudienceState11_ = + java.util.Collections.emptyList(); + private void ensureLiveAudienceState11IsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + liveAudienceState11_ = new java.util.ArrayList(liveAudienceState11_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11OrBuilder> liveAudienceState11Builder_; + + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public java.util.List getLiveAudienceState11List() { + if (liveAudienceState11Builder_ == null) { + return java.util.Collections.unmodifiableList(liveAudienceState11_); + } else { + return liveAudienceState11Builder_.getMessageList(); + } + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public int getLiveAudienceState11Count() { + if (liveAudienceState11Builder_ == null) { + return liveAudienceState11_.size(); + } else { + return liveAudienceState11Builder_.getCount(); + } + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 getLiveAudienceState11(int index) { + if (liveAudienceState11Builder_ == null) { + return liveAudienceState11_.get(index); + } else { + return liveAudienceState11Builder_.getMessage(index); + } + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder setLiveAudienceState11( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 value) { + if (liveAudienceState11Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.set(index, value); + onChanged(); + } else { + liveAudienceState11Builder_.setMessage(index, value); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder setLiveAudienceState11( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder builderForValue) { + if (liveAudienceState11Builder_ == null) { + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.set(index, builderForValue.build()); + onChanged(); + } else { + liveAudienceState11Builder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder addLiveAudienceState11(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 value) { + if (liveAudienceState11Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.add(value); + onChanged(); + } else { + liveAudienceState11Builder_.addMessage(value); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder addLiveAudienceState11( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11 value) { + if (liveAudienceState11Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.add(index, value); + onChanged(); + } else { + liveAudienceState11Builder_.addMessage(index, value); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder addLiveAudienceState11( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder builderForValue) { + if (liveAudienceState11Builder_ == null) { + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.add(builderForValue.build()); + onChanged(); + } else { + liveAudienceState11Builder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder addLiveAudienceState11( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder builderForValue) { + if (liveAudienceState11Builder_ == null) { + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.add(index, builderForValue.build()); + onChanged(); + } else { + liveAudienceState11Builder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder addAllLiveAudienceState11( + java.lang.Iterable values) { + if (liveAudienceState11Builder_ == null) { + ensureLiveAudienceState11IsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, liveAudienceState11_); + onChanged(); + } else { + liveAudienceState11Builder_.addAllMessages(values); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder clearLiveAudienceState11() { + if (liveAudienceState11Builder_ == null) { + liveAudienceState11_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + liveAudienceState11Builder_.clear(); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public Builder removeLiveAudienceState11(int index) { + if (liveAudienceState11Builder_ == null) { + ensureLiveAudienceState11IsMutable(); + liveAudienceState11_.remove(index); + onChanged(); + } else { + liveAudienceState11Builder_.remove(index); + } + return this; + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder getLiveAudienceState11Builder( + int index) { + return getLiveAudienceState11FieldBuilder().getBuilder(index); + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11OrBuilder getLiveAudienceState11OrBuilder( + int index) { + if (liveAudienceState11Builder_ == null) { + return liveAudienceState11_.get(index); } else { + return liveAudienceState11Builder_.getMessageOrBuilder(index); + } + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public java.util.List + getLiveAudienceState11OrBuilderList() { + if (liveAudienceState11Builder_ != null) { + return liveAudienceState11Builder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(liveAudienceState11_); + } + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder addLiveAudienceState11Builder() { + return getLiveAudienceState11FieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.getDefaultInstance()); + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder addLiveAudienceState11Builder( + int index) { + return getLiveAudienceState11FieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.getDefaultInstance()); + } + /** + * repeated .LiveAudienceState.LiveAudienceState_11 liveAudienceState_11 = 11; + */ + public java.util.List + getLiveAudienceState11BuilderList() { + return getLiveAudienceState11FieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11OrBuilder> + getLiveAudienceState11FieldBuilder() { + if (liveAudienceState11Builder_ == null) { + liveAudienceState11Builder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.LiveAudienceState_11OrBuilder>( + liveAudienceState11_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + liveAudienceState11_ = null; + } + return liveAudienceState11Builder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveAudienceState) + } + + // @@protoc_insertion_point(class_scope:LiveAudienceState) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LiveAudienceState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveAudienceState_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveAudienceState_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveAudienceState_LiveAudienceState_11_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveAudienceState_LiveAudienceState_11_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_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\027LiveAudienceState.proto\032\024GzoneNameplat" + + "e.proto\032\030LiveFansGroupState.proto\"\322\004\n\021Li" + + "veAudienceState\022\025\n\risFromFansTop\030\001 \001(\010\022\r" + + "\n\005isKoi\030\002 \001(\010\0227\n\rassistantType\030\003 \001(\0162 .L" + + "iveAudienceState.AssistantType\022\036\n\026fansGr" + + "oupIntimacyLevel\030\004 \001(\r\022\"\n\tnameplate\030\005 \001(" + + "\0132\017.GzoneNameplate\022/\n\022liveFansGroupState" + + "\030\006 \001(\0132\023.LiveFansGroupState\022\023\n\013wealthGra" + + "de\030\007 \001(\r\022\020\n\010badgeKey\030\010 \001(\t\022E\n\024liveAudien" + + "ceState_11\030\013 \003(\0132\'.LiveAudienceState.Liv" + + "eAudienceState_11\032\266\001\n\024LiveAudienceState_" + + "11\022^\n\026liveAudienceState_11_1\030\001 \001(\0132>.Liv" + + "eAudienceState.LiveAudienceState_11.Live" + + "AudienceState_11_1\032>\n\026LiveAudienceState_" + + "11_1\022\021\n\tbadgeIcon\030\002 \001(\t\022\021\n\tbadgeName\030\004 \001" + + "(\t\"B\n\rAssistantType\022\032\n\026UNKNOWN_ASSISTANT" + + "_TYPE\020\000\022\t\n\005SUPER\020\001\022\n\n\006JUNIOR\020\002B<\n:tech.o" + + "rdinaryroad.live.chat.client.codec.kuais" + + "hou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.getDescriptor(), + }); + internal_static_LiveAudienceState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_LiveAudienceState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveAudienceState_descriptor, + new java.lang.String[] { "IsFromFansTop", "IsKoi", "AssistantType", "FansGroupIntimacyLevel", "Nameplate", "LiveFansGroupState", "WealthGrade", "BadgeKey", "LiveAudienceState11", }); + internal_static_LiveAudienceState_LiveAudienceState_11_descriptor = + internal_static_LiveAudienceState_descriptor.getNestedTypes().get(0); + internal_static_LiveAudienceState_LiveAudienceState_11_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveAudienceState_LiveAudienceState_11_descriptor, + new java.lang.String[] { "LiveAudienceState111", }); + internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_descriptor = + internal_static_LiveAudienceState_LiveAudienceState_11_descriptor.getNestedTypes().get(0); + internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveAudienceState_LiveAudienceState_11_LiveAudienceState_11_1_descriptor, + new java.lang.String[] { "BadgeIcon", "BadgeName", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.GzoneNameplateOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveCdnNodeViewOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveCdnNodeViewOuterClass.java new file mode 100644 index 0000000..752ab1c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveCdnNodeViewOuterClass.java @@ -0,0 +1,847 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: LiveCdnNodeView.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class LiveCdnNodeViewOuterClass { + private LiveCdnNodeViewOuterClass() {} + 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 LiveCdnNodeViewOrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveCdnNodeView) + com.google.protobuf.MessageOrBuilder { + + /** + * string cdn = 1; + * @return The cdn. + */ + java.lang.String getCdn(); + /** + * string cdn = 1; + * @return The bytes for cdn. + */ + com.google.protobuf.ByteString + getCdnBytes(); + + /** + * string url = 2; + * @return The url. + */ + java.lang.String getUrl(); + /** + * string url = 2; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + * bool freeTraffic = 3; + * @return The freeTraffic. + */ + boolean getFreeTraffic(); + } + /** + * Protobuf type {@code LiveCdnNodeView} + */ + public static final class LiveCdnNodeView extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveCdnNodeView) + LiveCdnNodeViewOrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveCdnNodeView.newBuilder() to construct. + private LiveCdnNodeView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LiveCdnNodeView() { + cdn_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveCdnNodeView(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder.class); + } + + public static final int CDN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cdn_ = ""; + /** + * string cdn = 1; + * @return The cdn. + */ + @java.lang.Override + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } + } + /** + * string cdn = 1; + * @return The bytes for cdn. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FREETRAFFIC_FIELD_NUMBER = 3; + private boolean freeTraffic_ = false; + /** + * bool freeTraffic = 3; + * @return The freeTraffic. + */ + @java.lang.Override + public boolean getFreeTraffic() { + return freeTraffic_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + if (freeTraffic_ != false) { + output.writeBool(3, freeTraffic_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + if (freeTraffic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, freeTraffic_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView) obj; + + if (!getCdn() + .equals(other.getCdn())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (getFreeTraffic() + != other.getFreeTraffic()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CDN_FIELD_NUMBER; + hash = (53 * hash) + getCdn().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + FREETRAFFIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFreeTraffic()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 LiveCdnNodeView} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:LiveCdnNodeView) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cdn_ = ""; + url_ = ""; + freeTraffic_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cdn_ = cdn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.freeTraffic_ = freeTraffic_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance()) return this; + if (!other.getCdn().isEmpty()) { + cdn_ = other.cdn_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFreeTraffic() != false) { + setFreeTraffic(other.getFreeTraffic()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cdn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + freeTraffic_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cdn_ = ""; + /** + * string cdn = 1; + * @return The cdn. + */ + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cdn = 1; + * @return The bytes for cdn. + */ + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cdn = 1; + * @param value The cdn to set. + * @return This builder for chaining. + */ + public Builder setCdn( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string cdn = 1; + * @return This builder for chaining. + */ + public Builder clearCdn() { + cdn_ = getDefaultInstance().getCdn(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string cdn = 1; + * @param value The bytes for cdn to set. + * @return This builder for chaining. + */ + public Builder setCdnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + * string url = 2; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string url = 2; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string url = 2; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string url = 2; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string url = 2; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean freeTraffic_ ; + /** + * bool freeTraffic = 3; + * @return The freeTraffic. + */ + @java.lang.Override + public boolean getFreeTraffic() { + return freeTraffic_; + } + /** + * bool freeTraffic = 3; + * @param value The freeTraffic to set. + * @return This builder for chaining. + */ + public Builder setFreeTraffic(boolean value) { + + freeTraffic_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool freeTraffic = 3; + * @return This builder for chaining. + */ + public Builder clearFreeTraffic() { + bitField0_ = (bitField0_ & ~0x00000004); + freeTraffic_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveCdnNodeView) + } + + // @@protoc_insertion_point(class_scope:LiveCdnNodeView) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LiveCdnNodeView parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveCdnNodeView_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveCdnNodeView_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\025LiveCdnNodeView.proto\"@\n\017LiveCdnNodeVi" + + "ew\022\013\n\003cdn\030\001 \001(\t\022\013\n\003url\030\002 \001(\t\022\023\n\013freeTraf" + + "fic\030\003 \001(\010B<\n:tech.ordinaryroad.live.chat" + + ".client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_LiveCdnNodeView_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_LiveCdnNodeView_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveCdnNodeView_descriptor, + new java.lang.String[] { "Cdn", "Url", "FreeTraffic", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveFansGroupStateOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveFansGroupStateOuterClass.java new file mode 100644 index 0000000..af15801 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/LiveFansGroupStateOuterClass.java @@ -0,0 +1,623 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: LiveFansGroupState.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class LiveFansGroupStateOuterClass { + private LiveFansGroupStateOuterClass() {} + 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 LiveFansGroupStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveFansGroupState) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 intimacyLevel = 1; + * @return The intimacyLevel. + */ + int getIntimacyLevel(); + + /** + * uint32 enterRoomSpecialEffect = 2; + * @return The enterRoomSpecialEffect. + */ + int getEnterRoomSpecialEffect(); + } + /** + * Protobuf type {@code LiveFansGroupState} + */ + public static final class LiveFansGroupState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveFansGroupState) + LiveFansGroupStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveFansGroupState.newBuilder() to construct. + private LiveFansGroupState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LiveFansGroupState() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveFansGroupState(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder.class); + } + + public static final int INTIMACYLEVEL_FIELD_NUMBER = 1; + private int intimacyLevel_ = 0; + /** + * uint32 intimacyLevel = 1; + * @return The intimacyLevel. + */ + @java.lang.Override + public int getIntimacyLevel() { + return intimacyLevel_; + } + + public static final int ENTERROOMSPECIALEFFECT_FIELD_NUMBER = 2; + private int enterRoomSpecialEffect_ = 0; + /** + * uint32 enterRoomSpecialEffect = 2; + * @return The enterRoomSpecialEffect. + */ + @java.lang.Override + public int getEnterRoomSpecialEffect() { + return enterRoomSpecialEffect_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (intimacyLevel_ != 0) { + output.writeUInt32(1, intimacyLevel_); + } + if (enterRoomSpecialEffect_ != 0) { + output.writeUInt32(2, enterRoomSpecialEffect_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (intimacyLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, intimacyLevel_); + } + if (enterRoomSpecialEffect_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, enterRoomSpecialEffect_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState) obj; + + if (getIntimacyLevel() + != other.getIntimacyLevel()) return false; + if (getEnterRoomSpecialEffect() + != other.getEnterRoomSpecialEffect()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INTIMACYLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getIntimacyLevel(); + hash = (37 * hash) + ENTERROOMSPECIALEFFECT_FIELD_NUMBER; + hash = (53 * hash) + getEnterRoomSpecialEffect(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 LiveFansGroupState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:LiveFansGroupState) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + intimacyLevel_ = 0; + enterRoomSpecialEffect_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.intimacyLevel_ = intimacyLevel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enterRoomSpecialEffect_ = enterRoomSpecialEffect_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance()) return this; + if (other.getIntimacyLevel() != 0) { + setIntimacyLevel(other.getIntimacyLevel()); + } + if (other.getEnterRoomSpecialEffect() != 0) { + setEnterRoomSpecialEffect(other.getEnterRoomSpecialEffect()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + intimacyLevel_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + enterRoomSpecialEffect_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int intimacyLevel_ ; + /** + * uint32 intimacyLevel = 1; + * @return The intimacyLevel. + */ + @java.lang.Override + public int getIntimacyLevel() { + return intimacyLevel_; + } + /** + * uint32 intimacyLevel = 1; + * @param value The intimacyLevel to set. + * @return This builder for chaining. + */ + public Builder setIntimacyLevel(int value) { + + intimacyLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 intimacyLevel = 1; + * @return This builder for chaining. + */ + public Builder clearIntimacyLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + intimacyLevel_ = 0; + onChanged(); + return this; + } + + private int enterRoomSpecialEffect_ ; + /** + * uint32 enterRoomSpecialEffect = 2; + * @return The enterRoomSpecialEffect. + */ + @java.lang.Override + public int getEnterRoomSpecialEffect() { + return enterRoomSpecialEffect_; + } + /** + * uint32 enterRoomSpecialEffect = 2; + * @param value The enterRoomSpecialEffect to set. + * @return This builder for chaining. + */ + public Builder setEnterRoomSpecialEffect(int value) { + + enterRoomSpecialEffect_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 enterRoomSpecialEffect = 2; + * @return This builder for chaining. + */ + public Builder clearEnterRoomSpecialEffect() { + bitField0_ = (bitField0_ & ~0x00000002); + enterRoomSpecialEffect_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveFansGroupState) + } + + // @@protoc_insertion_point(class_scope:LiveFansGroupState) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LiveFansGroupState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveFansGroupState_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveFansGroupState_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\030LiveFansGroupState.proto\"K\n\022LiveFansGr" + + "oupState\022\025\n\rintimacyLevel\030\001 \001(\r\022\036\n\026enter" + + "RoomSpecialEffect\030\002 \001(\rB<\n:tech.ordinary" + + "road.live.chat.client.codec.kuaishou.pro" + + "tobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_LiveFansGroupState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_LiveFansGroupState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveFansGroupState_descriptor, + new java.lang.String[] { "IntimacyLevel", "EnterRoomSpecialEffect", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PSHostInfoOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PSHostInfoOuterClass.java new file mode 100644 index 0000000..4c09108 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PSHostInfoOuterClass.java @@ -0,0 +1,698 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PSHostInfo.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class PSHostInfoOuterClass { + private PSHostInfoOuterClass() {} + 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 PSHostInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:PSHostInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string ip = 1; + * @return The ip. + */ + java.lang.String getIp(); + /** + * string ip = 1; + * @return The bytes for ip. + */ + com.google.protobuf.ByteString + getIpBytes(); + + /** + * int32 port = 2; + * @return The port. + */ + int getPort(); + } + /** + * Protobuf type {@code PSHostInfo} + */ + public static final class PSHostInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PSHostInfo) + PSHostInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PSHostInfo.newBuilder() to construct. + private PSHostInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PSHostInfo() { + ip_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PSHostInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.Builder.class); + } + + public static final int IP_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object ip_ = ""; + /** + * string ip = 1; + * @return The ip. + */ + @java.lang.Override + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } + } + /** + * string ip = 1; + * @return The bytes for ip. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_ = 0; + /** + * int32 port = 2; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ip_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ip_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, port_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo) obj; + + if (!getIp() + .equals(other.getIp())) return false; + if (getPort() + != other.getPort()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IP_FIELD_NUMBER; + hash = (53 * hash) + getIp().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 PSHostInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:PSHostInfo) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ip_ = ""; + port_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ip_ = ip_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.port_ = port_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.getDefaultInstance()) return this; + if (!other.getIp().isEmpty()) { + ip_ = other.ip_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + ip_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object ip_ = ""; + /** + * string ip = 1; + * @return The ip. + */ + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string ip = 1; + * @return The bytes for ip. + */ + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string ip = 1; + * @param value The ip to set. + * @return This builder for chaining. + */ + public Builder setIp( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ip_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string ip = 1; + * @return This builder for chaining. + */ + public Builder clearIp() { + ip_ = getDefaultInstance().getIp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string ip = 1; + * @param value The bytes for ip to set. + * @return This builder for chaining. + */ + public Builder setIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ip_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int port_ ; + /** + * int32 port = 2; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * int32 port = 2; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 port = 2; + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PSHostInfo) + } + + // @@protoc_insertion_point(class_scope:PSHostInfo) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PSHostInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PSHostInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PSHostInfo_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\020PSHostInfo.proto\"&\n\nPSHostInfo\022\n\n\002ip\030\001" + + " \001(\t\022\014\n\004port\030\002 \001(\005B<\n:tech.ordinaryroad." + + "live.chat.client.codec.kuaishou.protobuf" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_PSHostInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_PSHostInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_PSHostInfo_descriptor, + new java.lang.String[] { "Ip", "Port", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PayloadTypeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PayloadTypeOuterClass.java new file mode 100644 index 0000000..dba9fe2 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PayloadTypeOuterClass.java @@ -0,0 +1,709 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PayloadType.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class PayloadTypeOuterClass { + private PayloadTypeOuterClass() {} + 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 PayloadType} + */ + public enum PayloadType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * CS_HEARTBEAT = 1; + */ + CS_HEARTBEAT(1), + /** + * CS_ERROR = 3; + */ + CS_ERROR(3), + /** + * CS_PING = 4; + */ + CS_PING(4), + /** + * PS_HOST_INFO = 51; + */ + PS_HOST_INFO(51), + /** + * SC_HEARTBEAT_ACK = 101; + */ + SC_HEARTBEAT_ACK(101), + /** + * SC_ECHO = 102; + */ + SC_ECHO(102), + /** + * SC_ERROR = 103; + */ + SC_ERROR(103), + /** + * SC_PING_ACK = 104; + */ + SC_PING_ACK(104), + /** + * SC_INFO = 105; + */ + SC_INFO(105), + /** + * CS_ENTER_ROOM = 200; + */ + CS_ENTER_ROOM(200), + /** + * CS_USER_PAUSE = 201; + */ + CS_USER_PAUSE(201), + /** + * CS_USER_EXIT = 202; + */ + CS_USER_EXIT(202), + /** + * CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203; + */ + CS_AUTHOR_PUSH_TRAFFIC_ZERO(203), + /** + * CS_HORSE_RACING = 204; + */ + CS_HORSE_RACING(204), + /** + * CS_RACE_LOSE = 205; + */ + CS_RACE_LOSE(205), + /** + * CS_VOIP_SIGNAL = 206; + */ + CS_VOIP_SIGNAL(206), + /** + * SC_ENTER_ROOM_ACK = 300; + */ + SC_ENTER_ROOM_ACK(300), + /** + * SC_AUTHOR_PAUSE = 301; + */ + SC_AUTHOR_PAUSE(301), + /** + * SC_AUTHOR_RESUME = 302; + */ + SC_AUTHOR_RESUME(302), + /** + * SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303; + */ + SC_AUTHOR_PUSH_TRAFFIC_ZERO(303), + /** + * SC_AUTHOR_HEARTBEAT_MISS = 304; + */ + SC_AUTHOR_HEARTBEAT_MISS(304), + /** + * SC_PIP_STARTED = 305; + */ + SC_PIP_STARTED(305), + /** + * SC_PIP_ENDED = 306; + */ + SC_PIP_ENDED(306), + /** + * SC_HORSE_RACING_ACK = 307; + */ + SC_HORSE_RACING_ACK(307), + /** + * SC_VOIP_SIGNAL = 308; + */ + SC_VOIP_SIGNAL(308), + /** + * SC_FEED_PUSH = 310; + */ + SC_FEED_PUSH(310), + /** + * SC_ASSISTANT_STATUS = 311; + */ + SC_ASSISTANT_STATUS(311), + /** + * SC_REFRESH_WALLET = 312; + */ + SC_REFRESH_WALLET(312), + /** + * SC_LIVE_CHAT_CALL = 320; + */ + SC_LIVE_CHAT_CALL(320), + /** + * SC_LIVE_CHAT_CALL_ACCEPTED = 321; + */ + SC_LIVE_CHAT_CALL_ACCEPTED(321), + /** + * SC_LIVE_CHAT_CALL_REJECTED = 322; + */ + SC_LIVE_CHAT_CALL_REJECTED(322), + /** + * SC_LIVE_CHAT_READY = 323; + */ + SC_LIVE_CHAT_READY(323), + /** + * SC_LIVE_CHAT_GUEST_END = 324; + */ + SC_LIVE_CHAT_GUEST_END(324), + /** + * SC_LIVE_CHAT_ENDED = 325; + */ + SC_LIVE_CHAT_ENDED(325), + /** + * SC_RENDERING_MAGIC_FACE_DISABLE = 326; + */ + SC_RENDERING_MAGIC_FACE_DISABLE(326), + /** + * SC_RENDERING_MAGIC_FACE_ENABLE = 327; + */ + SC_RENDERING_MAGIC_FACE_ENABLE(327), + /** + * SC_RED_PACK_FEED = 330; + */ + SC_RED_PACK_FEED(330), + /** + * SC_LIVE_WATCHING_LIST = 340; + */ + SC_LIVE_WATCHING_LIST(340), + /** + * SC_LIVE_QUIZ_QUESTION_ASKED = 350; + */ + SC_LIVE_QUIZ_QUESTION_ASKED(350), + /** + * SC_LIVE_QUIZ_QUESTION_REVIEWED = 351; + */ + SC_LIVE_QUIZ_QUESTION_REVIEWED(351), + /** + * SC_LIVE_QUIZ_SYNC = 352; + */ + SC_LIVE_QUIZ_SYNC(352), + /** + * SC_LIVE_QUIZ_ENDED = 353; + */ + SC_LIVE_QUIZ_ENDED(353), + /** + * SC_LIVE_QUIZ_WINNERS = 354; + */ + SC_LIVE_QUIZ_WINNERS(354), + /** + * SC_SUSPECTED_VIOLATION = 355; + */ + SC_SUSPECTED_VIOLATION(355), + /** + * SC_SHOP_OPENED = 360; + */ + SC_SHOP_OPENED(360), + /** + * SC_SHOP_CLOSED = 361; + */ + SC_SHOP_CLOSED(361), + /** + * SC_GUESS_OPENED = 370; + */ + SC_GUESS_OPENED(370), + /** + * SC_GUESS_CLOSED = 371; + */ + SC_GUESS_CLOSED(371), + /** + * SC_PK_INVITATION = 380; + */ + SC_PK_INVITATION(380), + /** + * SC_PK_STATISTIC = 381; + */ + SC_PK_STATISTIC(381), + /** + * SC_RIDDLE_OPENED = 390; + */ + SC_RIDDLE_OPENED(390), + /** + * SC_RIDDLE_CLOESED = 391; + */ + SC_RIDDLE_CLOESED(391), + /** + * SC_RIDE_CHANGED = 412; + */ + SC_RIDE_CHANGED(412), + /** + * SC_BET_CHANGED = 441; + */ + SC_BET_CHANGED(441), + /** + * SC_BET_CLOSED = 442; + */ + SC_BET_CLOSED(442), + /** + * SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645; + */ + SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE(645), + /** + * SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE = 758; + */ + SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE(758), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * CS_HEARTBEAT = 1; + */ + public static final int CS_HEARTBEAT_VALUE = 1; + /** + * CS_ERROR = 3; + */ + public static final int CS_ERROR_VALUE = 3; + /** + * CS_PING = 4; + */ + public static final int CS_PING_VALUE = 4; + /** + * PS_HOST_INFO = 51; + */ + public static final int PS_HOST_INFO_VALUE = 51; + /** + * SC_HEARTBEAT_ACK = 101; + */ + public static final int SC_HEARTBEAT_ACK_VALUE = 101; + /** + * SC_ECHO = 102; + */ + public static final int SC_ECHO_VALUE = 102; + /** + * SC_ERROR = 103; + */ + public static final int SC_ERROR_VALUE = 103; + /** + * SC_PING_ACK = 104; + */ + public static final int SC_PING_ACK_VALUE = 104; + /** + * SC_INFO = 105; + */ + public static final int SC_INFO_VALUE = 105; + /** + * CS_ENTER_ROOM = 200; + */ + public static final int CS_ENTER_ROOM_VALUE = 200; + /** + * CS_USER_PAUSE = 201; + */ + public static final int CS_USER_PAUSE_VALUE = 201; + /** + * CS_USER_EXIT = 202; + */ + public static final int CS_USER_EXIT_VALUE = 202; + /** + * CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203; + */ + public static final int CS_AUTHOR_PUSH_TRAFFIC_ZERO_VALUE = 203; + /** + * CS_HORSE_RACING = 204; + */ + public static final int CS_HORSE_RACING_VALUE = 204; + /** + * CS_RACE_LOSE = 205; + */ + public static final int CS_RACE_LOSE_VALUE = 205; + /** + * CS_VOIP_SIGNAL = 206; + */ + public static final int CS_VOIP_SIGNAL_VALUE = 206; + /** + * SC_ENTER_ROOM_ACK = 300; + */ + public static final int SC_ENTER_ROOM_ACK_VALUE = 300; + /** + * SC_AUTHOR_PAUSE = 301; + */ + public static final int SC_AUTHOR_PAUSE_VALUE = 301; + /** + * SC_AUTHOR_RESUME = 302; + */ + public static final int SC_AUTHOR_RESUME_VALUE = 302; + /** + * SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303; + */ + public static final int SC_AUTHOR_PUSH_TRAFFIC_ZERO_VALUE = 303; + /** + * SC_AUTHOR_HEARTBEAT_MISS = 304; + */ + public static final int SC_AUTHOR_HEARTBEAT_MISS_VALUE = 304; + /** + * SC_PIP_STARTED = 305; + */ + public static final int SC_PIP_STARTED_VALUE = 305; + /** + * SC_PIP_ENDED = 306; + */ + public static final int SC_PIP_ENDED_VALUE = 306; + /** + * SC_HORSE_RACING_ACK = 307; + */ + public static final int SC_HORSE_RACING_ACK_VALUE = 307; + /** + * SC_VOIP_SIGNAL = 308; + */ + public static final int SC_VOIP_SIGNAL_VALUE = 308; + /** + * SC_FEED_PUSH = 310; + */ + public static final int SC_FEED_PUSH_VALUE = 310; + /** + * SC_ASSISTANT_STATUS = 311; + */ + public static final int SC_ASSISTANT_STATUS_VALUE = 311; + /** + * SC_REFRESH_WALLET = 312; + */ + public static final int SC_REFRESH_WALLET_VALUE = 312; + /** + * SC_LIVE_CHAT_CALL = 320; + */ + public static final int SC_LIVE_CHAT_CALL_VALUE = 320; + /** + * SC_LIVE_CHAT_CALL_ACCEPTED = 321; + */ + public static final int SC_LIVE_CHAT_CALL_ACCEPTED_VALUE = 321; + /** + * SC_LIVE_CHAT_CALL_REJECTED = 322; + */ + public static final int SC_LIVE_CHAT_CALL_REJECTED_VALUE = 322; + /** + * SC_LIVE_CHAT_READY = 323; + */ + public static final int SC_LIVE_CHAT_READY_VALUE = 323; + /** + * SC_LIVE_CHAT_GUEST_END = 324; + */ + public static final int SC_LIVE_CHAT_GUEST_END_VALUE = 324; + /** + * SC_LIVE_CHAT_ENDED = 325; + */ + public static final int SC_LIVE_CHAT_ENDED_VALUE = 325; + /** + * SC_RENDERING_MAGIC_FACE_DISABLE = 326; + */ + public static final int SC_RENDERING_MAGIC_FACE_DISABLE_VALUE = 326; + /** + * SC_RENDERING_MAGIC_FACE_ENABLE = 327; + */ + public static final int SC_RENDERING_MAGIC_FACE_ENABLE_VALUE = 327; + /** + * SC_RED_PACK_FEED = 330; + */ + public static final int SC_RED_PACK_FEED_VALUE = 330; + /** + * SC_LIVE_WATCHING_LIST = 340; + */ + public static final int SC_LIVE_WATCHING_LIST_VALUE = 340; + /** + * SC_LIVE_QUIZ_QUESTION_ASKED = 350; + */ + public static final int SC_LIVE_QUIZ_QUESTION_ASKED_VALUE = 350; + /** + * SC_LIVE_QUIZ_QUESTION_REVIEWED = 351; + */ + public static final int SC_LIVE_QUIZ_QUESTION_REVIEWED_VALUE = 351; + /** + * SC_LIVE_QUIZ_SYNC = 352; + */ + public static final int SC_LIVE_QUIZ_SYNC_VALUE = 352; + /** + * SC_LIVE_QUIZ_ENDED = 353; + */ + public static final int SC_LIVE_QUIZ_ENDED_VALUE = 353; + /** + * SC_LIVE_QUIZ_WINNERS = 354; + */ + public static final int SC_LIVE_QUIZ_WINNERS_VALUE = 354; + /** + * SC_SUSPECTED_VIOLATION = 355; + */ + public static final int SC_SUSPECTED_VIOLATION_VALUE = 355; + /** + * SC_SHOP_OPENED = 360; + */ + public static final int SC_SHOP_OPENED_VALUE = 360; + /** + * SC_SHOP_CLOSED = 361; + */ + public static final int SC_SHOP_CLOSED_VALUE = 361; + /** + * SC_GUESS_OPENED = 370; + */ + public static final int SC_GUESS_OPENED_VALUE = 370; + /** + * SC_GUESS_CLOSED = 371; + */ + public static final int SC_GUESS_CLOSED_VALUE = 371; + /** + * SC_PK_INVITATION = 380; + */ + public static final int SC_PK_INVITATION_VALUE = 380; + /** + * SC_PK_STATISTIC = 381; + */ + public static final int SC_PK_STATISTIC_VALUE = 381; + /** + * SC_RIDDLE_OPENED = 390; + */ + public static final int SC_RIDDLE_OPENED_VALUE = 390; + /** + * SC_RIDDLE_CLOESED = 391; + */ + public static final int SC_RIDDLE_CLOESED_VALUE = 391; + /** + * SC_RIDE_CHANGED = 412; + */ + public static final int SC_RIDE_CHANGED_VALUE = 412; + /** + * SC_BET_CHANGED = 441; + */ + public static final int SC_BET_CHANGED_VALUE = 441; + /** + * SC_BET_CLOSED = 442; + */ + public static final int SC_BET_CLOSED_VALUE = 442; + /** + * SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645; + */ + public static final int SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE_VALUE = 645; + /** + * SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE = 758; + */ + public static final int SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE_VALUE = 758; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PayloadType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return CS_HEARTBEAT; + case 3: return CS_ERROR; + case 4: return CS_PING; + case 51: return PS_HOST_INFO; + case 101: return SC_HEARTBEAT_ACK; + case 102: return SC_ECHO; + case 103: return SC_ERROR; + case 104: return SC_PING_ACK; + case 105: return SC_INFO; + case 200: return CS_ENTER_ROOM; + case 201: return CS_USER_PAUSE; + case 202: return CS_USER_EXIT; + case 203: return CS_AUTHOR_PUSH_TRAFFIC_ZERO; + case 204: return CS_HORSE_RACING; + case 205: return CS_RACE_LOSE; + case 206: return CS_VOIP_SIGNAL; + case 300: return SC_ENTER_ROOM_ACK; + case 301: return SC_AUTHOR_PAUSE; + case 302: return SC_AUTHOR_RESUME; + case 303: return SC_AUTHOR_PUSH_TRAFFIC_ZERO; + case 304: return SC_AUTHOR_HEARTBEAT_MISS; + case 305: return SC_PIP_STARTED; + case 306: return SC_PIP_ENDED; + case 307: return SC_HORSE_RACING_ACK; + case 308: return SC_VOIP_SIGNAL; + case 310: return SC_FEED_PUSH; + case 311: return SC_ASSISTANT_STATUS; + case 312: return SC_REFRESH_WALLET; + case 320: return SC_LIVE_CHAT_CALL; + case 321: return SC_LIVE_CHAT_CALL_ACCEPTED; + case 322: return SC_LIVE_CHAT_CALL_REJECTED; + case 323: return SC_LIVE_CHAT_READY; + case 324: return SC_LIVE_CHAT_GUEST_END; + case 325: return SC_LIVE_CHAT_ENDED; + case 326: return SC_RENDERING_MAGIC_FACE_DISABLE; + case 327: return SC_RENDERING_MAGIC_FACE_ENABLE; + case 330: return SC_RED_PACK_FEED; + case 340: return SC_LIVE_WATCHING_LIST; + case 350: return SC_LIVE_QUIZ_QUESTION_ASKED; + case 351: return SC_LIVE_QUIZ_QUESTION_REVIEWED; + case 352: return SC_LIVE_QUIZ_SYNC; + case 353: return SC_LIVE_QUIZ_ENDED; + case 354: return SC_LIVE_QUIZ_WINNERS; + case 355: return SC_SUSPECTED_VIOLATION; + case 360: return SC_SHOP_OPENED; + case 361: return SC_SHOP_CLOSED; + case 370: return SC_GUESS_OPENED; + case 371: return SC_GUESS_CLOSED; + case 380: return SC_PK_INVITATION; + case 381: return SC_PK_STATISTIC; + case 390: return SC_RIDDLE_OPENED; + case 391: return SC_RIDDLE_CLOESED; + case 412: return SC_RIDE_CHANGED; + case 441: return SC_BET_CHANGED; + case 442: return SC_BET_CLOSED; + case 645: return SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE; + case 758: return SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PayloadType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PayloadType findValueByNumber(int number) { + return PayloadType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final PayloadType[] VALUES = values(); + + public static PayloadType 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 PayloadType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:PayloadType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021PayloadType.proto*\213\013\n\013PayloadType\022\013\n\007U" + + "NKNOWN\020\000\022\020\n\014CS_HEARTBEAT\020\001\022\014\n\010CS_ERROR\020\003" + + "\022\013\n\007CS_PING\020\004\022\020\n\014PS_HOST_INFO\0203\022\024\n\020SC_HE" + + "ARTBEAT_ACK\020e\022\013\n\007SC_ECHO\020f\022\014\n\010SC_ERROR\020g" + + "\022\017\n\013SC_PING_ACK\020h\022\013\n\007SC_INFO\020i\022\022\n\rCS_ENT" + + "ER_ROOM\020\310\001\022\022\n\rCS_USER_PAUSE\020\311\001\022\021\n\014CS_USE" + + "R_EXIT\020\312\001\022 \n\033CS_AUTHOR_PUSH_TRAFFIC_ZERO" + + "\020\313\001\022\024\n\017CS_HORSE_RACING\020\314\001\022\021\n\014CS_RACE_LOS" + + "E\020\315\001\022\023\n\016CS_VOIP_SIGNAL\020\316\001\022\026\n\021SC_ENTER_RO" + + "OM_ACK\020\254\002\022\024\n\017SC_AUTHOR_PAUSE\020\255\002\022\025\n\020SC_AU" + + "THOR_RESUME\020\256\002\022 \n\033SC_AUTHOR_PUSH_TRAFFIC" + + "_ZERO\020\257\002\022\035\n\030SC_AUTHOR_HEARTBEAT_MISS\020\260\002\022" + + "\023\n\016SC_PIP_STARTED\020\261\002\022\021\n\014SC_PIP_ENDED\020\262\002\022" + + "\030\n\023SC_HORSE_RACING_ACK\020\263\002\022\023\n\016SC_VOIP_SIG" + + "NAL\020\264\002\022\021\n\014SC_FEED_PUSH\020\266\002\022\030\n\023SC_ASSISTAN" + + "T_STATUS\020\267\002\022\026\n\021SC_REFRESH_WALLET\020\270\002\022\026\n\021S" + + "C_LIVE_CHAT_CALL\020\300\002\022\037\n\032SC_LIVE_CHAT_CALL" + + "_ACCEPTED\020\301\002\022\037\n\032SC_LIVE_CHAT_CALL_REJECT" + + "ED\020\302\002\022\027\n\022SC_LIVE_CHAT_READY\020\303\002\022\033\n\026SC_LIV" + + "E_CHAT_GUEST_END\020\304\002\022\027\n\022SC_LIVE_CHAT_ENDE" + + "D\020\305\002\022$\n\037SC_RENDERING_MAGIC_FACE_DISABLE\020" + + "\306\002\022#\n\036SC_RENDERING_MAGIC_FACE_ENABLE\020\307\002\022" + + "\025\n\020SC_RED_PACK_FEED\020\312\002\022\032\n\025SC_LIVE_WATCHI" + + "NG_LIST\020\324\002\022 \n\033SC_LIVE_QUIZ_QUESTION_ASKE" + + "D\020\336\002\022#\n\036SC_LIVE_QUIZ_QUESTION_REVIEWED\020\337" + + "\002\022\026\n\021SC_LIVE_QUIZ_SYNC\020\340\002\022\027\n\022SC_LIVE_QUI" + + "Z_ENDED\020\341\002\022\031\n\024SC_LIVE_QUIZ_WINNERS\020\342\002\022\033\n" + + "\026SC_SUSPECTED_VIOLATION\020\343\002\022\023\n\016SC_SHOP_OP" + + "ENED\020\350\002\022\023\n\016SC_SHOP_CLOSED\020\351\002\022\024\n\017SC_GUESS" + + "_OPENED\020\362\002\022\024\n\017SC_GUESS_CLOSED\020\363\002\022\025\n\020SC_P" + + "K_INVITATION\020\374\002\022\024\n\017SC_PK_STATISTIC\020\375\002\022\025\n" + + "\020SC_RIDDLE_OPENED\020\206\003\022\026\n\021SC_RIDDLE_CLOESE" + + "D\020\207\003\022\024\n\017SC_RIDE_CHANGED\020\234\003\022\023\n\016SC_BET_CHA" + + "NGED\020\271\003\022\022\n\rSC_BET_CLOSED\020\272\003\022)\n$SC_LIVE_S" + + "PECIAL_ACCOUNT_CONFIG_STATE\020\205\005\0221\n,SC_LIV" + + "E_WARNING_MASK_STATUS_CHANGED_AUDIENCE\020\366" + + "\005B<\n:tech.ordinaryroad.live.chat.client." + + "codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PicUrlOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PicUrlOuterClass.java new file mode 100644 index 0000000..7423ddd --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/PicUrlOuterClass.java @@ -0,0 +1,1070 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PicUrl.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class PicUrlOuterClass { + private PicUrlOuterClass() {} + 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 PicUrlOrBuilder extends + // @@protoc_insertion_point(interface_extends:PicUrl) + com.google.protobuf.MessageOrBuilder { + + /** + * string cdn = 1; + * @return The cdn. + */ + java.lang.String getCdn(); + /** + * string cdn = 1; + * @return The bytes for cdn. + */ + com.google.protobuf.ByteString + getCdnBytes(); + + /** + * string url = 2; + * @return The url. + */ + java.lang.String getUrl(); + /** + * string url = 2; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + * string urlPattern = 3; + * @return The urlPattern. + */ + java.lang.String getUrlPattern(); + /** + * string urlPattern = 3; + * @return The bytes for urlPattern. + */ + com.google.protobuf.ByteString + getUrlPatternBytes(); + + /** + * string ip = 4; + * @return The ip. + */ + java.lang.String getIp(); + /** + * string ip = 4; + * @return The bytes for ip. + */ + com.google.protobuf.ByteString + getIpBytes(); + } + /** + * Protobuf type {@code PicUrl} + */ + public static final class PicUrl extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PicUrl) + PicUrlOrBuilder { + private static final long serialVersionUID = 0L; + // Use PicUrl.newBuilder() to construct. + private PicUrl(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PicUrl() { + cdn_ = ""; + url_ = ""; + urlPattern_ = ""; + ip_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PicUrl(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder.class); + } + + public static final int CDN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cdn_ = ""; + /** + * string cdn = 1; + * @return The cdn. + */ + @java.lang.Override + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } + } + /** + * string cdn = 1; + * @return The bytes for cdn. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URLPATTERN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object urlPattern_ = ""; + /** + * string urlPattern = 3; + * @return The urlPattern. + */ + @java.lang.Override + public java.lang.String getUrlPattern() { + java.lang.Object ref = urlPattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlPattern_ = s; + return s; + } + } + /** + * string urlPattern = 3; + * @return The bytes for urlPattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlPatternBytes() { + java.lang.Object ref = urlPattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + urlPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object ip_ = ""; + /** + * string ip = 4; + * @return The ip. + */ + @java.lang.Override + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } + } + /** + * string ip = 4; + * @return The bytes for ip. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlPattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, urlPattern_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ip_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlPattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, urlPattern_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ip_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl) obj; + + if (!getCdn() + .equals(other.getCdn())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUrlPattern() + .equals(other.getUrlPattern())) return false; + if (!getIp() + .equals(other.getIp())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CDN_FIELD_NUMBER; + hash = (53 * hash) + getCdn().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + URLPATTERN_FIELD_NUMBER; + hash = (53 * hash) + getUrlPattern().hashCode(); + hash = (37 * hash) + IP_FIELD_NUMBER; + hash = (53 * hash) + getIp().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 PicUrl} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:PicUrl) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cdn_ = ""; + url_ = ""; + urlPattern_ = ""; + ip_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cdn_ = cdn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.urlPattern_ = urlPattern_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ip_ = ip_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()) return this; + if (!other.getCdn().isEmpty()) { + cdn_ = other.cdn_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUrlPattern().isEmpty()) { + urlPattern_ = other.urlPattern_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getIp().isEmpty()) { + ip_ = other.ip_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cdn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + urlPattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + ip_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cdn_ = ""; + /** + * string cdn = 1; + * @return The cdn. + */ + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cdn = 1; + * @return The bytes for cdn. + */ + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cdn = 1; + * @param value The cdn to set. + * @return This builder for chaining. + */ + public Builder setCdn( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string cdn = 1; + * @return This builder for chaining. + */ + public Builder clearCdn() { + cdn_ = getDefaultInstance().getCdn(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string cdn = 1; + * @param value The bytes for cdn to set. + * @return This builder for chaining. + */ + public Builder setCdnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + * string url = 2; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string url = 2; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string url = 2; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string url = 2; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string url = 2; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object urlPattern_ = ""; + /** + * string urlPattern = 3; + * @return The urlPattern. + */ + public java.lang.String getUrlPattern() { + java.lang.Object ref = urlPattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlPattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string urlPattern = 3; + * @return The bytes for urlPattern. + */ + public com.google.protobuf.ByteString + getUrlPatternBytes() { + java.lang.Object ref = urlPattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + urlPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string urlPattern = 3; + * @param value The urlPattern to set. + * @return This builder for chaining. + */ + public Builder setUrlPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + urlPattern_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string urlPattern = 3; + * @return This builder for chaining. + */ + public Builder clearUrlPattern() { + urlPattern_ = getDefaultInstance().getUrlPattern(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string urlPattern = 3; + * @param value The bytes for urlPattern to set. + * @return This builder for chaining. + */ + public Builder setUrlPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + urlPattern_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object ip_ = ""; + /** + * string ip = 4; + * @return The ip. + */ + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string ip = 4; + * @return The bytes for ip. + */ + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string ip = 4; + * @param value The ip to set. + * @return This builder for chaining. + */ + public Builder setIp( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ip_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string ip = 4; + * @return This builder for chaining. + */ + public Builder clearIp() { + ip_ = getDefaultInstance().getIp(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string ip = 4; + * @param value The bytes for ip to set. + * @return This builder for chaining. + */ + public Builder setIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ip_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PicUrl) + } + + // @@protoc_insertion_point(class_scope:PicUrl) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PicUrl parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PicUrl_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PicUrl_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\014PicUrl.proto\"B\n\006PicUrl\022\013\n\003cdn\030\001 \001(\t\022\013\n" + + "\003url\030\002 \001(\t\022\022\n\nurlPattern\030\003 \001(\t\022\n\n\002ip\030\004 \001" + + "(\tB<\n:tech.ordinaryroad.live.chat.client" + + ".codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_PicUrl_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_PicUrl_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_PicUrl_descriptor, + new java.lang.String[] { "Cdn", "Url", "UrlPattern", "Ip", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCEchoOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCEchoOuterClass.java new file mode 100644 index 0000000..95dc3b5 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCEchoOuterClass.java @@ -0,0 +1,625 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCEcho.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCEchoOuterClass { + private SCEchoOuterClass() {} + 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 SCEchoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCEcho) + com.google.protobuf.MessageOrBuilder { + + /** + * string content = 1; + * @return The content. + */ + java.lang.String getContent(); + /** + * string content = 1; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + } + /** + * Protobuf type {@code SCEcho} + */ + public static final class SCEcho extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCEcho) + SCEchoOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCEcho.newBuilder() to construct. + private SCEcho(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCEcho() { + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCEcho(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * string content = 1; + * @return The content. + */ + @java.lang.Override + 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 = 1; + * @return The bytes for content. + */ + @java.lang.Override + 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; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCEcho} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCEcho) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEchoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object content_ = ""; + /** + * string content = 1; + * @return The content. + */ + 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 = 1; + * @return The bytes for content. + */ + 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 = 1; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string content = 1; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string content = 1; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCEcho) + } + + // @@protoc_insertion_point(class_scope:SCEcho) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCEcho parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCEchoOuterClass.SCEcho getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCEcho_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCEcho_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\014SCEcho.proto\"\031\n\006SCEcho\022\017\n\007content\030\001 \001(" + + "\tB<\n:tech.ordinaryroad.live.chat.client." + + "codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCEcho_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCEcho_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCEcho_descriptor, + new java.lang.String[] { "Content", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCErrorOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCErrorOuterClass.java new file mode 100644 index 0000000..3c79716 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCErrorOuterClass.java @@ -0,0 +1,770 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCError.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCErrorOuterClass { + private SCErrorOuterClass() {} + 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 SCErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCError) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 code = 1; + * @return The code. + */ + int getCode(); + + /** + * string msg = 2; + * @return The msg. + */ + java.lang.String getMsg(); + /** + * string msg = 2; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + + /** + * uint32 subCode = 3; + * @return The subCode. + */ + int getSubCode(); + } + /** + * Protobuf type {@code SCError} + */ + public static final class SCError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCError) + SCErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCError.newBuilder() to construct. + private SCError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCError() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCODE_FIELD_NUMBER = 3; + private int subCode_ = 0; + /** + * uint32 subCode = 3; + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + if (subCode_ != 0) { + output.writeUInt32(3, subCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + if (subCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, subCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (getSubCode() + != other.getSubCode()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (37 * hash) + SUBCODE_FIELD_NUMBER; + hash = (53 * hash) + getSubCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCError) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + subCode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subCode_ = subCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSubCode() != 0) { + setSubCode(other.getSubCode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + subCode_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * uint32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 2; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string msg = 2; + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string msg = 2; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int subCode_ ; + /** + * uint32 subCode = 3; + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + /** + * uint32 subCode = 3; + * @param value The subCode to set. + * @return This builder for chaining. + */ + public Builder setSubCode(int value) { + + subCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 subCode = 3; + * @return This builder for chaining. + */ + public Builder clearSubCode() { + bitField0_ = (bitField0_ & ~0x00000004); + subCode_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCError) + } + + // @@protoc_insertion_point(class_scope:SCError) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCErrorOuterClass.SCError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCError_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\rSCError.proto\"5\n\007SCError\022\014\n\004code\030\001 \001(\r" + + "\022\013\n\003msg\030\002 \001(\t\022\017\n\007subCode\030\003 \001(\rB<\n:tech.o" + + "rdinaryroad.live.chat.client.codec.kuais" + + "hou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCError_descriptor, + new java.lang.String[] { "Code", "Msg", "SubCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCHeartbeatAckOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCHeartbeatAckOuterClass.java new file mode 100644 index 0000000..e06bfee --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCHeartbeatAckOuterClass.java @@ -0,0 +1,624 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCHeartbeatAck.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCHeartbeatAckOuterClass { + private SCHeartbeatAckOuterClass() {} + 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 SCHeartbeatAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCHeartbeatAck) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + long getTimestamp(); + + /** + * uint64 clientTimestamp = 2; + * @return The clientTimestamp. + */ + long getClientTimestamp(); + } + /** + * Protobuf type {@code SCHeartbeatAck} + */ + public static final class SCHeartbeatAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCHeartbeatAck) + SCHeartbeatAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCHeartbeatAck.newBuilder() to construct. + private SCHeartbeatAck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCHeartbeatAck() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCHeartbeatAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + public static final int CLIENTTIMESTAMP_FIELD_NUMBER = 2; + private long clientTimestamp_ = 0L; + /** + * uint64 clientTimestamp = 2; + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + output.writeUInt64(2, clientTimestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, clientTimestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (getClientTimestamp() + != other.getClientTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (37 * hash) + CLIENTTIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getClientTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCHeartbeatAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCHeartbeatAck) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + clientTimestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientTimestamp_ = clientTimestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + if (other.getClientTimestamp() != 0L) { + setClientTimestamp(other.getClientTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + clientTimestamp_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * uint64 timestamp = 1; + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + + private long clientTimestamp_ ; + /** + * uint64 clientTimestamp = 2; + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + /** + * uint64 clientTimestamp = 2; + * @param value The clientTimestamp to set. + * @return This builder for chaining. + */ + public Builder setClientTimestamp(long value) { + + clientTimestamp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 clientTimestamp = 2; + * @return This builder for chaining. + */ + public Builder clearClientTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + clientTimestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCHeartbeatAck) + } + + // @@protoc_insertion_point(class_scope:SCHeartbeatAck) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCHeartbeatAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCHeartbeatAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCHeartbeatAck_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\024SCHeartbeatAck.proto\"<\n\016SCHeartbeatAck" + + "\022\021\n\ttimestamp\030\001 \001(\004\022\027\n\017clientTimestamp\030\002" + + " \001(\004B<\n:tech.ordinaryroad.live.chat.clie" + + "nt.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCHeartbeatAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCHeartbeatAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCHeartbeatAck_descriptor, + new java.lang.String[] { "Timestamp", "ClientTimestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCInfoOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCInfoOuterClass.java new file mode 100644 index 0000000..985f984 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCInfoOuterClass.java @@ -0,0 +1,698 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCInfo.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCInfoOuterClass { + private SCInfoOuterClass() {} + 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 SCInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 code = 1; + * @return The code. + */ + int getCode(); + + /** + * string msg = 2; + * @return The msg. + */ + java.lang.String getMsg(); + /** + * string msg = 2; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + } + /** + * Protobuf type {@code SCInfo} + */ + public static final class SCInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCInfo) + SCInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCInfo.newBuilder() to construct. + private SCInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCInfo() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCInfo) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * uint32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 2; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string msg = 2; + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string msg = 2; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCInfo) + } + + // @@protoc_insertion_point(class_scope:SCInfo) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCInfoOuterClass.SCInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCInfo_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\014SCInfo.proto\"#\n\006SCInfo\022\014\n\004code\030\001 \001(\r\022\013" + + "\n\003msg\030\002 \001(\tB<\n:tech.ordinaryroad.live.ch" + + "at.client.codec.kuaishou.protobufb\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCInfo_descriptor, + new java.lang.String[] { "Code", "Msg", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCLiveWarningMaskStatusChangedAudienceOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCLiveWarningMaskStatusChangedAudienceOuterClass.java new file mode 100644 index 0000000..806c72b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCLiveWarningMaskStatusChangedAudienceOuterClass.java @@ -0,0 +1,764 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCLiveWarningMaskStatusChangedAudience.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCLiveWarningMaskStatusChangedAudienceOuterClass { + private SCLiveWarningMaskStatusChangedAudienceOuterClass() {} + 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 SCLiveWarningMaskStatusChangedAudienceOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCLiveWarningMaskStatusChangedAudience) + com.google.protobuf.MessageOrBuilder { + + /** + * bool displayMask = 1; + * @return The displayMask. + */ + boolean getDisplayMask(); + + /** + * .AuditAudienceMask warningMask = 2; + * @return Whether the warningMask field is set. + */ + boolean hasWarningMask(); + /** + * .AuditAudienceMask warningMask = 2; + * @return The warningMask. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getWarningMask(); + /** + * .AuditAudienceMask warningMask = 2; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder getWarningMaskOrBuilder(); + } + /** + * Protobuf type {@code SCLiveWarningMaskStatusChangedAudience} + */ + public static final class SCLiveWarningMaskStatusChangedAudience extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCLiveWarningMaskStatusChangedAudience) + SCLiveWarningMaskStatusChangedAudienceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCLiveWarningMaskStatusChangedAudience.newBuilder() to construct. + private SCLiveWarningMaskStatusChangedAudience(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCLiveWarningMaskStatusChangedAudience() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCLiveWarningMaskStatusChangedAudience(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.Builder.class); + } + + private int bitField0_; + public static final int DISPLAYMASK_FIELD_NUMBER = 1; + private boolean displayMask_ = false; + /** + * bool displayMask = 1; + * @return The displayMask. + */ + @java.lang.Override + public boolean getDisplayMask() { + return displayMask_; + } + + public static final int WARNINGMASK_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask warningMask_; + /** + * .AuditAudienceMask warningMask = 2; + * @return Whether the warningMask field is set. + */ + @java.lang.Override + public boolean hasWarningMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .AuditAudienceMask warningMask = 2; + * @return The warningMask. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getWarningMask() { + return warningMask_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } + /** + * .AuditAudienceMask warningMask = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder getWarningMaskOrBuilder() { + return warningMask_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (displayMask_ != false) { + output.writeBool(1, displayMask_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getWarningMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (displayMask_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, displayMask_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getWarningMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience) obj; + + if (getDisplayMask() + != other.getDisplayMask()) return false; + if (hasWarningMask() != other.hasWarningMask()) return false; + if (hasWarningMask()) { + if (!getWarningMask() + .equals(other.getWarningMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAYMASK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisplayMask()); + if (hasWarningMask()) { + hash = (37 * hash) + WARNINGMASK_FIELD_NUMBER; + hash = (53 * hash) + getWarningMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCLiveWarningMaskStatusChangedAudience} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCLiveWarningMaskStatusChangedAudience) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudienceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWarningMaskFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayMask_ = false; + warningMask_ = null; + if (warningMaskBuilder_ != null) { + warningMaskBuilder_.dispose(); + warningMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayMask_ = displayMask_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.warningMask_ = warningMaskBuilder_ == null + ? warningMask_ + : warningMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.getDefaultInstance()) return this; + if (other.getDisplayMask() != false) { + setDisplayMask(other.getDisplayMask()); + } + if (other.hasWarningMask()) { + mergeWarningMask(other.getWarningMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + displayMask_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getWarningMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean displayMask_ ; + /** + * bool displayMask = 1; + * @return The displayMask. + */ + @java.lang.Override + public boolean getDisplayMask() { + return displayMask_; + } + /** + * bool displayMask = 1; + * @param value The displayMask to set. + * @return This builder for chaining. + */ + public Builder setDisplayMask(boolean value) { + + displayMask_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool displayMask = 1; + * @return This builder for chaining. + */ + public Builder clearDisplayMask() { + bitField0_ = (bitField0_ & ~0x00000001); + displayMask_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask warningMask_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder> warningMaskBuilder_; + /** + * .AuditAudienceMask warningMask = 2; + * @return Whether the warningMask field is set. + */ + public boolean hasWarningMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .AuditAudienceMask warningMask = 2; + * @return The warningMask. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getWarningMask() { + if (warningMaskBuilder_ == null) { + return warningMask_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } else { + return warningMaskBuilder_.getMessage(); + } + } + /** + * .AuditAudienceMask warningMask = 2; + */ + public Builder setWarningMask(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask value) { + if (warningMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + warningMask_ = value; + } else { + warningMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .AuditAudienceMask warningMask = 2; + */ + public Builder setWarningMask( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder builderForValue) { + if (warningMaskBuilder_ == null) { + warningMask_ = builderForValue.build(); + } else { + warningMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .AuditAudienceMask warningMask = 2; + */ + public Builder mergeWarningMask(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask value) { + if (warningMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + warningMask_ != null && + warningMask_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance()) { + getWarningMaskBuilder().mergeFrom(value); + } else { + warningMask_ = value; + } + } else { + warningMaskBuilder_.mergeFrom(value); + } + if (warningMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .AuditAudienceMask warningMask = 2; + */ + public Builder clearWarningMask() { + bitField0_ = (bitField0_ & ~0x00000002); + warningMask_ = null; + if (warningMaskBuilder_ != null) { + warningMaskBuilder_.dispose(); + warningMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .AuditAudienceMask warningMask = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder getWarningMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWarningMaskFieldBuilder().getBuilder(); + } + /** + * .AuditAudienceMask warningMask = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder getWarningMaskOrBuilder() { + if (warningMaskBuilder_ != null) { + return warningMaskBuilder_.getMessageOrBuilder(); + } else { + return warningMask_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } + } + /** + * .AuditAudienceMask warningMask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder> + getWarningMaskFieldBuilder() { + if (warningMaskBuilder_ == null) { + warningMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder>( + getWarningMask(), + getParentForChildren(), + isClean()); + warningMask_ = null; + } + return warningMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCLiveWarningMaskStatusChangedAudience) + } + + // @@protoc_insertion_point(class_scope:SCLiveWarningMaskStatusChangedAudience) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCLiveWarningMaskStatusChangedAudience parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCLiveWarningMaskStatusChangedAudience_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,SCLiveWarningMaskStatusChangedAudience" + + ".proto\032\027AuditAudienceMask.proto\"f\n&SCLiv" + + "eWarningMaskStatusChangedAudience\022\023\n\013dis" + + "playMask\030\001 \001(\010\022\'\n\013warningMask\030\002 \001(\0132\022.Au" + + "ditAudienceMaskB<\n:tech.ordinaryroad.liv" + + "e.chat.client.codec.kuaishou.protobufb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.getDescriptor(), + }); + internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCLiveWarningMaskStatusChangedAudience_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor, + new java.lang.String[] { "DisplayMask", "WarningMask", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.AuditAudienceMaskOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCPingAckOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCPingAckOuterClass.java new file mode 100644 index 0000000..8fc3327 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCPingAckOuterClass.java @@ -0,0 +1,625 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCPingAck.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCPingAckOuterClass { + private SCPingAckOuterClass() {} + 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 SCPingAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCPingAck) + com.google.protobuf.MessageOrBuilder { + + /** + * string echoData = 1; + * @return The echoData. + */ + java.lang.String getEchoData(); + /** + * string echoData = 1; + * @return The bytes for echoData. + */ + com.google.protobuf.ByteString + getEchoDataBytes(); + } + /** + * Protobuf type {@code SCPingAck} + */ + public static final class SCPingAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCPingAck) + SCPingAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCPingAck.newBuilder() to construct. + private SCPingAck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCPingAck() { + echoData_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCPingAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.Builder.class); + } + + public static final int ECHODATA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object echoData_ = ""; + /** + * string echoData = 1; + * @return The echoData. + */ + @java.lang.Override + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } + } + /** + * string echoData = 1; + * @return The bytes for echoData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, echoData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, echoData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck) obj; + + if (!getEchoData() + .equals(other.getEchoData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ECHODATA_FIELD_NUMBER; + hash = (53 * hash) + getEchoData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCPingAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCPingAck) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + echoData_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.echoData_ = echoData_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.getDefaultInstance()) return this; + if (!other.getEchoData().isEmpty()) { + echoData_ = other.echoData_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + echoData_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object echoData_ = ""; + /** + * string echoData = 1; + * @return The echoData. + */ + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string echoData = 1; + * @return The bytes for echoData. + */ + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string echoData = 1; + * @param value The echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoData( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string echoData = 1; + * @return This builder for chaining. + */ + public Builder clearEchoData() { + echoData_ = getDefaultInstance().getEchoData(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string echoData = 1; + * @param value The bytes for echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCPingAck) + } + + // @@protoc_insertion_point(class_scope:SCPingAck) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCPingAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCPingAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCPingAck_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\017SCPingAck.proto\"\035\n\tSCPingAck\022\020\n\010echoDa" + + "ta\030\001 \001(\tB<\n:tech.ordinaryroad.live.chat." + + "client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCPingAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCPingAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCPingAck_descriptor, + new java.lang.String[] { "EchoData", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebAuthorPauseOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebAuthorPauseOuterClass.java new file mode 100644 index 0000000..0f429cc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebAuthorPauseOuterClass.java @@ -0,0 +1,659 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebAuthorPause.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebAuthorPauseOuterClass { + private SCWebAuthorPauseOuterClass() {} + 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 SCWebAuthorPauseOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebAuthorPause) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + + /** + * .WebPauseType pauseType = 2; + * @return The enum numeric value on the wire for pauseType. + */ + int getPauseTypeValue(); + /** + * .WebPauseType pauseType = 2; + * @return The pauseType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType getPauseType(); + } + /** + * Protobuf type {@code SCWebAuthorPause} + */ + public static final class SCWebAuthorPause extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebAuthorPause) + SCWebAuthorPauseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebAuthorPause.newBuilder() to construct. + private SCWebAuthorPause(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebAuthorPause() { + pauseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebAuthorPause(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int PAUSETYPE_FIELD_NUMBER = 2; + private int pauseType_ = 0; + /** + * .WebPauseType pauseType = 2; + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * .WebPauseType pauseType = 2; + * @return The pauseType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNKNOWN_PAUSE_TYPE.getNumber()) { + output.writeEnum(2, pauseType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNKNOWN_PAUSE_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, pauseType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause) obj; + + if (getTime() + != other.getTime()) return false; + if (pauseType_ != other.pauseType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + PAUSETYPE_FIELD_NUMBER; + hash = (53 * hash) + pauseType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebAuthorPause} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebAuthorPause) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPauseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + pauseType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pauseType_ = pauseType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.pauseType_ != 0) { + setPauseTypeValue(other.getPauseTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + pauseType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private int pauseType_ = 0; + /** + * .WebPauseType pauseType = 2; + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * .WebPauseType pauseType = 2; + * @param value The enum numeric value on the wire for pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseTypeValue(int value) { + pauseType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .WebPauseType pauseType = 2; + * @return The pauseType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNRECOGNIZED : result; + } + /** + * .WebPauseType pauseType = 2; + * @param value The pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + pauseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebPauseType pauseType = 2; + * @return This builder for chaining. + */ + public Builder clearPauseType() { + bitField0_ = (bitField0_ & ~0x00000002); + pauseType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebAuthorPause) + } + + // @@protoc_insertion_point(class_scope:SCWebAuthorPause) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebAuthorPause parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebAuthorPause_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebAuthorPause_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\026SCWebAuthorPause.proto\032\022WebPauseType.p" + + "roto\"B\n\020SCWebAuthorPause\022\014\n\004time\030\001 \001(\004\022 " + + "\n\tpauseType\030\002 \001(\0162\r.WebPauseTypeB<\n:tech" + + ".ordinaryroad.live.chat.client.codec.kua" + + "ishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.getDescriptor(), + }); + internal_static_SCWebAuthorPause_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebAuthorPause_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebAuthorPause_descriptor, + new java.lang.String[] { "Time", "PauseType", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebAuthorResumeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebAuthorResumeOuterClass.java new file mode 100644 index 0000000..58edd08 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebAuthorResumeOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebAuthorResume.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebAuthorResumeOuterClass { + private SCWebAuthorResumeOuterClass() {} + 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 SCWebAuthorResumeOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebAuthorResume) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code SCWebAuthorResume} + */ + public static final class SCWebAuthorResume extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebAuthorResume) + SCWebAuthorResumeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebAuthorResume.newBuilder() to construct. + private SCWebAuthorResume(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebAuthorResume() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebAuthorResume(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebAuthorResume} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebAuthorResume) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResumeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebAuthorResume) + } + + // @@protoc_insertion_point(class_scope:SCWebAuthorResume) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebAuthorResume parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebAuthorResume_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebAuthorResume_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\027SCWebAuthorResume.proto\"!\n\021SCWebAuthor" + + "Resume\022\014\n\004time\030\001 \001(\004B<\n:tech.ordinaryroa" + + "d.live.chat.client.codec.kuaishou.protob" + + "ufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebAuthorResume_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebAuthorResume_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebAuthorResume_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebBetChangedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebBetChangedOuterClass.java new file mode 100644 index 0000000..39e8eda --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebBetChangedOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebBetChanged.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebBetChangedOuterClass { + private SCWebBetChangedOuterClass() {} + 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 SCWebBetChangedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebBetChanged) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 maxDelayMillis = 1; + * @return The maxDelayMillis. + */ + long getMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebBetChanged} + */ + public static final class SCWebBetChanged extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebBetChanged) + SCWebBetChangedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebBetChanged.newBuilder() to construct. + private SCWebBetChanged(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebBetChanged() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebBetChanged(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.Builder.class); + } + + public static final int MAXDELAYMILLIS_FIELD_NUMBER = 1; + private long maxDelayMillis_ = 0L; + /** + * uint64 maxDelayMillis = 1; + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (maxDelayMillis_ != 0L) { + output.writeUInt64(1, maxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, maxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged) obj; + + if (getMaxDelayMillis() + != other.getMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebBetChanged} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebBetChanged) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChangedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxDelayMillis_ = maxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.getDefaultInstance()) return this; + if (other.getMaxDelayMillis() != 0L) { + setMaxDelayMillis(other.getMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + maxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long maxDelayMillis_ ; + /** + * uint64 maxDelayMillis = 1; + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + /** + * uint64 maxDelayMillis = 1; + * @param value The maxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setMaxDelayMillis(long value) { + + maxDelayMillis_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 maxDelayMillis = 1; + * @return This builder for chaining. + */ + public Builder clearMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000001); + maxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebBetChanged) + } + + // @@protoc_insertion_point(class_scope:SCWebBetChanged) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebBetChanged parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebBetChanged_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebBetChanged_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\025SCWebBetChanged.proto\")\n\017SCWebBetChang" + + "ed\022\026\n\016maxDelayMillis\030\001 \001(\004B<\n:tech.ordin" + + "aryroad.live.chat.client.codec.kuaishou." + + "protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebBetChanged_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebBetChanged_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebBetChanged_descriptor, + new java.lang.String[] { "MaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebBetClosedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebBetClosedOuterClass.java new file mode 100644 index 0000000..f77d24e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebBetClosedOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebBetClosed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebBetClosedOuterClass { + private SCWebBetClosedOuterClass() {} + 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 SCWebBetClosedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebBetClosed) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 maxDelayMillis = 1; + * @return The maxDelayMillis. + */ + long getMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebBetClosed} + */ + public static final class SCWebBetClosed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebBetClosed) + SCWebBetClosedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebBetClosed.newBuilder() to construct. + private SCWebBetClosed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebBetClosed() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebBetClosed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.Builder.class); + } + + public static final int MAXDELAYMILLIS_FIELD_NUMBER = 1; + private long maxDelayMillis_ = 0L; + /** + * uint64 maxDelayMillis = 1; + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (maxDelayMillis_ != 0L) { + output.writeUInt64(1, maxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, maxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed) obj; + + if (getMaxDelayMillis() + != other.getMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebBetClosed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebBetClosed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxDelayMillis_ = maxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.getDefaultInstance()) return this; + if (other.getMaxDelayMillis() != 0L) { + setMaxDelayMillis(other.getMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + maxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long maxDelayMillis_ ; + /** + * uint64 maxDelayMillis = 1; + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + /** + * uint64 maxDelayMillis = 1; + * @param value The maxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setMaxDelayMillis(long value) { + + maxDelayMillis_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 maxDelayMillis = 1; + * @return This builder for chaining. + */ + public Builder clearMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000001); + maxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebBetClosed) + } + + // @@protoc_insertion_point(class_scope:SCWebBetClosed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebBetClosed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebBetClosed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebBetClosed_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\024SCWebBetClosed.proto\"(\n\016SCWebBetClosed" + + "\022\026\n\016maxDelayMillis\030\001 \001(\004B<\n:tech.ordinar" + + "yroad.live.chat.client.codec.kuaishou.pr" + + "otobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebBetClosed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebBetClosed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebBetClosed_descriptor, + new java.lang.String[] { "MaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebCurrentRedPackFeedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebCurrentRedPackFeedOuterClass.java new file mode 100644 index 0000000..67d1d6a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebCurrentRedPackFeedOuterClass.java @@ -0,0 +1,859 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebCurrentRedPackFeed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebCurrentRedPackFeedOuterClass { + private SCWebCurrentRedPackFeedOuterClass() {} + 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 SCWebCurrentRedPackFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebCurrentRedPackFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .WebRedPackInfo redPack = 1; + */ + java.util.List + getRedPackList(); + /** + * repeated .WebRedPackInfo redPack = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getRedPack(int index); + /** + * repeated .WebRedPackInfo redPack = 1; + */ + int getRedPackCount(); + /** + * repeated .WebRedPackInfo redPack = 1; + */ + java.util.List + getRedPackOrBuilderList(); + /** + * repeated .WebRedPackInfo redPack = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder getRedPackOrBuilder( + int index); + } + /** + * Protobuf type {@code SCWebCurrentRedPackFeed} + */ + public static final class SCWebCurrentRedPackFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebCurrentRedPackFeed) + SCWebCurrentRedPackFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebCurrentRedPackFeed.newBuilder() to construct. + private SCWebCurrentRedPackFeed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebCurrentRedPackFeed() { + redPack_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebCurrentRedPackFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.Builder.class); + } + + public static final int REDPACK_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List redPack_; + /** + * repeated .WebRedPackInfo redPack = 1; + */ + @java.lang.Override + public java.util.List getRedPackList() { + return redPack_; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + @java.lang.Override + public java.util.List + getRedPackOrBuilderList() { + return redPack_; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + @java.lang.Override + public int getRedPackCount() { + return redPack_.size(); + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getRedPack(int index) { + return redPack_.get(index); + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder getRedPackOrBuilder( + int index) { + return redPack_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < redPack_.size(); i++) { + output.writeMessage(1, redPack_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < redPack_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, redPack_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed) obj; + + if (!getRedPackList() + .equals(other.getRedPackList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRedPackCount() > 0) { + hash = (37 * hash) + REDPACK_FIELD_NUMBER; + hash = (53 * hash) + getRedPackList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebCurrentRedPackFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebCurrentRedPackFeed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (redPackBuilder_ == null) { + redPack_ = java.util.Collections.emptyList(); + } else { + redPack_ = null; + redPackBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result) { + if (redPackBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + redPack_ = java.util.Collections.unmodifiableList(redPack_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.redPack_ = redPack_; + } else { + result.redPack_ = redPackBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.getDefaultInstance()) return this; + if (redPackBuilder_ == null) { + if (!other.redPack_.isEmpty()) { + if (redPack_.isEmpty()) { + redPack_ = other.redPack_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRedPackIsMutable(); + redPack_.addAll(other.redPack_); + } + onChanged(); + } + } else { + if (!other.redPack_.isEmpty()) { + if (redPackBuilder_.isEmpty()) { + redPackBuilder_.dispose(); + redPackBuilder_ = null; + redPack_ = other.redPack_; + bitField0_ = (bitField0_ & ~0x00000001); + redPackBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRedPackFieldBuilder() : null; + } else { + redPackBuilder_.addAllMessages(other.redPack_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.parser(), + extensionRegistry); + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.add(m); + } else { + redPackBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List redPack_ = + java.util.Collections.emptyList(); + private void ensureRedPackIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + redPack_ = new java.util.ArrayList(redPack_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder> redPackBuilder_; + + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public java.util.List getRedPackList() { + if (redPackBuilder_ == null) { + return java.util.Collections.unmodifiableList(redPack_); + } else { + return redPackBuilder_.getMessageList(); + } + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public int getRedPackCount() { + if (redPackBuilder_ == null) { + return redPack_.size(); + } else { + return redPackBuilder_.getCount(); + } + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getRedPack(int index) { + if (redPackBuilder_ == null) { + return redPack_.get(index); + } else { + return redPackBuilder_.getMessage(index); + } + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder setRedPack( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo value) { + if (redPackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRedPackIsMutable(); + redPack_.set(index, value); + onChanged(); + } else { + redPackBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder setRedPack( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder builderForValue) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.set(index, builderForValue.build()); + onChanged(); + } else { + redPackBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder addRedPack(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo value) { + if (redPackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRedPackIsMutable(); + redPack_.add(value); + onChanged(); + } else { + redPackBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder addRedPack( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo value) { + if (redPackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRedPackIsMutable(); + redPack_.add(index, value); + onChanged(); + } else { + redPackBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder addRedPack( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder builderForValue) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.add(builderForValue.build()); + onChanged(); + } else { + redPackBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder addRedPack( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder builderForValue) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.add(index, builderForValue.build()); + onChanged(); + } else { + redPackBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder addAllRedPack( + java.lang.Iterable values) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, redPack_); + onChanged(); + } else { + redPackBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder clearRedPack() { + if (redPackBuilder_ == null) { + redPack_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + redPackBuilder_.clear(); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public Builder removeRedPack(int index) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.remove(index); + onChanged(); + } else { + redPackBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder getRedPackBuilder( + int index) { + return getRedPackFieldBuilder().getBuilder(index); + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder getRedPackOrBuilder( + int index) { + if (redPackBuilder_ == null) { + return redPack_.get(index); } else { + return redPackBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public java.util.List + getRedPackOrBuilderList() { + if (redPackBuilder_ != null) { + return redPackBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(redPack_); + } + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder addRedPackBuilder() { + return getRedPackFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance()); + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder addRedPackBuilder( + int index) { + return getRedPackFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance()); + } + /** + * repeated .WebRedPackInfo redPack = 1; + */ + public java.util.List + getRedPackBuilderList() { + return getRedPackFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder> + getRedPackFieldBuilder() { + if (redPackBuilder_ == null) { + redPackBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder>( + redPack_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + redPack_ = null; + } + return redPackBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebCurrentRedPackFeed) + } + + // @@protoc_insertion_point(class_scope:SCWebCurrentRedPackFeed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebCurrentRedPackFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebCurrentRedPackFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebCurrentRedPackFeed_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\035SCWebCurrentRedPackFeed.proto\032\024WebRedP" + + "ackInfo.proto\";\n\027SCWebCurrentRedPackFeed" + + "\022 \n\007redPack\030\001 \003(\0132\017.WebRedPackInfoB<\n:te" + + "ch.ordinaryroad.live.chat.client.codec.k" + + "uaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.getDescriptor(), + }); + internal_static_SCWebCurrentRedPackFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebCurrentRedPackFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebCurrentRedPackFeed_descriptor, + new java.lang.String[] { "RedPack", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebEnterRoomAckOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebEnterRoomAckOuterClass.java new file mode 100644 index 0000000..a470f7f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebEnterRoomAckOuterClass.java @@ -0,0 +1,698 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebEnterRoomAck.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebEnterRoomAckOuterClass { + private SCWebEnterRoomAckOuterClass() {} + 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 SCWebEnterRoomAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebEnterRoomAck) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 minReconnectMs = 1; + * @return The minReconnectMs. + */ + long getMinReconnectMs(); + + /** + * uint64 maxReconnectMs = 2; + * @return The maxReconnectMs. + */ + long getMaxReconnectMs(); + + /** + * uint64 heartbeatIntervalMs = 3; + * @return The heartbeatIntervalMs. + */ + long getHeartbeatIntervalMs(); + } + /** + * Protobuf type {@code SCWebEnterRoomAck} + */ + public static final class SCWebEnterRoomAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebEnterRoomAck) + SCWebEnterRoomAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebEnterRoomAck.newBuilder() to construct. + private SCWebEnterRoomAck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebEnterRoomAck() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebEnterRoomAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.Builder.class); + } + + public static final int MINRECONNECTMS_FIELD_NUMBER = 1; + private long minReconnectMs_ = 0L; + /** + * uint64 minReconnectMs = 1; + * @return The minReconnectMs. + */ + @java.lang.Override + public long getMinReconnectMs() { + return minReconnectMs_; + } + + public static final int MAXRECONNECTMS_FIELD_NUMBER = 2; + private long maxReconnectMs_ = 0L; + /** + * uint64 maxReconnectMs = 2; + * @return The maxReconnectMs. + */ + @java.lang.Override + public long getMaxReconnectMs() { + return maxReconnectMs_; + } + + public static final int HEARTBEATINTERVALMS_FIELD_NUMBER = 3; + private long heartbeatIntervalMs_ = 0L; + /** + * uint64 heartbeatIntervalMs = 3; + * @return The heartbeatIntervalMs. + */ + @java.lang.Override + public long getHeartbeatIntervalMs() { + return heartbeatIntervalMs_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minReconnectMs_ != 0L) { + output.writeUInt64(1, minReconnectMs_); + } + if (maxReconnectMs_ != 0L) { + output.writeUInt64(2, maxReconnectMs_); + } + if (heartbeatIntervalMs_ != 0L) { + output.writeUInt64(3, heartbeatIntervalMs_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minReconnectMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, minReconnectMs_); + } + if (maxReconnectMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, maxReconnectMs_); + } + if (heartbeatIntervalMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, heartbeatIntervalMs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck) obj; + + if (getMinReconnectMs() + != other.getMinReconnectMs()) return false; + if (getMaxReconnectMs() + != other.getMaxReconnectMs()) return false; + if (getHeartbeatIntervalMs() + != other.getHeartbeatIntervalMs()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MINRECONNECTMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinReconnectMs()); + hash = (37 * hash) + MAXRECONNECTMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxReconnectMs()); + hash = (37 * hash) + HEARTBEATINTERVALMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeartbeatIntervalMs()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebEnterRoomAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebEnterRoomAck) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minReconnectMs_ = 0L; + maxReconnectMs_ = 0L; + heartbeatIntervalMs_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minReconnectMs_ = minReconnectMs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxReconnectMs_ = maxReconnectMs_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.heartbeatIntervalMs_ = heartbeatIntervalMs_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.getDefaultInstance()) return this; + if (other.getMinReconnectMs() != 0L) { + setMinReconnectMs(other.getMinReconnectMs()); + } + if (other.getMaxReconnectMs() != 0L) { + setMaxReconnectMs(other.getMaxReconnectMs()); + } + if (other.getHeartbeatIntervalMs() != 0L) { + setHeartbeatIntervalMs(other.getHeartbeatIntervalMs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + minReconnectMs_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + maxReconnectMs_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + heartbeatIntervalMs_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long minReconnectMs_ ; + /** + * uint64 minReconnectMs = 1; + * @return The minReconnectMs. + */ + @java.lang.Override + public long getMinReconnectMs() { + return minReconnectMs_; + } + /** + * uint64 minReconnectMs = 1; + * @param value The minReconnectMs to set. + * @return This builder for chaining. + */ + public Builder setMinReconnectMs(long value) { + + minReconnectMs_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 minReconnectMs = 1; + * @return This builder for chaining. + */ + public Builder clearMinReconnectMs() { + bitField0_ = (bitField0_ & ~0x00000001); + minReconnectMs_ = 0L; + onChanged(); + return this; + } + + private long maxReconnectMs_ ; + /** + * uint64 maxReconnectMs = 2; + * @return The maxReconnectMs. + */ + @java.lang.Override + public long getMaxReconnectMs() { + return maxReconnectMs_; + } + /** + * uint64 maxReconnectMs = 2; + * @param value The maxReconnectMs to set. + * @return This builder for chaining. + */ + public Builder setMaxReconnectMs(long value) { + + maxReconnectMs_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 maxReconnectMs = 2; + * @return This builder for chaining. + */ + public Builder clearMaxReconnectMs() { + bitField0_ = (bitField0_ & ~0x00000002); + maxReconnectMs_ = 0L; + onChanged(); + return this; + } + + private long heartbeatIntervalMs_ ; + /** + * uint64 heartbeatIntervalMs = 3; + * @return The heartbeatIntervalMs. + */ + @java.lang.Override + public long getHeartbeatIntervalMs() { + return heartbeatIntervalMs_; + } + /** + * uint64 heartbeatIntervalMs = 3; + * @param value The heartbeatIntervalMs to set. + * @return This builder for chaining. + */ + public Builder setHeartbeatIntervalMs(long value) { + + heartbeatIntervalMs_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 heartbeatIntervalMs = 3; + * @return This builder for chaining. + */ + public Builder clearHeartbeatIntervalMs() { + bitField0_ = (bitField0_ & ~0x00000004); + heartbeatIntervalMs_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebEnterRoomAck) + } + + // @@protoc_insertion_point(class_scope:SCWebEnterRoomAck) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebEnterRoomAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebEnterRoomAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebEnterRoomAck_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\027SCWebEnterRoomAck.proto\"`\n\021SCWebEnterR" + + "oomAck\022\026\n\016minReconnectMs\030\001 \001(\004\022\026\n\016maxRec" + + "onnectMs\030\002 \001(\004\022\033\n\023heartbeatIntervalMs\030\003 " + + "\001(\004B<\n:tech.ordinaryroad.live.chat.clien" + + "t.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebEnterRoomAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebEnterRoomAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebEnterRoomAck_descriptor, + new java.lang.String[] { "MinReconnectMs", "MaxReconnectMs", "HeartbeatIntervalMs", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebErrorOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebErrorOuterClass.java new file mode 100644 index 0000000..7708f34 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebErrorOuterClass.java @@ -0,0 +1,770 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebError.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebErrorOuterClass { + private SCWebErrorOuterClass() {} + 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 SCWebErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebError) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 code = 1; + * @return The code. + */ + int getCode(); + + /** + * string msg = 2; + * @return The msg. + */ + java.lang.String getMsg(); + /** + * string msg = 2; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + + /** + * uint32 subCode = 3; + * @return The subCode. + */ + int getSubCode(); + } + /** + * Protobuf type {@code SCWebError} + */ + public static final class SCWebError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebError) + SCWebErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebError.newBuilder() to construct. + private SCWebError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebError() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCODE_FIELD_NUMBER = 3; + private int subCode_ = 0; + /** + * uint32 subCode = 3; + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + if (subCode_ != 0) { + output.writeUInt32(3, subCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + if (subCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, subCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (getSubCode() + != other.getSubCode()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (37 * hash) + SUBCODE_FIELD_NUMBER; + hash = (53 * hash) + getSubCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebError) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + subCode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subCode_ = subCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSubCode() != 0) { + setSubCode(other.getSubCode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + subCode_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * uint32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * uint32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 2; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string msg = 2; + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string msg = 2; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int subCode_ ; + /** + * uint32 subCode = 3; + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + /** + * uint32 subCode = 3; + * @param value The subCode to set. + * @return This builder for chaining. + */ + public Builder setSubCode(int value) { + + subCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 subCode = 3; + * @return This builder for chaining. + */ + public Builder clearSubCode() { + bitField0_ = (bitField0_ & ~0x00000004); + subCode_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebError) + } + + // @@protoc_insertion_point(class_scope:SCWebError) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebError_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\020SCWebError.proto\"8\n\nSCWebError\022\014\n\004code" + + "\030\001 \001(\r\022\013\n\003msg\030\002 \001(\t\022\017\n\007subCode\030\003 \001(\rB<\n:" + + "tech.ordinaryroad.live.chat.client.codec" + + ".kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebError_descriptor, + new java.lang.String[] { "Code", "Msg", "SubCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebFeedPushOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebFeedPushOuterClass.java new file mode 100644 index 0000000..9a41615 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebFeedPushOuterClass.java @@ -0,0 +1,3488 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebFeedPush.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebFeedPushOuterClass { + private SCWebFeedPushOuterClass() {} + 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 SCWebFeedPushOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebFeedPush) + com.google.protobuf.MessageOrBuilder { + + /** + * string displayWatchingCount = 1; + * @return The displayWatchingCount. + */ + java.lang.String getDisplayWatchingCount(); + /** + * string displayWatchingCount = 1; + * @return The bytes for displayWatchingCount. + */ + com.google.protobuf.ByteString + getDisplayWatchingCountBytes(); + + /** + * string displayLikeCount = 2; + * @return The displayLikeCount. + */ + java.lang.String getDisplayLikeCount(); + /** + * string displayLikeCount = 2; + * @return The bytes for displayLikeCount. + */ + com.google.protobuf.ByteString + getDisplayLikeCountBytes(); + + /** + * uint64 pendingLikeCount = 3; + * @return The pendingLikeCount. + */ + long getPendingLikeCount(); + + /** + * uint64 pushInterval = 4; + * @return The pushInterval. + */ + long getPushInterval(); + + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + java.util.List + getCommentFeedsList(); + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getCommentFeeds(int index); + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + int getCommentFeedsCount(); + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + java.util.List + getCommentFeedsOrBuilderList(); + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder getCommentFeedsOrBuilder( + int index); + + /** + * string commentCursor = 6; + * @return The commentCursor. + */ + java.lang.String getCommentCursor(); + /** + * string commentCursor = 6; + * @return The bytes for commentCursor. + */ + com.google.protobuf.ByteString + getCommentCursorBytes(); + + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + java.util.List + getComboCommentFeedList(); + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getComboCommentFeed(int index); + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + int getComboCommentFeedCount(); + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + java.util.List + getComboCommentFeedOrBuilderList(); + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder getComboCommentFeedOrBuilder( + int index); + + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + java.util.List + getLikeFeedsList(); + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getLikeFeeds(int index); + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + int getLikeFeedsCount(); + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + java.util.List + getLikeFeedsOrBuilderList(); + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder getLikeFeedsOrBuilder( + int index); + + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + java.util.List + getGiftFeedsList(); + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getGiftFeeds(int index); + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + int getGiftFeedsCount(); + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + java.util.List + getGiftFeedsOrBuilderList(); + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder getGiftFeedsOrBuilder( + int index); + + /** + * string giftCursor = 10; + * @return The giftCursor. + */ + java.lang.String getGiftCursor(); + /** + * string giftCursor = 10; + * @return The bytes for giftCursor. + */ + com.google.protobuf.ByteString + getGiftCursorBytes(); + + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + java.util.List + getSystemNoticeFeedsList(); + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getSystemNoticeFeeds(int index); + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + int getSystemNoticeFeedsCount(); + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + java.util.List + getSystemNoticeFeedsOrBuilderList(); + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder getSystemNoticeFeedsOrBuilder( + int index); + + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + java.util.List + getShareFeedsList(); + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getShareFeeds(int index); + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + int getShareFeedsCount(); + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + java.util.List + getShareFeedsOrBuilderList(); + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder getShareFeedsOrBuilder( + int index); + } + /** + * Protobuf type {@code SCWebFeedPush} + */ + public static final class SCWebFeedPush extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebFeedPush) + SCWebFeedPushOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebFeedPush.newBuilder() to construct. + private SCWebFeedPush(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebFeedPush() { + displayWatchingCount_ = ""; + displayLikeCount_ = ""; + commentFeeds_ = java.util.Collections.emptyList(); + commentCursor_ = ""; + comboCommentFeed_ = java.util.Collections.emptyList(); + likeFeeds_ = java.util.Collections.emptyList(); + giftFeeds_ = java.util.Collections.emptyList(); + giftCursor_ = ""; + systemNoticeFeeds_ = java.util.Collections.emptyList(); + shareFeeds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebFeedPush(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.Builder.class); + } + + public static final int DISPLAYWATCHINGCOUNT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object displayWatchingCount_ = ""; + /** + * string displayWatchingCount = 1; + * @return The displayWatchingCount. + */ + @java.lang.Override + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } + } + /** + * string displayWatchingCount = 1; + * @return The bytes for displayWatchingCount. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYLIKECOUNT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object displayLikeCount_ = ""; + /** + * string displayLikeCount = 2; + * @return The displayLikeCount. + */ + @java.lang.Override + public java.lang.String getDisplayLikeCount() { + java.lang.Object ref = displayLikeCount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayLikeCount_ = s; + return s; + } + } + /** + * string displayLikeCount = 2; + * @return The bytes for displayLikeCount. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayLikeCountBytes() { + java.lang.Object ref = displayLikeCount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayLikeCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PENDINGLIKECOUNT_FIELD_NUMBER = 3; + private long pendingLikeCount_ = 0L; + /** + * uint64 pendingLikeCount = 3; + * @return The pendingLikeCount. + */ + @java.lang.Override + public long getPendingLikeCount() { + return pendingLikeCount_; + } + + public static final int PUSHINTERVAL_FIELD_NUMBER = 4; + private long pushInterval_ = 0L; + /** + * uint64 pushInterval = 4; + * @return The pushInterval. + */ + @java.lang.Override + public long getPushInterval() { + return pushInterval_; + } + + public static final int COMMENTFEEDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List commentFeeds_; + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + @java.lang.Override + public java.util.List getCommentFeedsList() { + return commentFeeds_; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + @java.lang.Override + public java.util.List + getCommentFeedsOrBuilderList() { + return commentFeeds_; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + @java.lang.Override + public int getCommentFeedsCount() { + return commentFeeds_.size(); + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getCommentFeeds(int index) { + return commentFeeds_.get(index); + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder getCommentFeedsOrBuilder( + int index) { + return commentFeeds_.get(index); + } + + public static final int COMMENTCURSOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object commentCursor_ = ""; + /** + * string commentCursor = 6; + * @return The commentCursor. + */ + @java.lang.Override + public java.lang.String getCommentCursor() { + java.lang.Object ref = commentCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commentCursor_ = s; + return s; + } + } + /** + * string commentCursor = 6; + * @return The bytes for commentCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentCursorBytes() { + java.lang.Object ref = commentCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + commentCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMBOCOMMENTFEED_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private java.util.List comboCommentFeed_; + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + @java.lang.Override + public java.util.List getComboCommentFeedList() { + return comboCommentFeed_; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + @java.lang.Override + public java.util.List + getComboCommentFeedOrBuilderList() { + return comboCommentFeed_; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + @java.lang.Override + public int getComboCommentFeedCount() { + return comboCommentFeed_.size(); + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getComboCommentFeed(int index) { + return comboCommentFeed_.get(index); + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder getComboCommentFeedOrBuilder( + int index) { + return comboCommentFeed_.get(index); + } + + public static final int LIKEFEEDS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List likeFeeds_; + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + @java.lang.Override + public java.util.List getLikeFeedsList() { + return likeFeeds_; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + @java.lang.Override + public java.util.List + getLikeFeedsOrBuilderList() { + return likeFeeds_; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + @java.lang.Override + public int getLikeFeedsCount() { + return likeFeeds_.size(); + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getLikeFeeds(int index) { + return likeFeeds_.get(index); + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder getLikeFeedsOrBuilder( + int index) { + return likeFeeds_.get(index); + } + + public static final int GIFTFEEDS_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private java.util.List giftFeeds_; + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + @java.lang.Override + public java.util.List getGiftFeedsList() { + return giftFeeds_; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + @java.lang.Override + public java.util.List + getGiftFeedsOrBuilderList() { + return giftFeeds_; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + @java.lang.Override + public int getGiftFeedsCount() { + return giftFeeds_.size(); + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getGiftFeeds(int index) { + return giftFeeds_.get(index); + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder getGiftFeedsOrBuilder( + int index) { + return giftFeeds_.get(index); + } + + public static final int GIFTCURSOR_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object giftCursor_ = ""; + /** + * string giftCursor = 10; + * @return The giftCursor. + */ + @java.lang.Override + public java.lang.String getGiftCursor() { + java.lang.Object ref = giftCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + giftCursor_ = s; + return s; + } + } + /** + * string giftCursor = 10; + * @return The bytes for giftCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGiftCursorBytes() { + java.lang.Object ref = giftCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + giftCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYSTEMNOTICEFEEDS_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List systemNoticeFeeds_; + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + @java.lang.Override + public java.util.List getSystemNoticeFeedsList() { + return systemNoticeFeeds_; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + @java.lang.Override + public java.util.List + getSystemNoticeFeedsOrBuilderList() { + return systemNoticeFeeds_; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + @java.lang.Override + public int getSystemNoticeFeedsCount() { + return systemNoticeFeeds_.size(); + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getSystemNoticeFeeds(int index) { + return systemNoticeFeeds_.get(index); + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder getSystemNoticeFeedsOrBuilder( + int index) { + return systemNoticeFeeds_.get(index); + } + + public static final int SHAREFEEDS_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List shareFeeds_; + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + @java.lang.Override + public java.util.List getShareFeedsList() { + return shareFeeds_; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + @java.lang.Override + public java.util.List + getShareFeedsOrBuilderList() { + return shareFeeds_; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + @java.lang.Override + public int getShareFeedsCount() { + return shareFeeds_.size(); + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getShareFeeds(int index) { + return shareFeeds_.get(index); + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder getShareFeedsOrBuilder( + int index) { + return shareFeeds_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayWatchingCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLikeCount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayLikeCount_); + } + if (pendingLikeCount_ != 0L) { + output.writeUInt64(3, pendingLikeCount_); + } + if (pushInterval_ != 0L) { + output.writeUInt64(4, pushInterval_); + } + for (int i = 0; i < commentFeeds_.size(); i++) { + output.writeMessage(5, commentFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(commentCursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, commentCursor_); + } + for (int i = 0; i < comboCommentFeed_.size(); i++) { + output.writeMessage(7, comboCommentFeed_.get(i)); + } + for (int i = 0; i < likeFeeds_.size(); i++) { + output.writeMessage(8, likeFeeds_.get(i)); + } + for (int i = 0; i < giftFeeds_.size(); i++) { + output.writeMessage(9, giftFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(giftCursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, giftCursor_); + } + for (int i = 0; i < systemNoticeFeeds_.size(); i++) { + output.writeMessage(11, systemNoticeFeeds_.get(i)); + } + for (int i = 0; i < shareFeeds_.size(); i++) { + output.writeMessage(12, shareFeeds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayWatchingCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLikeCount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayLikeCount_); + } + if (pendingLikeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, pendingLikeCount_); + } + if (pushInterval_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, pushInterval_); + } + for (int i = 0; i < commentFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, commentFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(commentCursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, commentCursor_); + } + for (int i = 0; i < comboCommentFeed_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, comboCommentFeed_.get(i)); + } + for (int i = 0; i < likeFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, likeFeeds_.get(i)); + } + for (int i = 0; i < giftFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, giftFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(giftCursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, giftCursor_); + } + for (int i = 0; i < systemNoticeFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, systemNoticeFeeds_.get(i)); + } + for (int i = 0; i < shareFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, shareFeeds_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush) obj; + + if (!getDisplayWatchingCount() + .equals(other.getDisplayWatchingCount())) return false; + if (!getDisplayLikeCount() + .equals(other.getDisplayLikeCount())) return false; + if (getPendingLikeCount() + != other.getPendingLikeCount()) return false; + if (getPushInterval() + != other.getPushInterval()) return false; + if (!getCommentFeedsList() + .equals(other.getCommentFeedsList())) return false; + if (!getCommentCursor() + .equals(other.getCommentCursor())) return false; + if (!getComboCommentFeedList() + .equals(other.getComboCommentFeedList())) return false; + if (!getLikeFeedsList() + .equals(other.getLikeFeedsList())) return false; + if (!getGiftFeedsList() + .equals(other.getGiftFeedsList())) return false; + if (!getGiftCursor() + .equals(other.getGiftCursor())) return false; + if (!getSystemNoticeFeedsList() + .equals(other.getSystemNoticeFeedsList())) return false; + if (!getShareFeedsList() + .equals(other.getShareFeedsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAYWATCHINGCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayWatchingCount().hashCode(); + hash = (37 * hash) + DISPLAYLIKECOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayLikeCount().hashCode(); + hash = (37 * hash) + PENDINGLIKECOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPendingLikeCount()); + hash = (37 * hash) + PUSHINTERVAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPushInterval()); + if (getCommentFeedsCount() > 0) { + hash = (37 * hash) + COMMENTFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getCommentFeedsList().hashCode(); + } + hash = (37 * hash) + COMMENTCURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCommentCursor().hashCode(); + if (getComboCommentFeedCount() > 0) { + hash = (37 * hash) + COMBOCOMMENTFEED_FIELD_NUMBER; + hash = (53 * hash) + getComboCommentFeedList().hashCode(); + } + if (getLikeFeedsCount() > 0) { + hash = (37 * hash) + LIKEFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getLikeFeedsList().hashCode(); + } + if (getGiftFeedsCount() > 0) { + hash = (37 * hash) + GIFTFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getGiftFeedsList().hashCode(); + } + hash = (37 * hash) + GIFTCURSOR_FIELD_NUMBER; + hash = (53 * hash) + getGiftCursor().hashCode(); + if (getSystemNoticeFeedsCount() > 0) { + hash = (37 * hash) + SYSTEMNOTICEFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getSystemNoticeFeedsList().hashCode(); + } + if (getShareFeedsCount() > 0) { + hash = (37 * hash) + SHAREFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getShareFeedsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebFeedPush} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebFeedPush) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPushOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayWatchingCount_ = ""; + displayLikeCount_ = ""; + pendingLikeCount_ = 0L; + pushInterval_ = 0L; + if (commentFeedsBuilder_ == null) { + commentFeeds_ = java.util.Collections.emptyList(); + } else { + commentFeeds_ = null; + commentFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + commentCursor_ = ""; + if (comboCommentFeedBuilder_ == null) { + comboCommentFeed_ = java.util.Collections.emptyList(); + } else { + comboCommentFeed_ = null; + comboCommentFeedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (likeFeedsBuilder_ == null) { + likeFeeds_ = java.util.Collections.emptyList(); + } else { + likeFeeds_ = null; + likeFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (giftFeedsBuilder_ == null) { + giftFeeds_ = java.util.Collections.emptyList(); + } else { + giftFeeds_ = null; + giftFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + giftCursor_ = ""; + if (systemNoticeFeedsBuilder_ == null) { + systemNoticeFeeds_ = java.util.Collections.emptyList(); + } else { + systemNoticeFeeds_ = null; + systemNoticeFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + if (shareFeedsBuilder_ == null) { + shareFeeds_ = java.util.Collections.emptyList(); + } else { + shareFeeds_ = null; + shareFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result) { + if (commentFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + commentFeeds_ = java.util.Collections.unmodifiableList(commentFeeds_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.commentFeeds_ = commentFeeds_; + } else { + result.commentFeeds_ = commentFeedsBuilder_.build(); + } + if (comboCommentFeedBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + comboCommentFeed_ = java.util.Collections.unmodifiableList(comboCommentFeed_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.comboCommentFeed_ = comboCommentFeed_; + } else { + result.comboCommentFeed_ = comboCommentFeedBuilder_.build(); + } + if (likeFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + likeFeeds_ = java.util.Collections.unmodifiableList(likeFeeds_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.likeFeeds_ = likeFeeds_; + } else { + result.likeFeeds_ = likeFeedsBuilder_.build(); + } + if (giftFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + giftFeeds_ = java.util.Collections.unmodifiableList(giftFeeds_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.giftFeeds_ = giftFeeds_; + } else { + result.giftFeeds_ = giftFeedsBuilder_.build(); + } + if (systemNoticeFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + systemNoticeFeeds_ = java.util.Collections.unmodifiableList(systemNoticeFeeds_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.systemNoticeFeeds_ = systemNoticeFeeds_; + } else { + result.systemNoticeFeeds_ = systemNoticeFeedsBuilder_.build(); + } + if (shareFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + shareFeeds_ = java.util.Collections.unmodifiableList(shareFeeds_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.shareFeeds_ = shareFeeds_; + } else { + result.shareFeeds_ = shareFeedsBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayWatchingCount_ = displayWatchingCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayLikeCount_ = displayLikeCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pendingLikeCount_ = pendingLikeCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pushInterval_ = pushInterval_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.commentCursor_ = commentCursor_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.giftCursor_ = giftCursor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.getDefaultInstance()) return this; + if (!other.getDisplayWatchingCount().isEmpty()) { + displayWatchingCount_ = other.displayWatchingCount_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayLikeCount().isEmpty()) { + displayLikeCount_ = other.displayLikeCount_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPendingLikeCount() != 0L) { + setPendingLikeCount(other.getPendingLikeCount()); + } + if (other.getPushInterval() != 0L) { + setPushInterval(other.getPushInterval()); + } + if (commentFeedsBuilder_ == null) { + if (!other.commentFeeds_.isEmpty()) { + if (commentFeeds_.isEmpty()) { + commentFeeds_ = other.commentFeeds_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureCommentFeedsIsMutable(); + commentFeeds_.addAll(other.commentFeeds_); + } + onChanged(); + } + } else { + if (!other.commentFeeds_.isEmpty()) { + if (commentFeedsBuilder_.isEmpty()) { + commentFeedsBuilder_.dispose(); + commentFeedsBuilder_ = null; + commentFeeds_ = other.commentFeeds_; + bitField0_ = (bitField0_ & ~0x00000010); + commentFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCommentFeedsFieldBuilder() : null; + } else { + commentFeedsBuilder_.addAllMessages(other.commentFeeds_); + } + } + } + if (!other.getCommentCursor().isEmpty()) { + commentCursor_ = other.commentCursor_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (comboCommentFeedBuilder_ == null) { + if (!other.comboCommentFeed_.isEmpty()) { + if (comboCommentFeed_.isEmpty()) { + comboCommentFeed_ = other.comboCommentFeed_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.addAll(other.comboCommentFeed_); + } + onChanged(); + } + } else { + if (!other.comboCommentFeed_.isEmpty()) { + if (comboCommentFeedBuilder_.isEmpty()) { + comboCommentFeedBuilder_.dispose(); + comboCommentFeedBuilder_ = null; + comboCommentFeed_ = other.comboCommentFeed_; + bitField0_ = (bitField0_ & ~0x00000040); + comboCommentFeedBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getComboCommentFeedFieldBuilder() : null; + } else { + comboCommentFeedBuilder_.addAllMessages(other.comboCommentFeed_); + } + } + } + if (likeFeedsBuilder_ == null) { + if (!other.likeFeeds_.isEmpty()) { + if (likeFeeds_.isEmpty()) { + likeFeeds_ = other.likeFeeds_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureLikeFeedsIsMutable(); + likeFeeds_.addAll(other.likeFeeds_); + } + onChanged(); + } + } else { + if (!other.likeFeeds_.isEmpty()) { + if (likeFeedsBuilder_.isEmpty()) { + likeFeedsBuilder_.dispose(); + likeFeedsBuilder_ = null; + likeFeeds_ = other.likeFeeds_; + bitField0_ = (bitField0_ & ~0x00000080); + likeFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLikeFeedsFieldBuilder() : null; + } else { + likeFeedsBuilder_.addAllMessages(other.likeFeeds_); + } + } + } + if (giftFeedsBuilder_ == null) { + if (!other.giftFeeds_.isEmpty()) { + if (giftFeeds_.isEmpty()) { + giftFeeds_ = other.giftFeeds_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureGiftFeedsIsMutable(); + giftFeeds_.addAll(other.giftFeeds_); + } + onChanged(); + } + } else { + if (!other.giftFeeds_.isEmpty()) { + if (giftFeedsBuilder_.isEmpty()) { + giftFeedsBuilder_.dispose(); + giftFeedsBuilder_ = null; + giftFeeds_ = other.giftFeeds_; + bitField0_ = (bitField0_ & ~0x00000100); + giftFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGiftFeedsFieldBuilder() : null; + } else { + giftFeedsBuilder_.addAllMessages(other.giftFeeds_); + } + } + } + if (!other.getGiftCursor().isEmpty()) { + giftCursor_ = other.giftCursor_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (systemNoticeFeedsBuilder_ == null) { + if (!other.systemNoticeFeeds_.isEmpty()) { + if (systemNoticeFeeds_.isEmpty()) { + systemNoticeFeeds_ = other.systemNoticeFeeds_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.addAll(other.systemNoticeFeeds_); + } + onChanged(); + } + } else { + if (!other.systemNoticeFeeds_.isEmpty()) { + if (systemNoticeFeedsBuilder_.isEmpty()) { + systemNoticeFeedsBuilder_.dispose(); + systemNoticeFeedsBuilder_ = null; + systemNoticeFeeds_ = other.systemNoticeFeeds_; + bitField0_ = (bitField0_ & ~0x00000400); + systemNoticeFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSystemNoticeFeedsFieldBuilder() : null; + } else { + systemNoticeFeedsBuilder_.addAllMessages(other.systemNoticeFeeds_); + } + } + } + if (shareFeedsBuilder_ == null) { + if (!other.shareFeeds_.isEmpty()) { + if (shareFeeds_.isEmpty()) { + shareFeeds_ = other.shareFeeds_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureShareFeedsIsMutable(); + shareFeeds_.addAll(other.shareFeeds_); + } + onChanged(); + } + } else { + if (!other.shareFeeds_.isEmpty()) { + if (shareFeedsBuilder_.isEmpty()) { + shareFeedsBuilder_.dispose(); + shareFeedsBuilder_ = null; + shareFeeds_ = other.shareFeeds_; + bitField0_ = (bitField0_ & ~0x00000800); + shareFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getShareFeedsFieldBuilder() : null; + } else { + shareFeedsBuilder_.addAllMessages(other.shareFeeds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + displayWatchingCount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + displayLikeCount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pendingLikeCount_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + pushInterval_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.parser(), + extensionRegistry); + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.add(m); + } else { + commentFeedsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + commentCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.parser(), + extensionRegistry); + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(m); + } else { + comboCommentFeedBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.parser(), + extensionRegistry); + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.add(m); + } else { + likeFeedsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.parser(), + extensionRegistry); + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.add(m); + } else { + giftFeedsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: { + giftCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.parser(), + extensionRegistry); + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(m); + } else { + systemNoticeFeedsBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.parser(), + extensionRegistry); + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.add(m); + } else { + shareFeedsBuilder_.addMessage(m); + } + break; + } // case 98 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object displayWatchingCount_ = ""; + /** + * string displayWatchingCount = 1; + * @return The displayWatchingCount. + */ + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayWatchingCount = 1; + * @return The bytes for displayWatchingCount. + */ + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayWatchingCount = 1; + * @param value The displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCount( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayWatchingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string displayWatchingCount = 1; + * @return This builder for chaining. + */ + public Builder clearDisplayWatchingCount() { + displayWatchingCount_ = getDefaultInstance().getDisplayWatchingCount(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string displayWatchingCount = 1; + * @param value The bytes for displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayWatchingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayLikeCount_ = ""; + /** + * string displayLikeCount = 2; + * @return The displayLikeCount. + */ + public java.lang.String getDisplayLikeCount() { + java.lang.Object ref = displayLikeCount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayLikeCount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayLikeCount = 2; + * @return The bytes for displayLikeCount. + */ + public com.google.protobuf.ByteString + getDisplayLikeCountBytes() { + java.lang.Object ref = displayLikeCount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayLikeCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayLikeCount = 2; + * @param value The displayLikeCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayLikeCount( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayLikeCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string displayLikeCount = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayLikeCount() { + displayLikeCount_ = getDefaultInstance().getDisplayLikeCount(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string displayLikeCount = 2; + * @param value The bytes for displayLikeCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayLikeCountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayLikeCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long pendingLikeCount_ ; + /** + * uint64 pendingLikeCount = 3; + * @return The pendingLikeCount. + */ + @java.lang.Override + public long getPendingLikeCount() { + return pendingLikeCount_; + } + /** + * uint64 pendingLikeCount = 3; + * @param value The pendingLikeCount to set. + * @return This builder for chaining. + */ + public Builder setPendingLikeCount(long value) { + + pendingLikeCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 pendingLikeCount = 3; + * @return This builder for chaining. + */ + public Builder clearPendingLikeCount() { + bitField0_ = (bitField0_ & ~0x00000004); + pendingLikeCount_ = 0L; + onChanged(); + return this; + } + + private long pushInterval_ ; + /** + * uint64 pushInterval = 4; + * @return The pushInterval. + */ + @java.lang.Override + public long getPushInterval() { + return pushInterval_; + } + /** + * uint64 pushInterval = 4; + * @param value The pushInterval to set. + * @return This builder for chaining. + */ + public Builder setPushInterval(long value) { + + pushInterval_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 pushInterval = 4; + * @return This builder for chaining. + */ + public Builder clearPushInterval() { + bitField0_ = (bitField0_ & ~0x00000008); + pushInterval_ = 0L; + onChanged(); + return this; + } + + private java.util.List commentFeeds_ = + java.util.Collections.emptyList(); + private void ensureCommentFeedsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + commentFeeds_ = new java.util.ArrayList(commentFeeds_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder> commentFeedsBuilder_; + + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public java.util.List getCommentFeedsList() { + if (commentFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(commentFeeds_); + } else { + return commentFeedsBuilder_.getMessageList(); + } + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public int getCommentFeedsCount() { + if (commentFeedsBuilder_ == null) { + return commentFeeds_.size(); + } else { + return commentFeedsBuilder_.getCount(); + } + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getCommentFeeds(int index) { + if (commentFeedsBuilder_ == null) { + return commentFeeds_.get(index); + } else { + return commentFeedsBuilder_.getMessage(index); + } + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder setCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed value) { + if (commentFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentFeedsIsMutable(); + commentFeeds_.set(index, value); + onChanged(); + } else { + commentFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder setCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder builderForValue) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + commentFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder addCommentFeeds(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed value) { + if (commentFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentFeedsIsMutable(); + commentFeeds_.add(value); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder addCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed value) { + if (commentFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentFeedsIsMutable(); + commentFeeds_.add(index, value); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder addCommentFeeds( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder builderForValue) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.add(builderForValue.build()); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder addCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder builderForValue) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder addAllCommentFeeds( + java.lang.Iterable values) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, commentFeeds_); + onChanged(); + } else { + commentFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder clearCommentFeeds() { + if (commentFeedsBuilder_ == null) { + commentFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + commentFeedsBuilder_.clear(); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public Builder removeCommentFeeds(int index) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.remove(index); + onChanged(); + } else { + commentFeedsBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder getCommentFeedsBuilder( + int index) { + return getCommentFeedsFieldBuilder().getBuilder(index); + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder getCommentFeedsOrBuilder( + int index) { + if (commentFeedsBuilder_ == null) { + return commentFeeds_.get(index); } else { + return commentFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public java.util.List + getCommentFeedsOrBuilderList() { + if (commentFeedsBuilder_ != null) { + return commentFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(commentFeeds_); + } + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder addCommentFeedsBuilder() { + return getCommentFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance()); + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder addCommentFeedsBuilder( + int index) { + return getCommentFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance()); + } + /** + * repeated .WebCommentFeed commentFeeds = 5; + */ + public java.util.List + getCommentFeedsBuilderList() { + return getCommentFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder> + getCommentFeedsFieldBuilder() { + if (commentFeedsBuilder_ == null) { + commentFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder>( + commentFeeds_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + commentFeeds_ = null; + } + return commentFeedsBuilder_; + } + + private java.lang.Object commentCursor_ = ""; + /** + * string commentCursor = 6; + * @return The commentCursor. + */ + public java.lang.String getCommentCursor() { + java.lang.Object ref = commentCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commentCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string commentCursor = 6; + * @return The bytes for commentCursor. + */ + public com.google.protobuf.ByteString + getCommentCursorBytes() { + java.lang.Object ref = commentCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + commentCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string commentCursor = 6; + * @param value The commentCursor to set. + * @return This builder for chaining. + */ + public Builder setCommentCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + commentCursor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string commentCursor = 6; + * @return This builder for chaining. + */ + public Builder clearCommentCursor() { + commentCursor_ = getDefaultInstance().getCommentCursor(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string commentCursor = 6; + * @param value The bytes for commentCursor to set. + * @return This builder for chaining. + */ + public Builder setCommentCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + commentCursor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List comboCommentFeed_ = + java.util.Collections.emptyList(); + private void ensureComboCommentFeedIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + comboCommentFeed_ = new java.util.ArrayList(comboCommentFeed_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder> comboCommentFeedBuilder_; + + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public java.util.List getComboCommentFeedList() { + if (comboCommentFeedBuilder_ == null) { + return java.util.Collections.unmodifiableList(comboCommentFeed_); + } else { + return comboCommentFeedBuilder_.getMessageList(); + } + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public int getComboCommentFeedCount() { + if (comboCommentFeedBuilder_ == null) { + return comboCommentFeed_.size(); + } else { + return comboCommentFeedBuilder_.getCount(); + } + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getComboCommentFeed(int index) { + if (comboCommentFeedBuilder_ == null) { + return comboCommentFeed_.get(index); + } else { + return comboCommentFeedBuilder_.getMessage(index); + } + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder setComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed value) { + if (comboCommentFeedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.set(index, value); + onChanged(); + } else { + comboCommentFeedBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder setComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder builderForValue) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.set(index, builderForValue.build()); + onChanged(); + } else { + comboCommentFeedBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder addComboCommentFeed(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed value) { + if (comboCommentFeedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(value); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder addComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed value) { + if (comboCommentFeedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(index, value); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder addComboCommentFeed( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder builderForValue) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(builderForValue.build()); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder addComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder builderForValue) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(index, builderForValue.build()); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder addAllComboCommentFeed( + java.lang.Iterable values) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, comboCommentFeed_); + onChanged(); + } else { + comboCommentFeedBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder clearComboCommentFeed() { + if (comboCommentFeedBuilder_ == null) { + comboCommentFeed_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + comboCommentFeedBuilder_.clear(); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public Builder removeComboCommentFeed(int index) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.remove(index); + onChanged(); + } else { + comboCommentFeedBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder getComboCommentFeedBuilder( + int index) { + return getComboCommentFeedFieldBuilder().getBuilder(index); + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder getComboCommentFeedOrBuilder( + int index) { + if (comboCommentFeedBuilder_ == null) { + return comboCommentFeed_.get(index); } else { + return comboCommentFeedBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public java.util.List + getComboCommentFeedOrBuilderList() { + if (comboCommentFeedBuilder_ != null) { + return comboCommentFeedBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(comboCommentFeed_); + } + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder addComboCommentFeedBuilder() { + return getComboCommentFeedFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance()); + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder addComboCommentFeedBuilder( + int index) { + return getComboCommentFeedFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance()); + } + /** + * repeated .WebComboCommentFeed comboCommentFeed = 7; + */ + public java.util.List + getComboCommentFeedBuilderList() { + return getComboCommentFeedFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder> + getComboCommentFeedFieldBuilder() { + if (comboCommentFeedBuilder_ == null) { + comboCommentFeedBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder>( + comboCommentFeed_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + comboCommentFeed_ = null; + } + return comboCommentFeedBuilder_; + } + + private java.util.List likeFeeds_ = + java.util.Collections.emptyList(); + private void ensureLikeFeedsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + likeFeeds_ = new java.util.ArrayList(likeFeeds_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder> likeFeedsBuilder_; + + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public java.util.List getLikeFeedsList() { + if (likeFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(likeFeeds_); + } else { + return likeFeedsBuilder_.getMessageList(); + } + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public int getLikeFeedsCount() { + if (likeFeedsBuilder_ == null) { + return likeFeeds_.size(); + } else { + return likeFeedsBuilder_.getCount(); + } + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getLikeFeeds(int index) { + if (likeFeedsBuilder_ == null) { + return likeFeeds_.get(index); + } else { + return likeFeedsBuilder_.getMessage(index); + } + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder setLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed value) { + if (likeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLikeFeedsIsMutable(); + likeFeeds_.set(index, value); + onChanged(); + } else { + likeFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder setLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder builderForValue) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + likeFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder addLikeFeeds(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed value) { + if (likeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLikeFeedsIsMutable(); + likeFeeds_.add(value); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder addLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed value) { + if (likeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLikeFeedsIsMutable(); + likeFeeds_.add(index, value); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder addLikeFeeds( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder builderForValue) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.add(builderForValue.build()); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder addLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder builderForValue) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder addAllLikeFeeds( + java.lang.Iterable values) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, likeFeeds_); + onChanged(); + } else { + likeFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder clearLikeFeeds() { + if (likeFeedsBuilder_ == null) { + likeFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + likeFeedsBuilder_.clear(); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public Builder removeLikeFeeds(int index) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.remove(index); + onChanged(); + } else { + likeFeedsBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder getLikeFeedsBuilder( + int index) { + return getLikeFeedsFieldBuilder().getBuilder(index); + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder getLikeFeedsOrBuilder( + int index) { + if (likeFeedsBuilder_ == null) { + return likeFeeds_.get(index); } else { + return likeFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public java.util.List + getLikeFeedsOrBuilderList() { + if (likeFeedsBuilder_ != null) { + return likeFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(likeFeeds_); + } + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder addLikeFeedsBuilder() { + return getLikeFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance()); + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder addLikeFeedsBuilder( + int index) { + return getLikeFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance()); + } + /** + * repeated .WebLikeFeed likeFeeds = 8; + */ + public java.util.List + getLikeFeedsBuilderList() { + return getLikeFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder> + getLikeFeedsFieldBuilder() { + if (likeFeedsBuilder_ == null) { + likeFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder>( + likeFeeds_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + likeFeeds_ = null; + } + return likeFeedsBuilder_; + } + + private java.util.List giftFeeds_ = + java.util.Collections.emptyList(); + private void ensureGiftFeedsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + giftFeeds_ = new java.util.ArrayList(giftFeeds_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder> giftFeedsBuilder_; + + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public java.util.List getGiftFeedsList() { + if (giftFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(giftFeeds_); + } else { + return giftFeedsBuilder_.getMessageList(); + } + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public int getGiftFeedsCount() { + if (giftFeedsBuilder_ == null) { + return giftFeeds_.size(); + } else { + return giftFeedsBuilder_.getCount(); + } + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getGiftFeeds(int index) { + if (giftFeedsBuilder_ == null) { + return giftFeeds_.get(index); + } else { + return giftFeedsBuilder_.getMessage(index); + } + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder setGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed value) { + if (giftFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGiftFeedsIsMutable(); + giftFeeds_.set(index, value); + onChanged(); + } else { + giftFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder setGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder builderForValue) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + giftFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder addGiftFeeds(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed value) { + if (giftFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGiftFeedsIsMutable(); + giftFeeds_.add(value); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder addGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed value) { + if (giftFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGiftFeedsIsMutable(); + giftFeeds_.add(index, value); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder addGiftFeeds( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder builderForValue) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.add(builderForValue.build()); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder addGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder builderForValue) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder addAllGiftFeeds( + java.lang.Iterable values) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, giftFeeds_); + onChanged(); + } else { + giftFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder clearGiftFeeds() { + if (giftFeedsBuilder_ == null) { + giftFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + giftFeedsBuilder_.clear(); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public Builder removeGiftFeeds(int index) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.remove(index); + onChanged(); + } else { + giftFeedsBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder getGiftFeedsBuilder( + int index) { + return getGiftFeedsFieldBuilder().getBuilder(index); + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder getGiftFeedsOrBuilder( + int index) { + if (giftFeedsBuilder_ == null) { + return giftFeeds_.get(index); } else { + return giftFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public java.util.List + getGiftFeedsOrBuilderList() { + if (giftFeedsBuilder_ != null) { + return giftFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(giftFeeds_); + } + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder addGiftFeedsBuilder() { + return getGiftFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance()); + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder addGiftFeedsBuilder( + int index) { + return getGiftFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance()); + } + /** + * repeated .WebGiftFeed giftFeeds = 9; + */ + public java.util.List + getGiftFeedsBuilderList() { + return getGiftFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder> + getGiftFeedsFieldBuilder() { + if (giftFeedsBuilder_ == null) { + giftFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder>( + giftFeeds_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + giftFeeds_ = null; + } + return giftFeedsBuilder_; + } + + private java.lang.Object giftCursor_ = ""; + /** + * string giftCursor = 10; + * @return The giftCursor. + */ + public java.lang.String getGiftCursor() { + java.lang.Object ref = giftCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + giftCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string giftCursor = 10; + * @return The bytes for giftCursor. + */ + public com.google.protobuf.ByteString + getGiftCursorBytes() { + java.lang.Object ref = giftCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + giftCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string giftCursor = 10; + * @param value The giftCursor to set. + * @return This builder for chaining. + */ + public Builder setGiftCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + giftCursor_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * string giftCursor = 10; + * @return This builder for chaining. + */ + public Builder clearGiftCursor() { + giftCursor_ = getDefaultInstance().getGiftCursor(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * string giftCursor = 10; + * @param value The bytes for giftCursor to set. + * @return This builder for chaining. + */ + public Builder setGiftCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + giftCursor_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.util.List systemNoticeFeeds_ = + java.util.Collections.emptyList(); + private void ensureSystemNoticeFeedsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + systemNoticeFeeds_ = new java.util.ArrayList(systemNoticeFeeds_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder> systemNoticeFeedsBuilder_; + + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public java.util.List getSystemNoticeFeedsList() { + if (systemNoticeFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(systemNoticeFeeds_); + } else { + return systemNoticeFeedsBuilder_.getMessageList(); + } + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public int getSystemNoticeFeedsCount() { + if (systemNoticeFeedsBuilder_ == null) { + return systemNoticeFeeds_.size(); + } else { + return systemNoticeFeedsBuilder_.getCount(); + } + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getSystemNoticeFeeds(int index) { + if (systemNoticeFeedsBuilder_ == null) { + return systemNoticeFeeds_.get(index); + } else { + return systemNoticeFeedsBuilder_.getMessage(index); + } + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder setSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed value) { + if (systemNoticeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.set(index, value); + onChanged(); + } else { + systemNoticeFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder setSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder builderForValue) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + systemNoticeFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder addSystemNoticeFeeds(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed value) { + if (systemNoticeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(value); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder addSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed value) { + if (systemNoticeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(index, value); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder addSystemNoticeFeeds( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder builderForValue) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(builderForValue.build()); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder addSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder builderForValue) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder addAllSystemNoticeFeeds( + java.lang.Iterable values) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, systemNoticeFeeds_); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder clearSystemNoticeFeeds() { + if (systemNoticeFeedsBuilder_ == null) { + systemNoticeFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + systemNoticeFeedsBuilder_.clear(); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public Builder removeSystemNoticeFeeds(int index) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.remove(index); + onChanged(); + } else { + systemNoticeFeedsBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder getSystemNoticeFeedsBuilder( + int index) { + return getSystemNoticeFeedsFieldBuilder().getBuilder(index); + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder getSystemNoticeFeedsOrBuilder( + int index) { + if (systemNoticeFeedsBuilder_ == null) { + return systemNoticeFeeds_.get(index); } else { + return systemNoticeFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public java.util.List + getSystemNoticeFeedsOrBuilderList() { + if (systemNoticeFeedsBuilder_ != null) { + return systemNoticeFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(systemNoticeFeeds_); + } + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder addSystemNoticeFeedsBuilder() { + return getSystemNoticeFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance()); + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder addSystemNoticeFeedsBuilder( + int index) { + return getSystemNoticeFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance()); + } + /** + * repeated .WebSystemNoticeFeed systemNoticeFeeds = 11; + */ + public java.util.List + getSystemNoticeFeedsBuilderList() { + return getSystemNoticeFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder> + getSystemNoticeFeedsFieldBuilder() { + if (systemNoticeFeedsBuilder_ == null) { + systemNoticeFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder>( + systemNoticeFeeds_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + systemNoticeFeeds_ = null; + } + return systemNoticeFeedsBuilder_; + } + + private java.util.List shareFeeds_ = + java.util.Collections.emptyList(); + private void ensureShareFeedsIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + shareFeeds_ = new java.util.ArrayList(shareFeeds_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder> shareFeedsBuilder_; + + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public java.util.List getShareFeedsList() { + if (shareFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(shareFeeds_); + } else { + return shareFeedsBuilder_.getMessageList(); + } + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public int getShareFeedsCount() { + if (shareFeedsBuilder_ == null) { + return shareFeeds_.size(); + } else { + return shareFeedsBuilder_.getCount(); + } + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getShareFeeds(int index) { + if (shareFeedsBuilder_ == null) { + return shareFeeds_.get(index); + } else { + return shareFeedsBuilder_.getMessage(index); + } + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder setShareFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed value) { + if (shareFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShareFeedsIsMutable(); + shareFeeds_.set(index, value); + onChanged(); + } else { + shareFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder setShareFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder builderForValue) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + shareFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder addShareFeeds(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed value) { + if (shareFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShareFeedsIsMutable(); + shareFeeds_.add(value); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder addShareFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed value) { + if (shareFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShareFeedsIsMutable(); + shareFeeds_.add(index, value); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder addShareFeeds( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder builderForValue) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.add(builderForValue.build()); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder addShareFeeds( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder builderForValue) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder addAllShareFeeds( + java.lang.Iterable values) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shareFeeds_); + onChanged(); + } else { + shareFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder clearShareFeeds() { + if (shareFeedsBuilder_ == null) { + shareFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + shareFeedsBuilder_.clear(); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public Builder removeShareFeeds(int index) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.remove(index); + onChanged(); + } else { + shareFeedsBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder getShareFeedsBuilder( + int index) { + return getShareFeedsFieldBuilder().getBuilder(index); + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder getShareFeedsOrBuilder( + int index) { + if (shareFeedsBuilder_ == null) { + return shareFeeds_.get(index); } else { + return shareFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public java.util.List + getShareFeedsOrBuilderList() { + if (shareFeedsBuilder_ != null) { + return shareFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shareFeeds_); + } + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder addShareFeedsBuilder() { + return getShareFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance()); + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder addShareFeedsBuilder( + int index) { + return getShareFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance()); + } + /** + * repeated .WebShareFeed shareFeeds = 12; + */ + public java.util.List + getShareFeedsBuilderList() { + return getShareFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder> + getShareFeedsFieldBuilder() { + if (shareFeedsBuilder_ == null) { + shareFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder>( + shareFeeds_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + shareFeeds_ = null; + } + return shareFeedsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebFeedPush) + } + + // @@protoc_insertion_point(class_scope:SCWebFeedPush) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebFeedPush parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebFeedPush_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebFeedPush_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\023SCWebFeedPush.proto\032\024WebCommentFeed.pr" + + "oto\032\031WebComboCommentFeed.proto\032\021WebLikeF" + + "eed.proto\032\021WebGiftFeed.proto\032\031WebSystemN" + + "oticeFeed.proto\032\022WebShareFeed.proto\"\217\003\n\r" + + "SCWebFeedPush\022\034\n\024displayWatchingCount\030\001 " + + "\001(\t\022\030\n\020displayLikeCount\030\002 \001(\t\022\030\n\020pending" + + "LikeCount\030\003 \001(\004\022\024\n\014pushInterval\030\004 \001(\004\022%\n" + + "\014commentFeeds\030\005 \003(\0132\017.WebCommentFeed\022\025\n\r" + + "commentCursor\030\006 \001(\t\022.\n\020comboCommentFeed\030" + + "\007 \003(\0132\024.WebComboCommentFeed\022\037\n\tlikeFeeds" + + "\030\010 \003(\0132\014.WebLikeFeed\022\037\n\tgiftFeeds\030\t \003(\0132" + + "\014.WebGiftFeed\022\022\n\ngiftCursor\030\n \001(\t\022/\n\021sys" + + "temNoticeFeeds\030\013 \003(\0132\024.WebSystemNoticeFe" + + "ed\022!\n\nshareFeeds\030\014 \003(\0132\r.WebShareFeedB<\n" + + ":tech.ordinaryroad.live.chat.client.code" + + "c.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.getDescriptor(), + }); + internal_static_SCWebFeedPush_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebFeedPush_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebFeedPush_descriptor, + new java.lang.String[] { "DisplayWatchingCount", "DisplayLikeCount", "PendingLikeCount", "PushInterval", "CommentFeeds", "CommentCursor", "ComboCommentFeed", "LikeFeeds", "GiftFeeds", "GiftCursor", "SystemNoticeFeeds", "ShareFeeds", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebGuessClosedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebGuessClosedOuterClass.java new file mode 100644 index 0000000..5d2c07b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebGuessClosedOuterClass.java @@ -0,0 +1,773 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebGuessClosed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebGuessClosedOuterClass { + private SCWebGuessClosedOuterClass() {} + 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 SCWebGuessClosedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebGuessClosed) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + + /** + * string guessId = 2; + * @return The guessId. + */ + java.lang.String getGuessId(); + /** + * string guessId = 2; + * @return The bytes for guessId. + */ + com.google.protobuf.ByteString + getGuessIdBytes(); + + /** + * uint64 displayMaxDelayMillis = 3; + * @return The displayMaxDelayMillis. + */ + long getDisplayMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebGuessClosed} + */ + public static final class SCWebGuessClosed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebGuessClosed) + SCWebGuessClosedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebGuessClosed.newBuilder() to construct. + private SCWebGuessClosed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebGuessClosed() { + guessId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebGuessClosed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int GUESSID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object guessId_ = ""; + /** + * string guessId = 2; + * @return The guessId. + */ + @java.lang.Override + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } + } + /** + * string guessId = 2; + * @return The bytes for guessId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYMAXDELAYMILLIS_FIELD_NUMBER = 3; + private long displayMaxDelayMillis_ = 0L; + /** + * uint64 displayMaxDelayMillis = 3; + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, guessId_); + } + if (displayMaxDelayMillis_ != 0L) { + output.writeUInt64(3, displayMaxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, guessId_); + } + if (displayMaxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, displayMaxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed) obj; + + if (getTime() + != other.getTime()) return false; + if (!getGuessId() + .equals(other.getGuessId())) return false; + if (getDisplayMaxDelayMillis() + != other.getDisplayMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + GUESSID_FIELD_NUMBER; + hash = (53 * hash) + getGuessId().hashCode(); + hash = (37 * hash) + DISPLAYMAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebGuessClosed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebGuessClosed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + guessId_ = ""; + displayMaxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.guessId_ = guessId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayMaxDelayMillis_ = displayMaxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getGuessId().isEmpty()) { + guessId_ = other.guessId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getDisplayMaxDelayMillis() != 0L) { + setDisplayMaxDelayMillis(other.getDisplayMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + guessId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + displayMaxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object guessId_ = ""; + /** + * string guessId = 2; + * @return The guessId. + */ + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string guessId = 2; + * @return The bytes for guessId. + */ + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string guessId = 2; + * @param value The guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string guessId = 2; + * @return This builder for chaining. + */ + public Builder clearGuessId() { + guessId_ = getDefaultInstance().getGuessId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string guessId = 2; + * @param value The bytes for guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long displayMaxDelayMillis_ ; + /** + * uint64 displayMaxDelayMillis = 3; + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + /** + * uint64 displayMaxDelayMillis = 3; + * @param value The displayMaxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setDisplayMaxDelayMillis(long value) { + + displayMaxDelayMillis_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 displayMaxDelayMillis = 3; + * @return This builder for chaining. + */ + public Builder clearDisplayMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000004); + displayMaxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebGuessClosed) + } + + // @@protoc_insertion_point(class_scope:SCWebGuessClosed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebGuessClosed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebGuessClosed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebGuessClosed_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\026SCWebGuessClosed.proto\"P\n\020SCWebGuessCl" + + "osed\022\014\n\004time\030\001 \001(\004\022\017\n\007guessId\030\002 \001(\t\022\035\n\025d" + + "isplayMaxDelayMillis\030\003 \001(\004B<\n:tech.ordin" + + "aryroad.live.chat.client.codec.kuaishou." + + "protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebGuessClosed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebGuessClosed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebGuessClosed_descriptor, + new java.lang.String[] { "Time", "GuessId", "DisplayMaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebGuessOpenedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebGuessOpenedOuterClass.java new file mode 100644 index 0000000..7039fa2 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebGuessOpenedOuterClass.java @@ -0,0 +1,846 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebGuessOpened.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebGuessOpenedOuterClass { + private SCWebGuessOpenedOuterClass() {} + 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 SCWebGuessOpenedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebGuessOpened) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + + /** + * string guessId = 2; + * @return The guessId. + */ + java.lang.String getGuessId(); + /** + * string guessId = 2; + * @return The bytes for guessId. + */ + com.google.protobuf.ByteString + getGuessIdBytes(); + + /** + * uint64 submitDeadline = 3; + * @return The submitDeadline. + */ + long getSubmitDeadline(); + + /** + * uint64 displayMaxDelayMillis = 4; + * @return The displayMaxDelayMillis. + */ + long getDisplayMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebGuessOpened} + */ + public static final class SCWebGuessOpened extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebGuessOpened) + SCWebGuessOpenedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebGuessOpened.newBuilder() to construct. + private SCWebGuessOpened(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebGuessOpened() { + guessId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebGuessOpened(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int GUESSID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object guessId_ = ""; + /** + * string guessId = 2; + * @return The guessId. + */ + @java.lang.Override + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } + } + /** + * string guessId = 2; + * @return The bytes for guessId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBMITDEADLINE_FIELD_NUMBER = 3; + private long submitDeadline_ = 0L; + /** + * uint64 submitDeadline = 3; + * @return The submitDeadline. + */ + @java.lang.Override + public long getSubmitDeadline() { + return submitDeadline_; + } + + public static final int DISPLAYMAXDELAYMILLIS_FIELD_NUMBER = 4; + private long displayMaxDelayMillis_ = 0L; + /** + * uint64 displayMaxDelayMillis = 4; + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, guessId_); + } + if (submitDeadline_ != 0L) { + output.writeUInt64(3, submitDeadline_); + } + if (displayMaxDelayMillis_ != 0L) { + output.writeUInt64(4, displayMaxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, guessId_); + } + if (submitDeadline_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, submitDeadline_); + } + if (displayMaxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, displayMaxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened) obj; + + if (getTime() + != other.getTime()) return false; + if (!getGuessId() + .equals(other.getGuessId())) return false; + if (getSubmitDeadline() + != other.getSubmitDeadline()) return false; + if (getDisplayMaxDelayMillis() + != other.getDisplayMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + GUESSID_FIELD_NUMBER; + hash = (53 * hash) + getGuessId().hashCode(); + hash = (37 * hash) + SUBMITDEADLINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSubmitDeadline()); + hash = (37 * hash) + DISPLAYMAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebGuessOpened} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebGuessOpened) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpenedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + guessId_ = ""; + submitDeadline_ = 0L; + displayMaxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.guessId_ = guessId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.submitDeadline_ = submitDeadline_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayMaxDelayMillis_ = displayMaxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getGuessId().isEmpty()) { + guessId_ = other.guessId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSubmitDeadline() != 0L) { + setSubmitDeadline(other.getSubmitDeadline()); + } + if (other.getDisplayMaxDelayMillis() != 0L) { + setDisplayMaxDelayMillis(other.getDisplayMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + guessId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + submitDeadline_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + displayMaxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object guessId_ = ""; + /** + * string guessId = 2; + * @return The guessId. + */ + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string guessId = 2; + * @return The bytes for guessId. + */ + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string guessId = 2; + * @param value The guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string guessId = 2; + * @return This builder for chaining. + */ + public Builder clearGuessId() { + guessId_ = getDefaultInstance().getGuessId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string guessId = 2; + * @param value The bytes for guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long submitDeadline_ ; + /** + * uint64 submitDeadline = 3; + * @return The submitDeadline. + */ + @java.lang.Override + public long getSubmitDeadline() { + return submitDeadline_; + } + /** + * uint64 submitDeadline = 3; + * @param value The submitDeadline to set. + * @return This builder for chaining. + */ + public Builder setSubmitDeadline(long value) { + + submitDeadline_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 submitDeadline = 3; + * @return This builder for chaining. + */ + public Builder clearSubmitDeadline() { + bitField0_ = (bitField0_ & ~0x00000004); + submitDeadline_ = 0L; + onChanged(); + return this; + } + + private long displayMaxDelayMillis_ ; + /** + * uint64 displayMaxDelayMillis = 4; + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + /** + * uint64 displayMaxDelayMillis = 4; + * @param value The displayMaxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setDisplayMaxDelayMillis(long value) { + + displayMaxDelayMillis_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 displayMaxDelayMillis = 4; + * @return This builder for chaining. + */ + public Builder clearDisplayMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000008); + displayMaxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebGuessOpened) + } + + // @@protoc_insertion_point(class_scope:SCWebGuessOpened) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebGuessOpened parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebGuessOpened_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebGuessOpened_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\026SCWebGuessOpened.proto\"h\n\020SCWebGuessOp" + + "ened\022\014\n\004time\030\001 \001(\004\022\017\n\007guessId\030\002 \001(\t\022\026\n\016s" + + "ubmitDeadline\030\003 \001(\004\022\035\n\025displayMaxDelayMi" + + "llis\030\004 \001(\004B<\n:tech.ordinaryroad.live.cha" + + "t.client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebGuessOpened_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebGuessOpened_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebGuessOpened_descriptor, + new java.lang.String[] { "Time", "GuessId", "SubmitDeadline", "DisplayMaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebHeartbeatAckOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebHeartbeatAckOuterClass.java new file mode 100644 index 0000000..3ad79aa --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebHeartbeatAckOuterClass.java @@ -0,0 +1,624 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebHeartbeatAck.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebHeartbeatAckOuterClass { + private SCWebHeartbeatAckOuterClass() {} + 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 SCWebHeartbeatAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebHeartbeatAck) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + long getTimestamp(); + + /** + * uint64 clientTimestamp = 2; + * @return The clientTimestamp. + */ + long getClientTimestamp(); + } + /** + * Protobuf type {@code SCWebHeartbeatAck} + */ + public static final class SCWebHeartbeatAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebHeartbeatAck) + SCWebHeartbeatAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebHeartbeatAck.newBuilder() to construct. + private SCWebHeartbeatAck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebHeartbeatAck() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebHeartbeatAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + public static final int CLIENTTIMESTAMP_FIELD_NUMBER = 2; + private long clientTimestamp_ = 0L; + /** + * uint64 clientTimestamp = 2; + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + output.writeUInt64(2, clientTimestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, clientTimestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (getClientTimestamp() + != other.getClientTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (37 * hash) + CLIENTTIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getClientTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebHeartbeatAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebHeartbeatAck) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + clientTimestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientTimestamp_ = clientTimestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + if (other.getClientTimestamp() != 0L) { + setClientTimestamp(other.getClientTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + clientTimestamp_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * uint64 timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * uint64 timestamp = 1; + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + + private long clientTimestamp_ ; + /** + * uint64 clientTimestamp = 2; + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + /** + * uint64 clientTimestamp = 2; + * @param value The clientTimestamp to set. + * @return This builder for chaining. + */ + public Builder setClientTimestamp(long value) { + + clientTimestamp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 clientTimestamp = 2; + * @return This builder for chaining. + */ + public Builder clearClientTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + clientTimestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebHeartbeatAck) + } + + // @@protoc_insertion_point(class_scope:SCWebHeartbeatAck) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebHeartbeatAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebHeartbeatAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebHeartbeatAck_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\027SCWebHeartbeatAck.proto\"?\n\021SCWebHeartb" + + "eatAck\022\021\n\ttimestamp\030\001 \001(\004\022\027\n\017clientTimes" + + "tamp\030\002 \001(\004B<\n:tech.ordinaryroad.live.cha" + + "t.client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebHeartbeatAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebHeartbeatAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebHeartbeatAck_descriptor, + new java.lang.String[] { "Timestamp", "ClientTimestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebLiveSpecialAccountConfigStateOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebLiveSpecialAccountConfigStateOuterClass.java new file mode 100644 index 0000000..d7caf2b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebLiveSpecialAccountConfigStateOuterClass.java @@ -0,0 +1,933 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebLiveSpecialAccountConfigState.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebLiveSpecialAccountConfigStateOuterClass { + private SCWebLiveSpecialAccountConfigStateOuterClass() {} + 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 SCWebLiveSpecialAccountConfigStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebLiveSpecialAccountConfigState) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + java.util.List + getConfigSwitchItemList(); + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getConfigSwitchItem(int index); + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + int getConfigSwitchItemCount(); + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + java.util.List + getConfigSwitchItemOrBuilderList(); + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder getConfigSwitchItemOrBuilder( + int index); + + /** + * uint64 timestamp = 2; + * @return The timestamp. + */ + long getTimestamp(); + } + /** + * Protobuf type {@code SCWebLiveSpecialAccountConfigState} + */ + public static final class SCWebLiveSpecialAccountConfigState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebLiveSpecialAccountConfigState) + SCWebLiveSpecialAccountConfigStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebLiveSpecialAccountConfigState.newBuilder() to construct. + private SCWebLiveSpecialAccountConfigState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebLiveSpecialAccountConfigState() { + configSwitchItem_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebLiveSpecialAccountConfigState(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.Builder.class); + } + + public static final int CONFIGSWITCHITEM_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List configSwitchItem_; + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + @java.lang.Override + public java.util.List getConfigSwitchItemList() { + return configSwitchItem_; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + @java.lang.Override + public java.util.List + getConfigSwitchItemOrBuilderList() { + return configSwitchItem_; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + @java.lang.Override + public int getConfigSwitchItemCount() { + return configSwitchItem_.size(); + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getConfigSwitchItem(int index) { + return configSwitchItem_.get(index); + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder getConfigSwitchItemOrBuilder( + int index) { + return configSwitchItem_.get(index); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 2; + private long timestamp_ = 0L; + /** + * uint64 timestamp = 2; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < configSwitchItem_.size(); i++) { + output.writeMessage(1, configSwitchItem_.get(i)); + } + if (timestamp_ != 0L) { + output.writeUInt64(2, timestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < configSwitchItem_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, configSwitchItem_.get(i)); + } + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState) obj; + + if (!getConfigSwitchItemList() + .equals(other.getConfigSwitchItemList())) return false; + if (getTimestamp() + != other.getTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigSwitchItemCount() > 0) { + hash = (37 * hash) + CONFIGSWITCHITEM_FIELD_NUMBER; + hash = (53 * hash) + getConfigSwitchItemList().hashCode(); + } + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebLiveSpecialAccountConfigState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebLiveSpecialAccountConfigState) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (configSwitchItemBuilder_ == null) { + configSwitchItem_ = java.util.Collections.emptyList(); + } else { + configSwitchItem_ = null; + configSwitchItemBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result) { + if (configSwitchItemBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configSwitchItem_ = java.util.Collections.unmodifiableList(configSwitchItem_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configSwitchItem_ = configSwitchItem_; + } else { + result.configSwitchItem_ = configSwitchItemBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.timestamp_ = timestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.getDefaultInstance()) return this; + if (configSwitchItemBuilder_ == null) { + if (!other.configSwitchItem_.isEmpty()) { + if (configSwitchItem_.isEmpty()) { + configSwitchItem_ = other.configSwitchItem_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.addAll(other.configSwitchItem_); + } + onChanged(); + } + } else { + if (!other.configSwitchItem_.isEmpty()) { + if (configSwitchItemBuilder_.isEmpty()) { + configSwitchItemBuilder_.dispose(); + configSwitchItemBuilder_ = null; + configSwitchItem_ = other.configSwitchItem_; + bitField0_ = (bitField0_ & ~0x00000001); + configSwitchItemBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConfigSwitchItemFieldBuilder() : null; + } else { + configSwitchItemBuilder_.addAllMessages(other.configSwitchItem_); + } + } + } + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.parser(), + extensionRegistry); + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(m); + } else { + configSwitchItemBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List configSwitchItem_ = + java.util.Collections.emptyList(); + private void ensureConfigSwitchItemIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configSwitchItem_ = new java.util.ArrayList(configSwitchItem_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder> configSwitchItemBuilder_; + + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public java.util.List getConfigSwitchItemList() { + if (configSwitchItemBuilder_ == null) { + return java.util.Collections.unmodifiableList(configSwitchItem_); + } else { + return configSwitchItemBuilder_.getMessageList(); + } + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public int getConfigSwitchItemCount() { + if (configSwitchItemBuilder_ == null) { + return configSwitchItem_.size(); + } else { + return configSwitchItemBuilder_.getCount(); + } + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getConfigSwitchItem(int index) { + if (configSwitchItemBuilder_ == null) { + return configSwitchItem_.get(index); + } else { + return configSwitchItemBuilder_.getMessage(index); + } + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder setConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem value) { + if (configSwitchItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.set(index, value); + onChanged(); + } else { + configSwitchItemBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder setConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder builderForValue) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.set(index, builderForValue.build()); + onChanged(); + } else { + configSwitchItemBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder addConfigSwitchItem(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem value) { + if (configSwitchItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(value); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder addConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem value) { + if (configSwitchItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(index, value); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder addConfigSwitchItem( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder builderForValue) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(builderForValue.build()); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder addConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder builderForValue) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(index, builderForValue.build()); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder addAllConfigSwitchItem( + java.lang.Iterable values) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, configSwitchItem_); + onChanged(); + } else { + configSwitchItemBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder clearConfigSwitchItem() { + if (configSwitchItemBuilder_ == null) { + configSwitchItem_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configSwitchItemBuilder_.clear(); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public Builder removeConfigSwitchItem(int index) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.remove(index); + onChanged(); + } else { + configSwitchItemBuilder_.remove(index); + } + return this; + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder getConfigSwitchItemBuilder( + int index) { + return getConfigSwitchItemFieldBuilder().getBuilder(index); + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder getConfigSwitchItemOrBuilder( + int index) { + if (configSwitchItemBuilder_ == null) { + return configSwitchItem_.get(index); } else { + return configSwitchItemBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public java.util.List + getConfigSwitchItemOrBuilderList() { + if (configSwitchItemBuilder_ != null) { + return configSwitchItemBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configSwitchItem_); + } + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder addConfigSwitchItemBuilder() { + return getConfigSwitchItemFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance()); + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder addConfigSwitchItemBuilder( + int index) { + return getConfigSwitchItemFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance()); + } + /** + * repeated .ConfigSwitchItem configSwitchItem = 1; + */ + public java.util.List + getConfigSwitchItemBuilderList() { + return getConfigSwitchItemFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder> + getConfigSwitchItemFieldBuilder() { + if (configSwitchItemBuilder_ == null) { + configSwitchItemBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder>( + configSwitchItem_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + configSwitchItem_ = null; + } + return configSwitchItemBuilder_; + } + + private long timestamp_ ; + /** + * uint64 timestamp = 2; + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * uint64 timestamp = 2; + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint64 timestamp = 2; + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebLiveSpecialAccountConfigState) + } + + // @@protoc_insertion_point(class_scope:SCWebLiveSpecialAccountConfigState) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebLiveSpecialAccountConfigState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebLiveSpecialAccountConfigState_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(SCWebLiveSpecialAccountConfigState.pro" + + "to\032\026ConfigSwitchItem.proto\"d\n\"SCWebLiveS" + + "pecialAccountConfigState\022+\n\020configSwitch" + + "Item\030\001 \003(\0132\021.ConfigSwitchItem\022\021\n\ttimesta" + + "mp\030\002 \001(\004B<\n:tech.ordinaryroad.live.chat." + + "client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.getDescriptor(), + }); + internal_static_SCWebLiveSpecialAccountConfigState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebLiveSpecialAccountConfigState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebLiveSpecialAccountConfigState_descriptor, + new java.lang.String[] { "ConfigSwitchItem", "Timestamp", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.ConfigSwitchItemOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebLiveWatchingUsersOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebLiveWatchingUsersOuterClass.java new file mode 100644 index 0000000..8868eec --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebLiveWatchingUsersOuterClass.java @@ -0,0 +1,1082 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebLiveWatchingUsers.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebLiveWatchingUsersOuterClass { + private SCWebLiveWatchingUsersOuterClass() {} + 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 SCWebLiveWatchingUsersOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebLiveWatchingUsers) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + java.util.List + getWatchingUserList(); + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getWatchingUser(int index); + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + int getWatchingUserCount(); + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + java.util.List + getWatchingUserOrBuilderList(); + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder getWatchingUserOrBuilder( + int index); + + /** + * string displayWatchingCount = 2; + * @return The displayWatchingCount. + */ + java.lang.String getDisplayWatchingCount(); + /** + * string displayWatchingCount = 2; + * @return The bytes for displayWatchingCount. + */ + com.google.protobuf.ByteString + getDisplayWatchingCountBytes(); + + /** + * uint64 pendingDuration = 3; + * @return The pendingDuration. + */ + long getPendingDuration(); + } + /** + * Protobuf type {@code SCWebLiveWatchingUsers} + */ + public static final class SCWebLiveWatchingUsers extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebLiveWatchingUsers) + SCWebLiveWatchingUsersOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebLiveWatchingUsers.newBuilder() to construct. + private SCWebLiveWatchingUsers(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebLiveWatchingUsers() { + watchingUser_ = java.util.Collections.emptyList(); + displayWatchingCount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebLiveWatchingUsers(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.Builder.class); + } + + public static final int WATCHINGUSER_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List watchingUser_; + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + @java.lang.Override + public java.util.List getWatchingUserList() { + return watchingUser_; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + @java.lang.Override + public java.util.List + getWatchingUserOrBuilderList() { + return watchingUser_; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + @java.lang.Override + public int getWatchingUserCount() { + return watchingUser_.size(); + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getWatchingUser(int index) { + return watchingUser_.get(index); + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder getWatchingUserOrBuilder( + int index) { + return watchingUser_.get(index); + } + + public static final int DISPLAYWATCHINGCOUNT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object displayWatchingCount_ = ""; + /** + * string displayWatchingCount = 2; + * @return The displayWatchingCount. + */ + @java.lang.Override + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } + } + /** + * string displayWatchingCount = 2; + * @return The bytes for displayWatchingCount. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PENDINGDURATION_FIELD_NUMBER = 3; + private long pendingDuration_ = 0L; + /** + * uint64 pendingDuration = 3; + * @return The pendingDuration. + */ + @java.lang.Override + public long getPendingDuration() { + return pendingDuration_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < watchingUser_.size(); i++) { + output.writeMessage(1, watchingUser_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayWatchingCount_); + } + if (pendingDuration_ != 0L) { + output.writeUInt64(3, pendingDuration_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < watchingUser_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, watchingUser_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayWatchingCount_); + } + if (pendingDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, pendingDuration_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers) obj; + + if (!getWatchingUserList() + .equals(other.getWatchingUserList())) return false; + if (!getDisplayWatchingCount() + .equals(other.getDisplayWatchingCount())) return false; + if (getPendingDuration() + != other.getPendingDuration()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWatchingUserCount() > 0) { + hash = (37 * hash) + WATCHINGUSER_FIELD_NUMBER; + hash = (53 * hash) + getWatchingUserList().hashCode(); + } + hash = (37 * hash) + DISPLAYWATCHINGCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayWatchingCount().hashCode(); + hash = (37 * hash) + PENDINGDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPendingDuration()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebLiveWatchingUsers} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebLiveWatchingUsers) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (watchingUserBuilder_ == null) { + watchingUser_ = java.util.Collections.emptyList(); + } else { + watchingUser_ = null; + watchingUserBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + displayWatchingCount_ = ""; + pendingDuration_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result) { + if (watchingUserBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + watchingUser_ = java.util.Collections.unmodifiableList(watchingUser_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.watchingUser_ = watchingUser_; + } else { + result.watchingUser_ = watchingUserBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayWatchingCount_ = displayWatchingCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pendingDuration_ = pendingDuration_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.getDefaultInstance()) return this; + if (watchingUserBuilder_ == null) { + if (!other.watchingUser_.isEmpty()) { + if (watchingUser_.isEmpty()) { + watchingUser_ = other.watchingUser_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWatchingUserIsMutable(); + watchingUser_.addAll(other.watchingUser_); + } + onChanged(); + } + } else { + if (!other.watchingUser_.isEmpty()) { + if (watchingUserBuilder_.isEmpty()) { + watchingUserBuilder_.dispose(); + watchingUserBuilder_ = null; + watchingUser_ = other.watchingUser_; + bitField0_ = (bitField0_ & ~0x00000001); + watchingUserBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWatchingUserFieldBuilder() : null; + } else { + watchingUserBuilder_.addAllMessages(other.watchingUser_); + } + } + } + if (!other.getDisplayWatchingCount().isEmpty()) { + displayWatchingCount_ = other.displayWatchingCount_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPendingDuration() != 0L) { + setPendingDuration(other.getPendingDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.parser(), + extensionRegistry); + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.add(m); + } else { + watchingUserBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + displayWatchingCount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pendingDuration_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List watchingUser_ = + java.util.Collections.emptyList(); + private void ensureWatchingUserIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + watchingUser_ = new java.util.ArrayList(watchingUser_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder> watchingUserBuilder_; + + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public java.util.List getWatchingUserList() { + if (watchingUserBuilder_ == null) { + return java.util.Collections.unmodifiableList(watchingUser_); + } else { + return watchingUserBuilder_.getMessageList(); + } + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public int getWatchingUserCount() { + if (watchingUserBuilder_ == null) { + return watchingUser_.size(); + } else { + return watchingUserBuilder_.getCount(); + } + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getWatchingUser(int index) { + if (watchingUserBuilder_ == null) { + return watchingUser_.get(index); + } else { + return watchingUserBuilder_.getMessage(index); + } + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder setWatchingUser( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo value) { + if (watchingUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWatchingUserIsMutable(); + watchingUser_.set(index, value); + onChanged(); + } else { + watchingUserBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder setWatchingUser( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder builderForValue) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.set(index, builderForValue.build()); + onChanged(); + } else { + watchingUserBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder addWatchingUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo value) { + if (watchingUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWatchingUserIsMutable(); + watchingUser_.add(value); + onChanged(); + } else { + watchingUserBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder addWatchingUser( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo value) { + if (watchingUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWatchingUserIsMutable(); + watchingUser_.add(index, value); + onChanged(); + } else { + watchingUserBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder addWatchingUser( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder builderForValue) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.add(builderForValue.build()); + onChanged(); + } else { + watchingUserBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder addWatchingUser( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder builderForValue) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.add(index, builderForValue.build()); + onChanged(); + } else { + watchingUserBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder addAllWatchingUser( + java.lang.Iterable values) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, watchingUser_); + onChanged(); + } else { + watchingUserBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder clearWatchingUser() { + if (watchingUserBuilder_ == null) { + watchingUser_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + watchingUserBuilder_.clear(); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public Builder removeWatchingUser(int index) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.remove(index); + onChanged(); + } else { + watchingUserBuilder_.remove(index); + } + return this; + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder getWatchingUserBuilder( + int index) { + return getWatchingUserFieldBuilder().getBuilder(index); + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder getWatchingUserOrBuilder( + int index) { + if (watchingUserBuilder_ == null) { + return watchingUser_.get(index); } else { + return watchingUserBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public java.util.List + getWatchingUserOrBuilderList() { + if (watchingUserBuilder_ != null) { + return watchingUserBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(watchingUser_); + } + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder addWatchingUserBuilder() { + return getWatchingUserFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance()); + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder addWatchingUserBuilder( + int index) { + return getWatchingUserFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance()); + } + /** + * repeated .WebWatchingUserInfo watchingUser = 1; + */ + public java.util.List + getWatchingUserBuilderList() { + return getWatchingUserFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder> + getWatchingUserFieldBuilder() { + if (watchingUserBuilder_ == null) { + watchingUserBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder>( + watchingUser_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + watchingUser_ = null; + } + return watchingUserBuilder_; + } + + private java.lang.Object displayWatchingCount_ = ""; + /** + * string displayWatchingCount = 2; + * @return The displayWatchingCount. + */ + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayWatchingCount = 2; + * @return The bytes for displayWatchingCount. + */ + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayWatchingCount = 2; + * @param value The displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCount( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayWatchingCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string displayWatchingCount = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayWatchingCount() { + displayWatchingCount_ = getDefaultInstance().getDisplayWatchingCount(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string displayWatchingCount = 2; + * @param value The bytes for displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayWatchingCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long pendingDuration_ ; + /** + * uint64 pendingDuration = 3; + * @return The pendingDuration. + */ + @java.lang.Override + public long getPendingDuration() { + return pendingDuration_; + } + /** + * uint64 pendingDuration = 3; + * @param value The pendingDuration to set. + * @return This builder for chaining. + */ + public Builder setPendingDuration(long value) { + + pendingDuration_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 pendingDuration = 3; + * @return This builder for chaining. + */ + public Builder clearPendingDuration() { + bitField0_ = (bitField0_ & ~0x00000004); + pendingDuration_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebLiveWatchingUsers) + } + + // @@protoc_insertion_point(class_scope:SCWebLiveWatchingUsers) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebLiveWatchingUsers parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebLiveWatchingUsers_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebLiveWatchingUsers_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\034SCWebLiveWatchingUsers.proto\032\031WebWatch" + + "ingUserInfo.proto\"{\n\026SCWebLiveWatchingUs" + + "ers\022*\n\014watchingUser\030\001 \003(\0132\024.WebWatchingU" + + "serInfo\022\034\n\024displayWatchingCount\030\002 \001(\t\022\027\n" + + "\017pendingDuration\030\003 \001(\004B<\n:tech.ordinaryr" + + "oad.live.chat.client.codec.kuaishou.prot" + + "obufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.getDescriptor(), + }); + internal_static_SCWebLiveWatchingUsers_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebLiveWatchingUsers_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebLiveWatchingUsers_descriptor, + new java.lang.String[] { "WatchingUser", "DisplayWatchingCount", "PendingDuration", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebPipEndedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebPipEndedOuterClass.java new file mode 100644 index 0000000..3387c27 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebPipEndedOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebPipEnded.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebPipEndedOuterClass { + private SCWebPipEndedOuterClass() {} + 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 SCWebPipEndedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebPipEnded) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code SCWebPipEnded} + */ + public static final class SCWebPipEnded extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebPipEnded) + SCWebPipEndedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebPipEnded.newBuilder() to construct. + private SCWebPipEnded(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebPipEnded() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebPipEnded(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebPipEnded} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebPipEnded) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEndedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebPipEnded) + } + + // @@protoc_insertion_point(class_scope:SCWebPipEnded) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebPipEnded parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebPipEnded_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebPipEnded_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\023SCWebPipEnded.proto\"\035\n\rSCWebPipEnded\022\014" + + "\n\004time\030\001 \001(\004B<\n:tech.ordinaryroad.live.c" + + "hat.client.codec.kuaishou.protobufb\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebPipEnded_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebPipEnded_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebPipEnded_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebPipStartedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebPipStartedOuterClass.java new file mode 100644 index 0000000..fc17f27 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebPipStartedOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebPipStarted.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebPipStartedOuterClass { + private SCWebPipStartedOuterClass() {} + 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 SCWebPipStartedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebPipStarted) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 time = 1; + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code SCWebPipStarted} + */ + public static final class SCWebPipStarted extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebPipStarted) + SCWebPipStartedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebPipStarted.newBuilder() to construct. + private SCWebPipStarted(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebPipStarted() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebPipStarted(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebPipStarted} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebPipStarted) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStartedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * uint64 time = 1; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 1; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 time = 1; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebPipStarted) + } + + // @@protoc_insertion_point(class_scope:SCWebPipStarted) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebPipStarted parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebPipStarted_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebPipStarted_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\025SCWebPipStarted.proto\"\037\n\017SCWebPipStart" + + "ed\022\014\n\004time\030\001 \001(\004B<\n:tech.ordinaryroad.li" + + "ve.chat.client.codec.kuaishou.protobufb\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebPipStarted_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebPipStarted_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebPipStarted_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebRefreshWalletOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebRefreshWalletOuterClass.java new file mode 100644 index 0000000..686e277 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebRefreshWalletOuterClass.java @@ -0,0 +1,470 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebRefreshWallet.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebRefreshWalletOuterClass { + private SCWebRefreshWalletOuterClass() {} + 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 SCWebRefreshWalletOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebRefreshWallet) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code SCWebRefreshWallet} + */ + public static final class SCWebRefreshWallet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebRefreshWallet) + SCWebRefreshWalletOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebRefreshWallet.newBuilder() to construct. + private SCWebRefreshWallet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebRefreshWallet() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebRefreshWallet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebRefreshWallet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebRefreshWallet) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWalletOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebRefreshWallet) + } + + // @@protoc_insertion_point(class_scope:SCWebRefreshWallet) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebRefreshWallet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebRefreshWallet_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebRefreshWallet_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\030SCWebRefreshWallet.proto\"\024\n\022SCWebRefre" + + "shWalletB<\n:tech.ordinaryroad.live.chat." + + "client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebRefreshWallet_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebRefreshWallet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebRefreshWallet_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebRideChangedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebRideChangedOuterClass.java new file mode 100644 index 0000000..1ab5c9f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebRideChangedOuterClass.java @@ -0,0 +1,699 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebRideChanged.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebRideChangedOuterClass { + private SCWebRideChangedOuterClass() {} + 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 SCWebRideChangedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebRideChanged) + com.google.protobuf.MessageOrBuilder { + + /** + * string rideId = 1; + * @return The rideId. + */ + java.lang.String getRideId(); + /** + * string rideId = 1; + * @return The bytes for rideId. + */ + com.google.protobuf.ByteString + getRideIdBytes(); + + /** + * uint32 requestMaxDelayMillis = 2; + * @return The requestMaxDelayMillis. + */ + int getRequestMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebRideChanged} + */ + public static final class SCWebRideChanged extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebRideChanged) + SCWebRideChangedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebRideChanged.newBuilder() to construct. + private SCWebRideChanged(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebRideChanged() { + rideId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebRideChanged(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.Builder.class); + } + + public static final int RIDEID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object rideId_ = ""; + /** + * string rideId = 1; + * @return The rideId. + */ + @java.lang.Override + public java.lang.String getRideId() { + java.lang.Object ref = rideId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rideId_ = s; + return s; + } + } + /** + * string rideId = 1; + * @return The bytes for rideId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRideIdBytes() { + java.lang.Object ref = rideId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rideId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTMAXDELAYMILLIS_FIELD_NUMBER = 2; + private int requestMaxDelayMillis_ = 0; + /** + * uint32 requestMaxDelayMillis = 2; + * @return The requestMaxDelayMillis. + */ + @java.lang.Override + public int getRequestMaxDelayMillis() { + return requestMaxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rideId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rideId_); + } + if (requestMaxDelayMillis_ != 0) { + output.writeUInt32(2, requestMaxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rideId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rideId_); + } + if (requestMaxDelayMillis_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, requestMaxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged) obj; + + if (!getRideId() + .equals(other.getRideId())) return false; + if (getRequestMaxDelayMillis() + != other.getRequestMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RIDEID_FIELD_NUMBER; + hash = (53 * hash) + getRideId().hashCode(); + hash = (37 * hash) + REQUESTMAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + getRequestMaxDelayMillis(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebRideChanged} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebRideChanged) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChangedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rideId_ = ""; + requestMaxDelayMillis_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rideId_ = rideId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestMaxDelayMillis_ = requestMaxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.getDefaultInstance()) return this; + if (!other.getRideId().isEmpty()) { + rideId_ = other.rideId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getRequestMaxDelayMillis() != 0) { + setRequestMaxDelayMillis(other.getRequestMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + rideId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + requestMaxDelayMillis_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object rideId_ = ""; + /** + * string rideId = 1; + * @return The rideId. + */ + public java.lang.String getRideId() { + java.lang.Object ref = rideId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rideId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string rideId = 1; + * @return The bytes for rideId. + */ + public com.google.protobuf.ByteString + getRideIdBytes() { + java.lang.Object ref = rideId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rideId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string rideId = 1; + * @param value The rideId to set. + * @return This builder for chaining. + */ + public Builder setRideId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + rideId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string rideId = 1; + * @return This builder for chaining. + */ + public Builder clearRideId() { + rideId_ = getDefaultInstance().getRideId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string rideId = 1; + * @param value The bytes for rideId to set. + * @return This builder for chaining. + */ + public Builder setRideIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + rideId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int requestMaxDelayMillis_ ; + /** + * uint32 requestMaxDelayMillis = 2; + * @return The requestMaxDelayMillis. + */ + @java.lang.Override + public int getRequestMaxDelayMillis() { + return requestMaxDelayMillis_; + } + /** + * uint32 requestMaxDelayMillis = 2; + * @param value The requestMaxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setRequestMaxDelayMillis(int value) { + + requestMaxDelayMillis_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 requestMaxDelayMillis = 2; + * @return This builder for chaining. + */ + public Builder clearRequestMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000002); + requestMaxDelayMillis_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebRideChanged) + } + + // @@protoc_insertion_point(class_scope:SCWebRideChanged) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebRideChanged parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebRideChanged_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebRideChanged_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\026SCWebRideChanged.proto\"A\n\020SCWebRideCha" + + "nged\022\016\n\006rideId\030\001 \001(\t\022\035\n\025requestMaxDelayM" + + "illis\030\002 \001(\rB<\n:tech.ordinaryroad.live.ch" + + "at.client.codec.kuaishou.protobufb\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebRideChanged_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebRideChanged_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebRideChanged_descriptor, + new java.lang.String[] { "RideId", "RequestMaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebSuspectedViolationOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebSuspectedViolationOuterClass.java new file mode 100644 index 0000000..d518e9d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SCWebSuspectedViolationOuterClass.java @@ -0,0 +1,551 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebSuspectedViolation.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SCWebSuspectedViolationOuterClass { + private SCWebSuspectedViolationOuterClass() {} + 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 SCWebSuspectedViolationOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebSuspectedViolation) + com.google.protobuf.MessageOrBuilder { + + /** + * bool suspectedViolation = 1; + * @return The suspectedViolation. + */ + boolean getSuspectedViolation(); + } + /** + * Protobuf type {@code SCWebSuspectedViolation} + */ + public static final class SCWebSuspectedViolation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebSuspectedViolation) + SCWebSuspectedViolationOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebSuspectedViolation.newBuilder() to construct. + private SCWebSuspectedViolation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SCWebSuspectedViolation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebSuspectedViolation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.Builder.class); + } + + public static final int SUSPECTEDVIOLATION_FIELD_NUMBER = 1; + private boolean suspectedViolation_ = false; + /** + * bool suspectedViolation = 1; + * @return The suspectedViolation. + */ + @java.lang.Override + public boolean getSuspectedViolation() { + return suspectedViolation_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (suspectedViolation_ != false) { + output.writeBool(1, suspectedViolation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (suspectedViolation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, suspectedViolation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation) obj; + + if (getSuspectedViolation() + != other.getSuspectedViolation()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUSPECTEDVIOLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuspectedViolation()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SCWebSuspectedViolation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SCWebSuspectedViolation) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + suspectedViolation_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.suspectedViolation_ = suspectedViolation_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.getDefaultInstance()) return this; + if (other.getSuspectedViolation() != false) { + setSuspectedViolation(other.getSuspectedViolation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + suspectedViolation_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean suspectedViolation_ ; + /** + * bool suspectedViolation = 1; + * @return The suspectedViolation. + */ + @java.lang.Override + public boolean getSuspectedViolation() { + return suspectedViolation_; + } + /** + * bool suspectedViolation = 1; + * @param value The suspectedViolation to set. + * @return This builder for chaining. + */ + public Builder setSuspectedViolation(boolean value) { + + suspectedViolation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool suspectedViolation = 1; + * @return This builder for chaining. + */ + public Builder clearSuspectedViolation() { + bitField0_ = (bitField0_ & ~0x00000001); + suspectedViolation_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebSuspectedViolation) + } + + // @@protoc_insertion_point(class_scope:SCWebSuspectedViolation) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SCWebSuspectedViolation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebSuspectedViolation_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebSuspectedViolation_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\035SCWebSuspectedViolation.proto\"5\n\027SCWeb" + + "SuspectedViolation\022\032\n\022suspectedViolation" + + "\030\001 \001(\010B<\n:tech.ordinaryroad.live.chat.cl" + + "ient.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebSuspectedViolation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebSuspectedViolation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebSuspectedViolation_descriptor, + new java.lang.String[] { "SuspectedViolation", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SimpleUserInfoOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SimpleUserInfoOuterClass.java new file mode 100644 index 0000000..2b83668 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SimpleUserInfoOuterClass.java @@ -0,0 +1,923 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SimpleUserInfo.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SimpleUserInfoOuterClass { + private SimpleUserInfoOuterClass() {} + 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 SimpleUserInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SimpleUserInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string principalId = 1; + * @return The principalId. + */ + java.lang.String getPrincipalId(); + /** + * string principalId = 1; + * @return The bytes for principalId. + */ + com.google.protobuf.ByteString + getPrincipalIdBytes(); + + /** + * string userName = 2; + * @return The userName. + */ + java.lang.String getUserName(); + /** + * string userName = 2; + * @return The bytes for userName. + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * string headUrl = 3; + * @return The headUrl. + */ + java.lang.String getHeadUrl(); + /** + * string headUrl = 3; + * @return The bytes for headUrl. + */ + com.google.protobuf.ByteString + getHeadUrlBytes(); + } + /** + * Protobuf type {@code SimpleUserInfo} + */ + public static final class SimpleUserInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SimpleUserInfo) + SimpleUserInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimpleUserInfo.newBuilder() to construct. + private SimpleUserInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SimpleUserInfo() { + principalId_ = ""; + userName_ = ""; + headUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SimpleUserInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder.class); + } + + public static final int PRINCIPALID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object principalId_ = ""; + /** + * string principalId = 1; + * @return The principalId. + */ + @java.lang.Override + public java.lang.String getPrincipalId() { + java.lang.Object ref = principalId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalId_ = s; + return s; + } + } + /** + * string principalId = 1; + * @return The bytes for principalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalIdBytes() { + java.lang.Object ref = principalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object userName_ = ""; + /** + * string userName = 2; + * @return The userName. + */ + @java.lang.Override + 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 userName = 2; + * @return The bytes for userName. + */ + @java.lang.Override + 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 HEADURL_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object headUrl_ = ""; + /** + * string headUrl = 3; + * @return The headUrl. + */ + @java.lang.Override + public java.lang.String getHeadUrl() { + java.lang.Object ref = headUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + headUrl_ = s; + return s; + } + } + /** + * string headUrl = 3; + * @return The bytes for headUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHeadUrlBytes() { + java.lang.Object ref = headUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + headUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(headUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, headUrl_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(headUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, headUrl_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo) obj; + + if (!getPrincipalId() + .equals(other.getPrincipalId())) return false; + if (!getUserName() + .equals(other.getUserName())) return false; + if (!getHeadUrl() + .equals(other.getHeadUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRINCIPALID_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalId().hashCode(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + HEADURL_FIELD_NUMBER; + hash = (53 * hash) + getHeadUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SimpleUserInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SimpleUserInfo) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principalId_ = ""; + userName_ = ""; + headUrl_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.principalId_ = principalId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userName_ = userName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.headUrl_ = headUrl_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) return this; + if (!other.getPrincipalId().isEmpty()) { + principalId_ = other.principalId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getHeadUrl().isEmpty()) { + headUrl_ = other.headUrl_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + principalId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + userName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + headUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object principalId_ = ""; + /** + * string principalId = 1; + * @return The principalId. + */ + public java.lang.String getPrincipalId() { + java.lang.Object ref = principalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string principalId = 1; + * @return The bytes for principalId. + */ + public com.google.protobuf.ByteString + getPrincipalIdBytes() { + java.lang.Object ref = principalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string principalId = 1; + * @param value The principalId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + principalId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string principalId = 1; + * @return This builder for chaining. + */ + public Builder clearPrincipalId() { + principalId_ = getDefaultInstance().getPrincipalId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string principalId = 1; + * @param value The bytes for principalId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + principalId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + * string userName = 2; + * @return The userName. + */ + 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 userName = 2; + * @return The bytes for userName. + */ + 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 userName = 2; + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string userName = 2; + * @return This builder for chaining. + */ + public Builder clearUserName() { + userName_ = getDefaultInstance().getUserName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string userName = 2; + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object headUrl_ = ""; + /** + * string headUrl = 3; + * @return The headUrl. + */ + public java.lang.String getHeadUrl() { + java.lang.Object ref = headUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + headUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string headUrl = 3; + * @return The bytes for headUrl. + */ + public com.google.protobuf.ByteString + getHeadUrlBytes() { + java.lang.Object ref = headUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + headUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string headUrl = 3; + * @param value The headUrl to set. + * @return This builder for chaining. + */ + public Builder setHeadUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + headUrl_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string headUrl = 3; + * @return This builder for chaining. + */ + public Builder clearHeadUrl() { + headUrl_ = getDefaultInstance().getHeadUrl(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string headUrl = 3; + * @param value The bytes for headUrl to set. + * @return This builder for chaining. + */ + public Builder setHeadUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + headUrl_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SimpleUserInfo) + } + + // @@protoc_insertion_point(class_scope:SimpleUserInfo) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimpleUserInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SimpleUserInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SimpleUserInfo_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\024SimpleUserInfo.proto\"H\n\016SimpleUserInfo" + + "\022\023\n\013principalId\030\001 \001(\t\022\020\n\010userName\030\002 \001(\t\022" + + "\017\n\007headUrl\030\003 \001(\tB<\n:tech.ordinaryroad.li" + + "ve.chat.client.codec.kuaishou.protobufb\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SimpleUserInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SimpleUserInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SimpleUserInfo_descriptor, + new java.lang.String[] { "PrincipalId", "UserName", "HeadUrl", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SocketMessageOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SocketMessageOuterClass.java new file mode 100644 index 0000000..9dc0651 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/SocketMessageOuterClass.java @@ -0,0 +1,893 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SocketMessage.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class SocketMessageOuterClass { + private SocketMessageOuterClass() {} + 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 SocketMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:SocketMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * .PayloadType payloadType = 1; + * @return The enum numeric value on the wire for payloadType. + */ + int getPayloadTypeValue(); + /** + * .PayloadType payloadType = 1; + * @return The payloadType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType getPayloadType(); + + /** + * .SocketMessage.CompressionType compressionType = 2; + * @return The enum numeric value on the wire for compressionType. + */ + int getCompressionTypeValue(); + /** + * .SocketMessage.CompressionType compressionType = 2; + * @return The compressionType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType getCompressionType(); + + /** + * bytes payload = 3; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + } + /** + * Protobuf type {@code SocketMessage} + */ + public static final class SocketMessage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SocketMessage) + SocketMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use SocketMessage.newBuilder() to construct. + private SocketMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SocketMessage() { + payloadType_ = 0; + compressionType_ = 0; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SocketMessage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.Builder.class); + } + + /** + * Protobuf enum {@code SocketMessage.CompressionType} + */ + public enum CompressionType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * NONE = 1; + */ + NONE(1), + /** + * GZIP = 2; + */ + GZIP(2), + /** + * AES = 3; + */ + AES(3), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + /** + * GZIP = 2; + */ + public static final int GZIP_VALUE = 2; + /** + * AES = 3; + */ + public static final int AES_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompressionType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompressionType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return NONE; + case 2: return GZIP; + case 3: return AES; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + CompressionType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompressionType findValueByNumber(int number) { + return CompressionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final CompressionType[] VALUES = values(); + + public static CompressionType 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 CompressionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:SocketMessage.CompressionType) + } + + public static final int PAYLOADTYPE_FIELD_NUMBER = 1; + private int payloadType_ = 0; + /** + * .PayloadType payloadType = 1; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + * .PayloadType payloadType = 1; + * @return The payloadType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType getPayloadType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.forNumber(payloadType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNRECOGNIZED : result; + } + + public static final int COMPRESSIONTYPE_FIELD_NUMBER = 2; + private int compressionType_ = 0; + /** + * .SocketMessage.CompressionType compressionType = 2; + * @return The enum numeric value on the wire for compressionType. + */ + @java.lang.Override public int getCompressionTypeValue() { + return compressionType_; + } + /** + * .SocketMessage.CompressionType compressionType = 2; + * @return The compressionType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType getCompressionType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.forNumber(compressionType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNRECOGNIZED : result; + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 3; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (payloadType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNKNOWN.getNumber()) { + output.writeEnum(1, payloadType_); + } + if (compressionType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNKNOWN.getNumber()) { + output.writeEnum(2, compressionType_); + } + if (!payload_.isEmpty()) { + output.writeBytes(3, payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, payloadType_); + } + if (compressionType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, compressionType_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage) obj; + + if (payloadType_ != other.payloadType_) return false; + if (compressionType_ != other.compressionType_) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYLOADTYPE_FIELD_NUMBER; + hash = (53 * hash) + payloadType_; + hash = (37 * hash) + COMPRESSIONTYPE_FIELD_NUMBER; + hash = (53 * hash) + compressionType_; + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 SocketMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:SocketMessage) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payloadType_ = 0; + compressionType_ = 0; + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payloadType_ = payloadType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.compressionType_ = compressionType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.payload_ = payload_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.getDefaultInstance()) return this; + if (other.payloadType_ != 0) { + setPayloadTypeValue(other.getPayloadTypeValue()); + } + if (other.compressionType_ != 0) { + setCompressionTypeValue(other.getCompressionTypeValue()); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + payloadType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + compressionType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int payloadType_ = 0; + /** + * .PayloadType payloadType = 1; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + * .PayloadType payloadType = 1; + * @param value The enum numeric value on the wire for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeValue(int value) { + payloadType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .PayloadType payloadType = 1; + * @return The payloadType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType getPayloadType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.forNumber(payloadType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNRECOGNIZED : result; + } + /** + * .PayloadType payloadType = 1; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + payloadType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .PayloadType payloadType = 1; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + bitField0_ = (bitField0_ & ~0x00000001); + payloadType_ = 0; + onChanged(); + return this; + } + + private int compressionType_ = 0; + /** + * .SocketMessage.CompressionType compressionType = 2; + * @return The enum numeric value on the wire for compressionType. + */ + @java.lang.Override public int getCompressionTypeValue() { + return compressionType_; + } + /** + * .SocketMessage.CompressionType compressionType = 2; + * @param value The enum numeric value on the wire for compressionType to set. + * @return This builder for chaining. + */ + public Builder setCompressionTypeValue(int value) { + compressionType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SocketMessage.CompressionType compressionType = 2; + * @return The compressionType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType getCompressionType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.forNumber(compressionType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNRECOGNIZED : result; + } + /** + * .SocketMessage.CompressionType compressionType = 2; + * @param value The compressionType to set. + * @return This builder for chaining. + */ + public Builder setCompressionType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + compressionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .SocketMessage.CompressionType compressionType = 2; + * @return This builder for chaining. + */ + public Builder clearCompressionType() { + bitField0_ = (bitField0_ & ~0x00000002); + compressionType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 3; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * bytes payload = 3; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bytes payload = 3; + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000004); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SocketMessage) + } + + // @@protoc_insertion_point(class_scope:SocketMessage) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SocketMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SocketMessage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SocketMessage_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\023SocketMessage.proto\032\021PayloadType.proto" + + "\"\271\001\n\rSocketMessage\022!\n\013payloadType\030\001 \001(\0162" + + "\014.PayloadType\0227\n\017compressionType\030\002 \001(\0162\036" + + ".SocketMessage.CompressionType\022\017\n\007payloa" + + "d\030\003 \001(\014\";\n\017CompressionType\022\013\n\007UNKNOWN\020\000\022" + + "\010\n\004NONE\020\001\022\010\n\004GZIP\020\002\022\007\n\003AES\020\003B<\n:tech.ord" + + "inaryroad.live.chat.client.codec.kuaisho" + + "u.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.getDescriptor(), + }); + internal_static_SocketMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SocketMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SocketMessage_descriptor, + new java.lang.String[] { "PayloadType", "CompressionType", "Payload", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/UserInfoOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/UserInfoOuterClass.java new file mode 100644 index 0000000..3775ce3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/UserInfoOuterClass.java @@ -0,0 +1,2122 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: UserInfo.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class UserInfoOuterClass { + private UserInfoOuterClass() {} + 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 UserInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:UserInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 userId = 1; + * @return The userId. + */ + long getUserId(); + + /** + * string userName = 2; + * @return The userName. + */ + java.lang.String getUserName(); + /** + * string userName = 2; + * @return The bytes for userName. + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * string userGender = 3; + * @return The userGender. + */ + java.lang.String getUserGender(); + /** + * string userGender = 3; + * @return The bytes for userGender. + */ + com.google.protobuf.ByteString + getUserGenderBytes(); + + /** + * string userText = 4; + * @return The userText. + */ + java.lang.String getUserText(); + /** + * string userText = 4; + * @return The bytes for userText. + */ + com.google.protobuf.ByteString + getUserTextBytes(); + + /** + * repeated .PicUrl headUrls = 5; + */ + java.util.List + getHeadUrlsList(); + /** + * repeated .PicUrl headUrls = 5; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHeadUrls(int index); + /** + * repeated .PicUrl headUrls = 5; + */ + int getHeadUrlsCount(); + /** + * repeated .PicUrl headUrls = 5; + */ + java.util.List + getHeadUrlsOrBuilderList(); + /** + * repeated .PicUrl headUrls = 5; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHeadUrlsOrBuilder( + int index); + + /** + * bool verified = 6; + * @return The verified. + */ + boolean getVerified(); + + /** + * string sUserId = 7; + * @return The sUserId. + */ + java.lang.String getSUserId(); + /** + * string sUserId = 7; + * @return The bytes for sUserId. + */ + com.google.protobuf.ByteString + getSUserIdBytes(); + + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + java.util.List + getHttpsHeadUrlsList(); + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHttpsHeadUrls(int index); + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + int getHttpsHeadUrlsCount(); + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + java.util.List + getHttpsHeadUrlsOrBuilderList(); + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHttpsHeadUrlsOrBuilder( + int index); + + /** + * string kwaiId = 9; + * @return The kwaiId. + */ + java.lang.String getKwaiId(); + /** + * string kwaiId = 9; + * @return The bytes for kwaiId. + */ + com.google.protobuf.ByteString + getKwaiIdBytes(); + } + /** + * Protobuf type {@code UserInfo} + */ + public static final class UserInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:UserInfo) + UserInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserInfo.newBuilder() to construct. + private UserInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UserInfo() { + userName_ = ""; + userGender_ = ""; + userText_ = ""; + headUrls_ = java.util.Collections.emptyList(); + sUserId_ = ""; + httpsHeadUrls_ = java.util.Collections.emptyList(); + kwaiId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo.Builder.class); + } + + public static final int USERID_FIELD_NUMBER = 1; + private long userId_ = 0L; + /** + * uint64 userId = 1; + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + + public static final int USERNAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object userName_ = ""; + /** + * string userName = 2; + * @return The userName. + */ + @java.lang.Override + 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 userName = 2; + * @return The bytes for userName. + */ + @java.lang.Override + 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 USERGENDER_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object userGender_ = ""; + /** + * string userGender = 3; + * @return The userGender. + */ + @java.lang.Override + public java.lang.String getUserGender() { + java.lang.Object ref = userGender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userGender_ = s; + return s; + } + } + /** + * string userGender = 3; + * @return The bytes for userGender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserGenderBytes() { + java.lang.Object ref = userGender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userGender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERTEXT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object userText_ = ""; + /** + * string userText = 4; + * @return The userText. + */ + @java.lang.Override + public java.lang.String getUserText() { + java.lang.Object ref = userText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userText_ = s; + return s; + } + } + /** + * string userText = 4; + * @return The bytes for userText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserTextBytes() { + java.lang.Object ref = userText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADURLS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List headUrls_; + /** + * repeated .PicUrl headUrls = 5; + */ + @java.lang.Override + public java.util.List getHeadUrlsList() { + return headUrls_; + } + /** + * repeated .PicUrl headUrls = 5; + */ + @java.lang.Override + public java.util.List + getHeadUrlsOrBuilderList() { + return headUrls_; + } + /** + * repeated .PicUrl headUrls = 5; + */ + @java.lang.Override + public int getHeadUrlsCount() { + return headUrls_.size(); + } + /** + * repeated .PicUrl headUrls = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHeadUrls(int index) { + return headUrls_.get(index); + } + /** + * repeated .PicUrl headUrls = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHeadUrlsOrBuilder( + int index) { + return headUrls_.get(index); + } + + public static final int VERIFIED_FIELD_NUMBER = 6; + private boolean verified_ = false; + /** + * bool verified = 6; + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + + public static final int SUSERID_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object sUserId_ = ""; + /** + * string sUserId = 7; + * @return The sUserId. + */ + @java.lang.Override + public java.lang.String getSUserId() { + java.lang.Object ref = sUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sUserId_ = s; + return s; + } + } + /** + * string sUserId = 7; + * @return The bytes for sUserId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSUserIdBytes() { + java.lang.Object ref = sUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTPSHEADURLS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List httpsHeadUrls_; + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + @java.lang.Override + public java.util.List getHttpsHeadUrlsList() { + return httpsHeadUrls_; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + @java.lang.Override + public java.util.List + getHttpsHeadUrlsOrBuilderList() { + return httpsHeadUrls_; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + @java.lang.Override + public int getHttpsHeadUrlsCount() { + return httpsHeadUrls_.size(); + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHttpsHeadUrls(int index) { + return httpsHeadUrls_.get(index); + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHttpsHeadUrlsOrBuilder( + int index) { + return httpsHeadUrls_.get(index); + } + + public static final int KWAIID_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object kwaiId_ = ""; + /** + * string kwaiId = 9; + * @return The kwaiId. + */ + @java.lang.Override + public java.lang.String getKwaiId() { + java.lang.Object ref = kwaiId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kwaiId_ = s; + return s; + } + } + /** + * string kwaiId = 9; + * @return The bytes for kwaiId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKwaiIdBytes() { + java.lang.Object ref = kwaiId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kwaiId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userId_ != 0L) { + output.writeUInt64(1, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userGender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userGender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userText_); + } + for (int i = 0; i < headUrls_.size(); i++) { + output.writeMessage(5, headUrls_.get(i)); + } + if (verified_ != false) { + output.writeBool(6, verified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sUserId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, sUserId_); + } + for (int i = 0; i < httpsHeadUrls_.size(); i++) { + output.writeMessage(8, httpsHeadUrls_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kwaiId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, kwaiId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userGender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userGender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userText_); + } + for (int i = 0; i < headUrls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, headUrls_.get(i)); + } + if (verified_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, verified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sUserId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, sUserId_); + } + for (int i = 0; i < httpsHeadUrls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, httpsHeadUrls_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kwaiId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, kwaiId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo) obj; + + if (getUserId() + != other.getUserId()) return false; + if (!getUserName() + .equals(other.getUserName())) return false; + if (!getUserGender() + .equals(other.getUserGender())) return false; + if (!getUserText() + .equals(other.getUserText())) return false; + if (!getHeadUrlsList() + .equals(other.getHeadUrlsList())) return false; + if (getVerified() + != other.getVerified()) return false; + if (!getSUserId() + .equals(other.getSUserId())) return false; + if (!getHttpsHeadUrlsList() + .equals(other.getHttpsHeadUrlsList())) return false; + if (!getKwaiId() + .equals(other.getKwaiId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USERID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserId()); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + USERGENDER_FIELD_NUMBER; + hash = (53 * hash) + getUserGender().hashCode(); + hash = (37 * hash) + USERTEXT_FIELD_NUMBER; + hash = (53 * hash) + getUserText().hashCode(); + if (getHeadUrlsCount() > 0) { + hash = (37 * hash) + HEADURLS_FIELD_NUMBER; + hash = (53 * hash) + getHeadUrlsList().hashCode(); + } + hash = (37 * hash) + VERIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerified()); + hash = (37 * hash) + SUSERID_FIELD_NUMBER; + hash = (53 * hash) + getSUserId().hashCode(); + if (getHttpsHeadUrlsCount() > 0) { + hash = (37 * hash) + HTTPSHEADURLS_FIELD_NUMBER; + hash = (53 * hash) + getHttpsHeadUrlsList().hashCode(); + } + hash = (37 * hash) + KWAIID_FIELD_NUMBER; + hash = (53 * hash) + getKwaiId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 UserInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:UserInfo) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = 0L; + userName_ = ""; + userGender_ = ""; + userText_ = ""; + if (headUrlsBuilder_ == null) { + headUrls_ = java.util.Collections.emptyList(); + } else { + headUrls_ = null; + headUrlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + verified_ = false; + sUserId_ = ""; + if (httpsHeadUrlsBuilder_ == null) { + httpsHeadUrls_ = java.util.Collections.emptyList(); + } else { + httpsHeadUrls_ = null; + httpsHeadUrlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + kwaiId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo result) { + if (headUrlsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + headUrls_ = java.util.Collections.unmodifiableList(headUrls_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.headUrls_ = headUrls_; + } else { + result.headUrls_ = headUrlsBuilder_.build(); + } + if (httpsHeadUrlsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + httpsHeadUrls_ = java.util.Collections.unmodifiableList(httpsHeadUrls_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.httpsHeadUrls_ = httpsHeadUrls_; + } else { + result.httpsHeadUrls_ = httpsHeadUrlsBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userName_ = userName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userGender_ = userGender_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userText_ = userText_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.verified_ = verified_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.sUserId_ = sUserId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.kwaiId_ = kwaiId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo.getDefaultInstance()) return this; + if (other.getUserId() != 0L) { + setUserId(other.getUserId()); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUserGender().isEmpty()) { + userGender_ = other.userGender_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUserText().isEmpty()) { + userText_ = other.userText_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (headUrlsBuilder_ == null) { + if (!other.headUrls_.isEmpty()) { + if (headUrls_.isEmpty()) { + headUrls_ = other.headUrls_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureHeadUrlsIsMutable(); + headUrls_.addAll(other.headUrls_); + } + onChanged(); + } + } else { + if (!other.headUrls_.isEmpty()) { + if (headUrlsBuilder_.isEmpty()) { + headUrlsBuilder_.dispose(); + headUrlsBuilder_ = null; + headUrls_ = other.headUrls_; + bitField0_ = (bitField0_ & ~0x00000010); + headUrlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getHeadUrlsFieldBuilder() : null; + } else { + headUrlsBuilder_.addAllMessages(other.headUrls_); + } + } + } + if (other.getVerified() != false) { + setVerified(other.getVerified()); + } + if (!other.getSUserId().isEmpty()) { + sUserId_ = other.sUserId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (httpsHeadUrlsBuilder_ == null) { + if (!other.httpsHeadUrls_.isEmpty()) { + if (httpsHeadUrls_.isEmpty()) { + httpsHeadUrls_ = other.httpsHeadUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.addAll(other.httpsHeadUrls_); + } + onChanged(); + } + } else { + if (!other.httpsHeadUrls_.isEmpty()) { + if (httpsHeadUrlsBuilder_.isEmpty()) { + httpsHeadUrlsBuilder_.dispose(); + httpsHeadUrlsBuilder_ = null; + httpsHeadUrls_ = other.httpsHeadUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + httpsHeadUrlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getHttpsHeadUrlsFieldBuilder() : null; + } else { + httpsHeadUrlsBuilder_.addAllMessages(other.httpsHeadUrls_); + } + } + } + if (!other.getKwaiId().isEmpty()) { + kwaiId_ = other.kwaiId_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + userId_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + userName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + userGender_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + userText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.parser(), + extensionRegistry); + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.add(m); + } else { + headUrlsBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: { + verified_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + sUserId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl m = + input.readMessage( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.parser(), + extensionRegistry); + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(m); + } else { + httpsHeadUrlsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: { + kwaiId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long userId_ ; + /** + * uint64 userId = 1; + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + /** + * uint64 userId = 1; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(long value) { + + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * uint64 userId = 1; + * @return This builder for chaining. + */ + public Builder clearUserId() { + bitField0_ = (bitField0_ & ~0x00000001); + userId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + * string userName = 2; + * @return The userName. + */ + 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 userName = 2; + * @return The bytes for userName. + */ + 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 userName = 2; + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string userName = 2; + * @return This builder for chaining. + */ + public Builder clearUserName() { + userName_ = getDefaultInstance().getUserName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string userName = 2; + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userGender_ = ""; + /** + * string userGender = 3; + * @return The userGender. + */ + public java.lang.String getUserGender() { + java.lang.Object ref = userGender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userGender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string userGender = 3; + * @return The bytes for userGender. + */ + public com.google.protobuf.ByteString + getUserGenderBytes() { + java.lang.Object ref = userGender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userGender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string userGender = 3; + * @param value The userGender to set. + * @return This builder for chaining. + */ + public Builder setUserGender( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userGender_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string userGender = 3; + * @return This builder for chaining. + */ + public Builder clearUserGender() { + userGender_ = getDefaultInstance().getUserGender(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string userGender = 3; + * @param value The bytes for userGender to set. + * @return This builder for chaining. + */ + public Builder setUserGenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userGender_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object userText_ = ""; + /** + * string userText = 4; + * @return The userText. + */ + public java.lang.String getUserText() { + java.lang.Object ref = userText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string userText = 4; + * @return The bytes for userText. + */ + public com.google.protobuf.ByteString + getUserTextBytes() { + java.lang.Object ref = userText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string userText = 4; + * @param value The userText to set. + * @return This builder for chaining. + */ + public Builder setUserText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string userText = 4; + * @return This builder for chaining. + */ + public Builder clearUserText() { + userText_ = getDefaultInstance().getUserText(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string userText = 4; + * @param value The bytes for userText to set. + * @return This builder for chaining. + */ + public Builder setUserTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List headUrls_ = + java.util.Collections.emptyList(); + private void ensureHeadUrlsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + headUrls_ = new java.util.ArrayList(headUrls_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> headUrlsBuilder_; + + /** + * repeated .PicUrl headUrls = 5; + */ + public java.util.List getHeadUrlsList() { + if (headUrlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(headUrls_); + } else { + return headUrlsBuilder_.getMessageList(); + } + } + /** + * repeated .PicUrl headUrls = 5; + */ + public int getHeadUrlsCount() { + if (headUrlsBuilder_ == null) { + return headUrls_.size(); + } else { + return headUrlsBuilder_.getCount(); + } + } + /** + * repeated .PicUrl headUrls = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHeadUrls(int index) { + if (headUrlsBuilder_ == null) { + return headUrls_.get(index); + } else { + return headUrlsBuilder_.getMessage(index); + } + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder setHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (headUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadUrlsIsMutable(); + headUrls_.set(index, value); + onChanged(); + } else { + headUrlsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder setHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.set(index, builderForValue.build()); + onChanged(); + } else { + headUrlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder addHeadUrls(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (headUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadUrlsIsMutable(); + headUrls_.add(value); + onChanged(); + } else { + headUrlsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder addHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (headUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadUrlsIsMutable(); + headUrls_.add(index, value); + onChanged(); + } else { + headUrlsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder addHeadUrls( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.add(builderForValue.build()); + onChanged(); + } else { + headUrlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder addHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.add(index, builderForValue.build()); + onChanged(); + } else { + headUrlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder addAllHeadUrls( + java.lang.Iterable values) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, headUrls_); + onChanged(); + } else { + headUrlsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder clearHeadUrls() { + if (headUrlsBuilder_ == null) { + headUrls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + headUrlsBuilder_.clear(); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public Builder removeHeadUrls(int index) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.remove(index); + onChanged(); + } else { + headUrlsBuilder_.remove(index); + } + return this; + } + /** + * repeated .PicUrl headUrls = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder getHeadUrlsBuilder( + int index) { + return getHeadUrlsFieldBuilder().getBuilder(index); + } + /** + * repeated .PicUrl headUrls = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHeadUrlsOrBuilder( + int index) { + if (headUrlsBuilder_ == null) { + return headUrls_.get(index); } else { + return headUrlsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .PicUrl headUrls = 5; + */ + public java.util.List + getHeadUrlsOrBuilderList() { + if (headUrlsBuilder_ != null) { + return headUrlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headUrls_); + } + } + /** + * repeated .PicUrl headUrls = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHeadUrlsBuilder() { + return getHeadUrlsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * repeated .PicUrl headUrls = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHeadUrlsBuilder( + int index) { + return getHeadUrlsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * repeated .PicUrl headUrls = 5; + */ + public java.util.List + getHeadUrlsBuilderList() { + return getHeadUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHeadUrlsFieldBuilder() { + if (headUrlsBuilder_ == null) { + headUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder>( + headUrls_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + headUrls_ = null; + } + return headUrlsBuilder_; + } + + private boolean verified_ ; + /** + * bool verified = 6; + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + /** + * bool verified = 6; + * @param value The verified to set. + * @return This builder for chaining. + */ + public Builder setVerified(boolean value) { + + verified_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bool verified = 6; + * @return This builder for chaining. + */ + public Builder clearVerified() { + bitField0_ = (bitField0_ & ~0x00000020); + verified_ = false; + onChanged(); + return this; + } + + private java.lang.Object sUserId_ = ""; + /** + * string sUserId = 7; + * @return The sUserId. + */ + public java.lang.String getSUserId() { + java.lang.Object ref = sUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string sUserId = 7; + * @return The bytes for sUserId. + */ + public com.google.protobuf.ByteString + getSUserIdBytes() { + java.lang.Object ref = sUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string sUserId = 7; + * @param value The sUserId to set. + * @return This builder for chaining. + */ + public Builder setSUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sUserId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * string sUserId = 7; + * @return This builder for chaining. + */ + public Builder clearSUserId() { + sUserId_ = getDefaultInstance().getSUserId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * string sUserId = 7; + * @param value The bytes for sUserId to set. + * @return This builder for chaining. + */ + public Builder setSUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sUserId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.util.List httpsHeadUrls_ = + java.util.Collections.emptyList(); + private void ensureHttpsHeadUrlsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + httpsHeadUrls_ = new java.util.ArrayList(httpsHeadUrls_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> httpsHeadUrlsBuilder_; + + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public java.util.List getHttpsHeadUrlsList() { + if (httpsHeadUrlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(httpsHeadUrls_); + } else { + return httpsHeadUrlsBuilder_.getMessageList(); + } + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public int getHttpsHeadUrlsCount() { + if (httpsHeadUrlsBuilder_ == null) { + return httpsHeadUrls_.size(); + } else { + return httpsHeadUrlsBuilder_.getCount(); + } + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHttpsHeadUrls(int index) { + if (httpsHeadUrlsBuilder_ == null) { + return httpsHeadUrls_.get(index); + } else { + return httpsHeadUrlsBuilder_.getMessage(index); + } + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder setHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (httpsHeadUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.set(index, value); + onChanged(); + } else { + httpsHeadUrlsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder setHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.set(index, builderForValue.build()); + onChanged(); + } else { + httpsHeadUrlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder addHttpsHeadUrls(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (httpsHeadUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(value); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder addHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (httpsHeadUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(index, value); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder addHttpsHeadUrls( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(builderForValue.build()); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder addHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(index, builderForValue.build()); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder addAllHttpsHeadUrls( + java.lang.Iterable values) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, httpsHeadUrls_); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder clearHttpsHeadUrls() { + if (httpsHeadUrlsBuilder_ == null) { + httpsHeadUrls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + httpsHeadUrlsBuilder_.clear(); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public Builder removeHttpsHeadUrls(int index) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.remove(index); + onChanged(); + } else { + httpsHeadUrlsBuilder_.remove(index); + } + return this; + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder getHttpsHeadUrlsBuilder( + int index) { + return getHttpsHeadUrlsFieldBuilder().getBuilder(index); + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHttpsHeadUrlsOrBuilder( + int index) { + if (httpsHeadUrlsBuilder_ == null) { + return httpsHeadUrls_.get(index); } else { + return httpsHeadUrlsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public java.util.List + getHttpsHeadUrlsOrBuilderList() { + if (httpsHeadUrlsBuilder_ != null) { + return httpsHeadUrlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(httpsHeadUrls_); + } + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHttpsHeadUrlsBuilder() { + return getHttpsHeadUrlsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHttpsHeadUrlsBuilder( + int index) { + return getHttpsHeadUrlsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * repeated .PicUrl httpsHeadUrls = 8; + */ + public java.util.List + getHttpsHeadUrlsBuilderList() { + return getHttpsHeadUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHttpsHeadUrlsFieldBuilder() { + if (httpsHeadUrlsBuilder_ == null) { + httpsHeadUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder>( + httpsHeadUrls_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + httpsHeadUrls_ = null; + } + return httpsHeadUrlsBuilder_; + } + + private java.lang.Object kwaiId_ = ""; + /** + * string kwaiId = 9; + * @return The kwaiId. + */ + public java.lang.String getKwaiId() { + java.lang.Object ref = kwaiId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kwaiId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string kwaiId = 9; + * @return The bytes for kwaiId. + */ + public com.google.protobuf.ByteString + getKwaiIdBytes() { + java.lang.Object ref = kwaiId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kwaiId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string kwaiId = 9; + * @param value The kwaiId to set. + * @return This builder for chaining. + */ + public Builder setKwaiId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + kwaiId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * string kwaiId = 9; + * @return This builder for chaining. + */ + public Builder clearKwaiId() { + kwaiId_ = getDefaultInstance().getKwaiId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * string kwaiId = 9; + * @param value The bytes for kwaiId to set. + * @return This builder for chaining. + */ + public Builder setKwaiIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kwaiId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:UserInfo) + } + + // @@protoc_insertion_point(class_scope:UserInfo) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.UserInfoOuterClass.UserInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_UserInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_UserInfo_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\016UserInfo.proto\032\014PicUrl.proto\"\300\001\n\010UserI" + + "nfo\022\016\n\006userId\030\001 \001(\004\022\020\n\010userName\030\002 \001(\t\022\022\n" + + "\nuserGender\030\003 \001(\t\022\020\n\010userText\030\004 \001(\t\022\031\n\010h" + + "eadUrls\030\005 \003(\0132\007.PicUrl\022\020\n\010verified\030\006 \001(\010" + + "\022\017\n\007sUserId\030\007 \001(\t\022\036\n\rhttpsHeadUrls\030\010 \003(\013" + + "2\007.PicUrl\022\016\n\006kwaiId\030\t \001(\tB<\n:tech.ordina" + + "ryroad.live.chat.client.codec.kuaishou.p" + + "rotobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(), + }); + internal_static_UserInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_UserInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_UserInfo_descriptor, + new java.lang.String[] { "UserId", "UserName", "UserGender", "UserText", "HeadUrls", "Verified", "SUserId", "HttpsHeadUrls", "KwaiId", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebComboCommentFeedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebComboCommentFeedOuterClass.java new file mode 100644 index 0000000..d2c7de1 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebComboCommentFeedOuterClass.java @@ -0,0 +1,847 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebComboCommentFeed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebComboCommentFeedOuterClass { + private WebComboCommentFeedOuterClass() {} + 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 WebComboCommentFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebComboCommentFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * string content = 2; + * @return The content. + */ + java.lang.String getContent(); + /** + * string content = 2; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * uint32 comboCount = 3; + * @return The comboCount. + */ + int getComboCount(); + } + /** + * Protobuf type {@code WebComboCommentFeed} + */ + public static final class WebComboCommentFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebComboCommentFeed) + WebComboCommentFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebComboCommentFeed.newBuilder() to construct. + private WebComboCommentFeed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebComboCommentFeed() { + id_ = ""; + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebComboCommentFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + 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; + * @return The bytes for id. + */ + @java.lang.Override + 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 CONTENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * string content = 2; + * @return The content. + */ + @java.lang.Override + 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; + * @return The bytes for content. + */ + @java.lang.Override + 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 COMBOCOUNT_FIELD_NUMBER = 3; + private int comboCount_ = 0; + /** + * uint32 comboCount = 3; + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (comboCount_ != 0) { + output.writeUInt32(3, comboCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (comboCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, comboCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (getComboCount() + != other.getComboCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + COMBOCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getComboCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebComboCommentFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebComboCommentFeed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + content_ = ""; + comboCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.comboCount_ = comboCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getComboCount() != 0) { + setComboCount(other.getComboCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + comboCount_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + 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; + * @return The bytes for id. + */ + 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; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * string content = 2; + * @return The content. + */ + 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; + * @return The bytes for content. + */ + 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; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string content = 2; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string content = 2; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int comboCount_ ; + /** + * uint32 comboCount = 3; + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + /** + * uint32 comboCount = 3; + * @param value The comboCount to set. + * @return This builder for chaining. + */ + public Builder setComboCount(int value) { + + comboCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint32 comboCount = 3; + * @return This builder for chaining. + */ + public Builder clearComboCount() { + bitField0_ = (bitField0_ & ~0x00000004); + comboCount_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebComboCommentFeed) + } + + // @@protoc_insertion_point(class_scope:WebComboCommentFeed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebComboCommentFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebComboCommentFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebComboCommentFeed_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\031WebComboCommentFeed.proto\"F\n\023WebComboC" + + "ommentFeed\022\n\n\002id\030\001 \001(\t\022\017\n\007content\030\002 \001(\t\022" + + "\022\n\ncomboCount\030\003 \001(\rB<\n:tech.ordinaryroad" + + ".live.chat.client.codec.kuaishou.protobu" + + "fb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_WebComboCommentFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebComboCommentFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebComboCommentFeed_descriptor, + new java.lang.String[] { "Id", "Content", "ComboCount", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebCommentFeedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebCommentFeedOuterClass.java new file mode 100644 index 0000000..af32056 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebCommentFeedOuterClass.java @@ -0,0 +1,1668 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebCommentFeed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebCommentFeedOuterClass { + private WebCommentFeedOuterClass() {} + 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 WebCommentFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebCommentFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * .SimpleUserInfo user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * string content = 3; + * @return The content. + */ + java.lang.String getContent(); + /** + * string content = 3; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * string deviceHash = 4; + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * string deviceHash = 4; + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + long getSortRank(); + + /** + * string color = 6; + * @return The color. + */ + java.lang.String getColor(); + /** + * string color = 6; + * @return The bytes for color. + */ + com.google.protobuf.ByteString + getColorBytes(); + + /** + * .WebCommentFeedShowType showType = 7; + * @return The enum numeric value on the wire for showType. + */ + int getShowTypeValue(); + /** + * .WebCommentFeedShowType showType = 7; + * @return The showType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType getShowType(); + + /** + * .LiveAudienceState senderState = 8; + * @return Whether the senderState field is set. + */ + boolean hasSenderState(); + /** + * .LiveAudienceState senderState = 8; + * @return The senderState. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getSenderState(); + /** + * .LiveAudienceState senderState = 8; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getSenderStateOrBuilder(); + } + /** + * Protobuf type {@code WebCommentFeed} + */ + public static final class WebCommentFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebCommentFeed) + WebCommentFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebCommentFeed.newBuilder() to construct. + private WebCommentFeed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebCommentFeed() { + id_ = ""; + content_ = ""; + deviceHash_ = ""; + color_ = ""; + showType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebCommentFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + 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; + * @return The bytes for id. + */ + @java.lang.Override + 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 USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * .SimpleUserInfo user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int CONTENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * string content = 3; + * @return The content. + */ + @java.lang.Override + 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 = 3; + * @return The bytes for content. + */ + @java.lang.Override + 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 DEVICEHASH_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 4; + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * string deviceHash = 4; + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SORTRANK_FIELD_NUMBER = 5; + private long sortRank_ = 0L; + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int COLOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object color_ = ""; + /** + * string color = 6; + * @return The color. + */ + @java.lang.Override + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } + } + /** + * string color = 6; + * @return The bytes for color. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOWTYPE_FIELD_NUMBER = 7; + private int showType_ = 0; + /** + * .WebCommentFeedShowType showType = 7; + * @return The enum numeric value on the wire for showType. + */ + @java.lang.Override public int getShowTypeValue() { + return showType_; + } + /** + * .WebCommentFeedShowType showType = 7; + * @return The showType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType getShowType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.forNumber(showType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.UNRECOGNIZED : result; + } + + public static final int SENDERSTATE_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState senderState_; + /** + * .LiveAudienceState senderState = 8; + * @return Whether the senderState field is set. + */ + @java.lang.Override + public boolean hasSenderState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .LiveAudienceState senderState = 8; + * @return The senderState. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getSenderState() { + return senderState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } + /** + * .LiveAudienceState senderState = 8; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getSenderStateOrBuilder() { + return senderState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deviceHash_); + } + if (sortRank_ != 0L) { + output.writeUInt64(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, color_); + } + if (showType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.FEED_SHOW_UNKNOWN.getNumber()) { + output.writeEnum(7, showType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getSenderState()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, deviceHash_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, color_); + } + if (showType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.FEED_SHOW_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, showType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getSenderState()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getContent() + .equals(other.getContent())) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (!getColor() + .equals(other.getColor())) return false; + if (showType_ != other.showType_) return false; + if (hasSenderState() != other.hasSenderState()) return false; + if (hasSenderState()) { + if (!getSenderState() + .equals(other.getSenderState())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + hash = (37 * hash) + SHOWTYPE_FIELD_NUMBER; + hash = (53 * hash) + showType_; + if (hasSenderState()) { + hash = (37 * hash) + SENDERSTATE_FIELD_NUMBER; + hash = (53 * hash) + getSenderState().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebCommentFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebCommentFeed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + getSenderStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + content_ = ""; + deviceHash_ = ""; + sortRank_ = 0L; + color_ = ""; + showType_ = 0; + senderState_ = null; + if (senderStateBuilder_ != null) { + senderStateBuilder_.dispose(); + senderStateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deviceHash_ = deviceHash_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.showType_ = showType_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.senderState_ = senderStateBuilder_ == null + ? senderState_ + : senderStateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (!other.getColor().isEmpty()) { + color_ = other.color_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.showType_ != 0) { + setShowTypeValue(other.getShowTypeValue()); + } + if (other.hasSenderState()) { + mergeSenderState(other.getSenderState()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + color_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + showType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + input.readMessage( + getSenderStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + 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; + * @return The bytes for id. + */ + 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; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * .SimpleUserInfo user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object content_ = ""; + /** + * string content = 3; + * @return The content. + */ + 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 = 3; + * @return The bytes for content. + */ + 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 = 3; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string content = 3; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string content = 3; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 4; + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string deviceHash = 4; + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string deviceHash = 4; + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string deviceHash = 4; + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string deviceHash = 4; + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * uint64 sortRank = 5; + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 sortRank = 5; + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000010); + sortRank_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object color_ = ""; + /** + * string color = 6; + * @return The color. + */ + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string color = 6; + * @return The bytes for color. + */ + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string color = 6; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + color_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string color = 6; + * @return This builder for chaining. + */ + public Builder clearColor() { + color_ = getDefaultInstance().getColor(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string color = 6; + * @param value The bytes for color to set. + * @return This builder for chaining. + */ + public Builder setColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + color_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int showType_ = 0; + /** + * .WebCommentFeedShowType showType = 7; + * @return The enum numeric value on the wire for showType. + */ + @java.lang.Override public int getShowTypeValue() { + return showType_; + } + /** + * .WebCommentFeedShowType showType = 7; + * @param value The enum numeric value on the wire for showType to set. + * @return This builder for chaining. + */ + public Builder setShowTypeValue(int value) { + showType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .WebCommentFeedShowType showType = 7; + * @return The showType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType getShowType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.forNumber(showType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.UNRECOGNIZED : result; + } + /** + * .WebCommentFeedShowType showType = 7; + * @param value The showType to set. + * @return This builder for chaining. + */ + public Builder setShowType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + showType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebCommentFeedShowType showType = 7; + * @return This builder for chaining. + */ + public Builder clearShowType() { + bitField0_ = (bitField0_ & ~0x00000040); + showType_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState senderState_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> senderStateBuilder_; + /** + * .LiveAudienceState senderState = 8; + * @return Whether the senderState field is set. + */ + public boolean hasSenderState() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .LiveAudienceState senderState = 8; + * @return The senderState. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getSenderState() { + if (senderStateBuilder_ == null) { + return senderState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } else { + return senderStateBuilder_.getMessage(); + } + } + /** + * .LiveAudienceState senderState = 8; + */ + public Builder setSenderState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (senderStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + senderState_ = value; + } else { + senderStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .LiveAudienceState senderState = 8; + */ + public Builder setSenderState( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder builderForValue) { + if (senderStateBuilder_ == null) { + senderState_ = builderForValue.build(); + } else { + senderStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * .LiveAudienceState senderState = 8; + */ + public Builder mergeSenderState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (senderStateBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + senderState_ != null && + senderState_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance()) { + getSenderStateBuilder().mergeFrom(value); + } else { + senderState_ = value; + } + } else { + senderStateBuilder_.mergeFrom(value); + } + if (senderState_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * .LiveAudienceState senderState = 8; + */ + public Builder clearSenderState() { + bitField0_ = (bitField0_ & ~0x00000080); + senderState_ = null; + if (senderStateBuilder_ != null) { + senderStateBuilder_.dispose(); + senderStateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .LiveAudienceState senderState = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder getSenderStateBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getSenderStateFieldBuilder().getBuilder(); + } + /** + * .LiveAudienceState senderState = 8; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getSenderStateOrBuilder() { + if (senderStateBuilder_ != null) { + return senderStateBuilder_.getMessageOrBuilder(); + } else { + return senderState_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } + } + /** + * .LiveAudienceState senderState = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> + getSenderStateFieldBuilder() { + if (senderStateBuilder_ == null) { + senderStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder>( + getSenderState(), + getParentForChildren(), + isClean()); + senderState_ = null; + } + return senderStateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebCommentFeed) + } + + // @@protoc_insertion_point(class_scope:WebCommentFeed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebCommentFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebCommentFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebCommentFeed_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\024WebCommentFeed.proto\032\024SimpleUserInfo.p" + + "roto\032\034WebCommentFeedShowType.proto\032\027Live" + + "AudienceState.proto\"\325\001\n\016WebCommentFeed\022\n" + + "\n\002id\030\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.SimpleUserInf" + + "o\022\017\n\007content\030\003 \001(\t\022\022\n\ndeviceHash\030\004 \001(\t\022\020" + + "\n\010sortRank\030\005 \001(\004\022\r\n\005color\030\006 \001(\t\022)\n\010showT" + + "ype\030\007 \001(\0162\027.WebCommentFeedShowType\022\'\n\013se" + + "nderState\030\010 \001(\0132\022.LiveAudienceStateB<\n:t" + + "ech.ordinaryroad.live.chat.client.codec." + + "kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(), + }); + internal_static_WebCommentFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebCommentFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebCommentFeed_descriptor, + new java.lang.String[] { "Id", "User", "Content", "DeviceHash", "SortRank", "Color", "ShowType", "SenderState", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebCommentFeedShowTypeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebCommentFeedShowTypeOuterClass.java new file mode 100644 index 0000000..4306bab --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebCommentFeedShowTypeOuterClass.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebCommentFeedShowType.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebCommentFeedShowTypeOuterClass { + private WebCommentFeedShowTypeOuterClass() {} + 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 WebCommentFeedShowType} + */ + public enum WebCommentFeedShowType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * FEED_SHOW_UNKNOWN = 0; + */ + FEED_SHOW_UNKNOWN(0), + /** + * FEED_SHOW_NORMAL = 1; + */ + FEED_SHOW_NORMAL(1), + /** + * FEED_HIDDEN = 2; + */ + FEED_HIDDEN(2), + UNRECOGNIZED(-1), + ; + + /** + * FEED_SHOW_UNKNOWN = 0; + */ + public static final int FEED_SHOW_UNKNOWN_VALUE = 0; + /** + * FEED_SHOW_NORMAL = 1; + */ + public static final int FEED_SHOW_NORMAL_VALUE = 1; + /** + * FEED_HIDDEN = 2; + */ + public static final int FEED_HIDDEN_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebCommentFeedShowType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebCommentFeedShowType forNumber(int value) { + switch (value) { + case 0: return FEED_SHOW_UNKNOWN; + case 1: return FEED_SHOW_NORMAL; + case 2: return FEED_HIDDEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebCommentFeedShowType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WebCommentFeedShowType findValueByNumber(int number) { + return WebCommentFeedShowType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebCommentFeedShowType[] VALUES = values(); + + public static WebCommentFeedShowType 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 WebCommentFeedShowType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebCommentFeedShowType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034WebCommentFeedShowType.proto*V\n\026WebCom" + + "mentFeedShowType\022\025\n\021FEED_SHOW_UNKNOWN\020\000\022" + + "\024\n\020FEED_SHOW_NORMAL\020\001\022\017\n\013FEED_HIDDEN\020\002B<" + + "\n:tech.ordinaryroad.live.chat.client.cod" + + "ec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebGiftFeedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebGiftFeedOuterClass.java new file mode 100644 index 0000000..bc57fc7 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebGiftFeedOuterClass.java @@ -0,0 +1,2522 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebGiftFeed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebGiftFeedOuterClass { + private WebGiftFeedOuterClass() {} + 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 WebGiftFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebGiftFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * .SimpleUserInfo user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * uint64 time = 3; + * @return The time. + */ + long getTime(); + + /** + * uint32 intGiftId = 4; + * @return The intGiftId. + */ + int getIntGiftId(); + + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + long getSortRank(); + + /** + * string mergeKey = 6; + * @return The mergeKey. + */ + java.lang.String getMergeKey(); + /** + * string mergeKey = 6; + * @return The bytes for mergeKey. + */ + com.google.protobuf.ByteString + getMergeKeyBytes(); + + /** + * uint32 batchSize = 7; + * @return The batchSize. + */ + int getBatchSize(); + + /** + * uint32 comboCount = 8; + * @return The comboCount. + */ + int getComboCount(); + + /** + * uint32 rank = 9; + * @return The rank. + */ + int getRank(); + + /** + * uint64 expireDuration = 10; + * @return The expireDuration. + */ + long getExpireDuration(); + + /** + * uint64 clientTimestamp = 11; + * @return The clientTimestamp. + */ + long getClientTimestamp(); + + /** + * uint64 slotDisplayDuration = 12; + * @return The slotDisplayDuration. + */ + long getSlotDisplayDuration(); + + /** + * uint32 starLevel = 13; + * @return The starLevel. + */ + int getStarLevel(); + + /** + * .WebGiftFeed.StyleType styleType = 14; + * @return The enum numeric value on the wire for styleType. + */ + int getStyleTypeValue(); + /** + * .WebGiftFeed.StyleType styleType = 14; + * @return The styleType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType getStyleType(); + + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @return The enum numeric value on the wire for liveAssistantType. + */ + int getLiveAssistantTypeValue(); + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @return The liveAssistantType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType(); + + /** + * string deviceHash = 16; + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * string deviceHash = 16; + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + + /** + * bool danmakuDisplay = 17; + * @return The danmakuDisplay. + */ + boolean getDanmakuDisplay(); + + /** + * .LiveAudienceState liveAudienceState = 18; + * @return Whether the liveAudienceState field is set. + */ + boolean hasLiveAudienceState(); + /** + * .LiveAudienceState liveAudienceState = 18; + * @return The liveAudienceState. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getLiveAudienceState(); + /** + * .LiveAudienceState liveAudienceState = 18; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getLiveAudienceStateOrBuilder(); + } + /** + * Protobuf type {@code WebGiftFeed} + */ + public static final class WebGiftFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebGiftFeed) + WebGiftFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebGiftFeed.newBuilder() to construct. + private WebGiftFeed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebGiftFeed() { + id_ = ""; + mergeKey_ = ""; + styleType_ = 0; + liveAssistantType_ = 0; + deviceHash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebGiftFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder.class); + } + + /** + * Protobuf enum {@code WebGiftFeed.StyleType} + */ + public enum StyleType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_STYLE = 0; + */ + UNKNOWN_STYLE(0), + /** + * BATCH_STAR_0 = 1; + */ + BATCH_STAR_0(1), + /** + * BATCH_STAR_1 = 2; + */ + BATCH_STAR_1(2), + /** + * BATCH_STAR_2 = 3; + */ + BATCH_STAR_2(3), + /** + * BATCH_STAR_3 = 4; + */ + BATCH_STAR_3(4), + /** + * BATCH_STAR_4 = 5; + */ + BATCH_STAR_4(5), + /** + * BATCH_STAR_5 = 6; + */ + BATCH_STAR_5(6), + /** + * BATCH_STAR_6 = 7; + */ + BATCH_STAR_6(7), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_STYLE = 0; + */ + public static final int UNKNOWN_STYLE_VALUE = 0; + /** + * BATCH_STAR_0 = 1; + */ + public static final int BATCH_STAR_0_VALUE = 1; + /** + * BATCH_STAR_1 = 2; + */ + public static final int BATCH_STAR_1_VALUE = 2; + /** + * BATCH_STAR_2 = 3; + */ + public static final int BATCH_STAR_2_VALUE = 3; + /** + * BATCH_STAR_3 = 4; + */ + public static final int BATCH_STAR_3_VALUE = 4; + /** + * BATCH_STAR_4 = 5; + */ + public static final int BATCH_STAR_4_VALUE = 5; + /** + * BATCH_STAR_5 = 6; + */ + public static final int BATCH_STAR_5_VALUE = 6; + /** + * BATCH_STAR_6 = 7; + */ + public static final int BATCH_STAR_6_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StyleType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StyleType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_STYLE; + case 1: return BATCH_STAR_0; + case 2: return BATCH_STAR_1; + case 3: return BATCH_STAR_2; + case 4: return BATCH_STAR_3; + case 5: return BATCH_STAR_4; + case 6: return BATCH_STAR_5; + case 7: return BATCH_STAR_6; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + StyleType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StyleType findValueByNumber(int number) { + return StyleType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDescriptor().getEnumTypes().get(0); + } + + private static final StyleType[] VALUES = values(); + + public static StyleType 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 StyleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebGiftFeed.StyleType) + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + 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; + * @return The bytes for id. + */ + @java.lang.Override + 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 USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * .SimpleUserInfo user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int TIME_FIELD_NUMBER = 3; + private long time_ = 0L; + /** + * uint64 time = 3; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int INTGIFTID_FIELD_NUMBER = 4; + private int intGiftId_ = 0; + /** + * uint32 intGiftId = 4; + * @return The intGiftId. + */ + @java.lang.Override + public int getIntGiftId() { + return intGiftId_; + } + + public static final int SORTRANK_FIELD_NUMBER = 5; + private long sortRank_ = 0L; + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int MERGEKEY_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object mergeKey_ = ""; + /** + * string mergeKey = 6; + * @return The mergeKey. + */ + @java.lang.Override + public java.lang.String getMergeKey() { + java.lang.Object ref = mergeKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergeKey_ = s; + return s; + } + } + /** + * string mergeKey = 6; + * @return The bytes for mergeKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMergeKeyBytes() { + java.lang.Object ref = mergeKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mergeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCHSIZE_FIELD_NUMBER = 7; + private int batchSize_ = 0; + /** + * uint32 batchSize = 7; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + public static final int COMBOCOUNT_FIELD_NUMBER = 8; + private int comboCount_ = 0; + /** + * uint32 comboCount = 8; + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + + public static final int RANK_FIELD_NUMBER = 9; + private int rank_ = 0; + /** + * uint32 rank = 9; + * @return The rank. + */ + @java.lang.Override + public int getRank() { + return rank_; + } + + public static final int EXPIREDURATION_FIELD_NUMBER = 10; + private long expireDuration_ = 0L; + /** + * uint64 expireDuration = 10; + * @return The expireDuration. + */ + @java.lang.Override + public long getExpireDuration() { + return expireDuration_; + } + + public static final int CLIENTTIMESTAMP_FIELD_NUMBER = 11; + private long clientTimestamp_ = 0L; + /** + * uint64 clientTimestamp = 11; + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + + public static final int SLOTDISPLAYDURATION_FIELD_NUMBER = 12; + private long slotDisplayDuration_ = 0L; + /** + * uint64 slotDisplayDuration = 12; + * @return The slotDisplayDuration. + */ + @java.lang.Override + public long getSlotDisplayDuration() { + return slotDisplayDuration_; + } + + public static final int STARLEVEL_FIELD_NUMBER = 13; + private int starLevel_ = 0; + /** + * uint32 starLevel = 13; + * @return The starLevel. + */ + @java.lang.Override + public int getStarLevel() { + return starLevel_; + } + + public static final int STYLETYPE_FIELD_NUMBER = 14; + private int styleType_ = 0; + /** + * .WebGiftFeed.StyleType styleType = 14; + * @return The enum numeric value on the wire for styleType. + */ + @java.lang.Override public int getStyleTypeValue() { + return styleType_; + } + /** + * .WebGiftFeed.StyleType styleType = 14; + * @return The styleType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType getStyleType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.forNumber(styleType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNRECOGNIZED : result; + } + + public static final int LIVEASSISTANTTYPE_FIELD_NUMBER = 15; + private int liveAssistantType_ = 0; + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @return The liveAssistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + + public static final int DEVICEHASH_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 16; + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * string deviceHash = 16; + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DANMAKUDISPLAY_FIELD_NUMBER = 17; + private boolean danmakuDisplay_ = false; + /** + * bool danmakuDisplay = 17; + * @return The danmakuDisplay. + */ + @java.lang.Override + public boolean getDanmakuDisplay() { + return danmakuDisplay_; + } + + public static final int LIVEAUDIENCESTATE_FIELD_NUMBER = 18; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState liveAudienceState_; + /** + * .LiveAudienceState liveAudienceState = 18; + * @return Whether the liveAudienceState field is set. + */ + @java.lang.Override + public boolean hasLiveAudienceState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .LiveAudienceState liveAudienceState = 18; + * @return The liveAudienceState. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getLiveAudienceState() { + return liveAudienceState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getLiveAudienceStateOrBuilder() { + return liveAudienceState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUser()); + } + if (time_ != 0L) { + output.writeUInt64(3, time_); + } + if (intGiftId_ != 0) { + output.writeUInt32(4, intGiftId_); + } + if (sortRank_ != 0L) { + output.writeUInt64(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergeKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, mergeKey_); + } + if (batchSize_ != 0) { + output.writeUInt32(7, batchSize_); + } + if (comboCount_ != 0) { + output.writeUInt32(8, comboCount_); + } + if (rank_ != 0) { + output.writeUInt32(9, rank_); + } + if (expireDuration_ != 0L) { + output.writeUInt64(10, expireDuration_); + } + if (clientTimestamp_ != 0L) { + output.writeUInt64(11, clientTimestamp_); + } + if (slotDisplayDuration_ != 0L) { + output.writeUInt64(12, slotDisplayDuration_); + } + if (starLevel_ != 0) { + output.writeUInt32(13, starLevel_); + } + if (styleType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNKNOWN_STYLE.getNumber()) { + output.writeEnum(14, styleType_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(15, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, deviceHash_); + } + if (danmakuDisplay_ != false) { + output.writeBool(17, danmakuDisplay_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(18, getLiveAudienceState()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, time_); + } + if (intGiftId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, intGiftId_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergeKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, mergeKey_); + } + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, batchSize_); + } + if (comboCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, comboCount_); + } + if (rank_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, rank_); + } + if (expireDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(10, expireDuration_); + } + if (clientTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, clientTimestamp_); + } + if (slotDisplayDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(12, slotDisplayDuration_); + } + if (starLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(13, starLevel_); + } + if (styleType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNKNOWN_STYLE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, styleType_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, deviceHash_); + } + if (danmakuDisplay_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, danmakuDisplay_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getLiveAudienceState()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getTime() + != other.getTime()) return false; + if (getIntGiftId() + != other.getIntGiftId()) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (!getMergeKey() + .equals(other.getMergeKey())) return false; + if (getBatchSize() + != other.getBatchSize()) return false; + if (getComboCount() + != other.getComboCount()) return false; + if (getRank() + != other.getRank()) return false; + if (getExpireDuration() + != other.getExpireDuration()) return false; + if (getClientTimestamp() + != other.getClientTimestamp()) return false; + if (getSlotDisplayDuration() + != other.getSlotDisplayDuration()) return false; + if (getStarLevel() + != other.getStarLevel()) return false; + if (styleType_ != other.styleType_) return false; + if (liveAssistantType_ != other.liveAssistantType_) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (getDanmakuDisplay() + != other.getDanmakuDisplay()) return false; + if (hasLiveAudienceState() != other.hasLiveAudienceState()) return false; + if (hasLiveAudienceState()) { + if (!getLiveAudienceState() + .equals(other.getLiveAudienceState())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + INTGIFTID_FIELD_NUMBER; + hash = (53 * hash) + getIntGiftId(); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + MERGEKEY_FIELD_NUMBER; + hash = (53 * hash) + getMergeKey().hashCode(); + hash = (37 * hash) + BATCHSIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (37 * hash) + COMBOCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getComboCount(); + hash = (37 * hash) + RANK_FIELD_NUMBER; + hash = (53 * hash) + getRank(); + hash = (37 * hash) + EXPIREDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getExpireDuration()); + hash = (37 * hash) + CLIENTTIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getClientTimestamp()); + hash = (37 * hash) + SLOTDISPLAYDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSlotDisplayDuration()); + hash = (37 * hash) + STARLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getStarLevel(); + hash = (37 * hash) + STYLETYPE_FIELD_NUMBER; + hash = (53 * hash) + styleType_; + hash = (37 * hash) + LIVEASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + liveAssistantType_; + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + hash = (37 * hash) + DANMAKUDISPLAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDanmakuDisplay()); + if (hasLiveAudienceState()) { + hash = (37 * hash) + LIVEAUDIENCESTATE_FIELD_NUMBER; + hash = (53 * hash) + getLiveAudienceState().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebGiftFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebGiftFeed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + getLiveAudienceStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + time_ = 0L; + intGiftId_ = 0; + sortRank_ = 0L; + mergeKey_ = ""; + batchSize_ = 0; + comboCount_ = 0; + rank_ = 0; + expireDuration_ = 0L; + clientTimestamp_ = 0L; + slotDisplayDuration_ = 0L; + starLevel_ = 0; + styleType_ = 0; + liveAssistantType_ = 0; + deviceHash_ = ""; + danmakuDisplay_ = false; + liveAudienceState_ = null; + if (liveAudienceStateBuilder_ != null) { + liveAudienceStateBuilder_.dispose(); + liveAudienceStateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.intGiftId_ = intGiftId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.mergeKey_ = mergeKey_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.batchSize_ = batchSize_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.comboCount_ = comboCount_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.rank_ = rank_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.expireDuration_ = expireDuration_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.clientTimestamp_ = clientTimestamp_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.slotDisplayDuration_ = slotDisplayDuration_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.starLevel_ = starLevel_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.styleType_ = styleType_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.liveAssistantType_ = liveAssistantType_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.deviceHash_ = deviceHash_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.danmakuDisplay_ = danmakuDisplay_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.liveAudienceState_ = liveAudienceStateBuilder_ == null + ? liveAudienceState_ + : liveAudienceStateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.getIntGiftId() != 0) { + setIntGiftId(other.getIntGiftId()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (!other.getMergeKey().isEmpty()) { + mergeKey_ = other.mergeKey_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + if (other.getComboCount() != 0) { + setComboCount(other.getComboCount()); + } + if (other.getRank() != 0) { + setRank(other.getRank()); + } + if (other.getExpireDuration() != 0L) { + setExpireDuration(other.getExpireDuration()); + } + if (other.getClientTimestamp() != 0L) { + setClientTimestamp(other.getClientTimestamp()); + } + if (other.getSlotDisplayDuration() != 0L) { + setSlotDisplayDuration(other.getSlotDisplayDuration()); + } + if (other.getStarLevel() != 0) { + setStarLevel(other.getStarLevel()); + } + if (other.styleType_ != 0) { + setStyleTypeValue(other.getStyleTypeValue()); + } + if (other.liveAssistantType_ != 0) { + setLiveAssistantTypeValue(other.getLiveAssistantTypeValue()); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.getDanmakuDisplay() != false) { + setDanmakuDisplay(other.getDanmakuDisplay()); + } + if (other.hasLiveAudienceState()) { + mergeLiveAudienceState(other.getLiveAudienceState()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + intGiftId_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + mergeKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + batchSize_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + comboCount_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + rank_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + expireDuration_ = input.readUInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + clientTimestamp_ = input.readUInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + slotDisplayDuration_ = input.readUInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + starLevel_ = input.readUInt32(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 112: { + styleType_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 112 + case 120: { + liveAssistantType_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 130: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 136: { + danmakuDisplay_ = input.readBool(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 146: { + input.readMessage( + getLiveAudienceStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + 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; + * @return The bytes for id. + */ + 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; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * .SimpleUserInfo user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long time_ ; + /** + * uint64 time = 3; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 3; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 time = 3; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000004); + time_ = 0L; + onChanged(); + return this; + } + + private int intGiftId_ ; + /** + * uint32 intGiftId = 4; + * @return The intGiftId. + */ + @java.lang.Override + public int getIntGiftId() { + return intGiftId_; + } + /** + * uint32 intGiftId = 4; + * @param value The intGiftId to set. + * @return This builder for chaining. + */ + public Builder setIntGiftId(int value) { + + intGiftId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 intGiftId = 4; + * @return This builder for chaining. + */ + public Builder clearIntGiftId() { + bitField0_ = (bitField0_ & ~0x00000008); + intGiftId_ = 0; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * uint64 sortRank = 5; + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 sortRank = 5; + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000010); + sortRank_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object mergeKey_ = ""; + /** + * string mergeKey = 6; + * @return The mergeKey. + */ + public java.lang.String getMergeKey() { + java.lang.Object ref = mergeKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergeKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string mergeKey = 6; + * @return The bytes for mergeKey. + */ + public com.google.protobuf.ByteString + getMergeKeyBytes() { + java.lang.Object ref = mergeKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mergeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string mergeKey = 6; + * @param value The mergeKey to set. + * @return This builder for chaining. + */ + public Builder setMergeKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + mergeKey_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string mergeKey = 6; + * @return This builder for chaining. + */ + public Builder clearMergeKey() { + mergeKey_ = getDefaultInstance().getMergeKey(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string mergeKey = 6; + * @param value The bytes for mergeKey to set. + * @return This builder for chaining. + */ + public Builder setMergeKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + mergeKey_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int batchSize_ ; + /** + * uint32 batchSize = 7; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + * uint32 batchSize = 7; + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * uint32 batchSize = 7; + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000040); + batchSize_ = 0; + onChanged(); + return this; + } + + private int comboCount_ ; + /** + * uint32 comboCount = 8; + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + /** + * uint32 comboCount = 8; + * @param value The comboCount to set. + * @return This builder for chaining. + */ + public Builder setComboCount(int value) { + + comboCount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * uint32 comboCount = 8; + * @return This builder for chaining. + */ + public Builder clearComboCount() { + bitField0_ = (bitField0_ & ~0x00000080); + comboCount_ = 0; + onChanged(); + return this; + } + + private int rank_ ; + /** + * uint32 rank = 9; + * @return The rank. + */ + @java.lang.Override + public int getRank() { + return rank_; + } + /** + * uint32 rank = 9; + * @param value The rank to set. + * @return This builder for chaining. + */ + public Builder setRank(int value) { + + rank_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * uint32 rank = 9; + * @return This builder for chaining. + */ + public Builder clearRank() { + bitField0_ = (bitField0_ & ~0x00000100); + rank_ = 0; + onChanged(); + return this; + } + + private long expireDuration_ ; + /** + * uint64 expireDuration = 10; + * @return The expireDuration. + */ + @java.lang.Override + public long getExpireDuration() { + return expireDuration_; + } + /** + * uint64 expireDuration = 10; + * @param value The expireDuration to set. + * @return This builder for chaining. + */ + public Builder setExpireDuration(long value) { + + expireDuration_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * uint64 expireDuration = 10; + * @return This builder for chaining. + */ + public Builder clearExpireDuration() { + bitField0_ = (bitField0_ & ~0x00000200); + expireDuration_ = 0L; + onChanged(); + return this; + } + + private long clientTimestamp_ ; + /** + * uint64 clientTimestamp = 11; + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + /** + * uint64 clientTimestamp = 11; + * @param value The clientTimestamp to set. + * @return This builder for chaining. + */ + public Builder setClientTimestamp(long value) { + + clientTimestamp_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * uint64 clientTimestamp = 11; + * @return This builder for chaining. + */ + public Builder clearClientTimestamp() { + bitField0_ = (bitField0_ & ~0x00000400); + clientTimestamp_ = 0L; + onChanged(); + return this; + } + + private long slotDisplayDuration_ ; + /** + * uint64 slotDisplayDuration = 12; + * @return The slotDisplayDuration. + */ + @java.lang.Override + public long getSlotDisplayDuration() { + return slotDisplayDuration_; + } + /** + * uint64 slotDisplayDuration = 12; + * @param value The slotDisplayDuration to set. + * @return This builder for chaining. + */ + public Builder setSlotDisplayDuration(long value) { + + slotDisplayDuration_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * uint64 slotDisplayDuration = 12; + * @return This builder for chaining. + */ + public Builder clearSlotDisplayDuration() { + bitField0_ = (bitField0_ & ~0x00000800); + slotDisplayDuration_ = 0L; + onChanged(); + return this; + } + + private int starLevel_ ; + /** + * uint32 starLevel = 13; + * @return The starLevel. + */ + @java.lang.Override + public int getStarLevel() { + return starLevel_; + } + /** + * uint32 starLevel = 13; + * @param value The starLevel to set. + * @return This builder for chaining. + */ + public Builder setStarLevel(int value) { + + starLevel_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * uint32 starLevel = 13; + * @return This builder for chaining. + */ + public Builder clearStarLevel() { + bitField0_ = (bitField0_ & ~0x00001000); + starLevel_ = 0; + onChanged(); + return this; + } + + private int styleType_ = 0; + /** + * .WebGiftFeed.StyleType styleType = 14; + * @return The enum numeric value on the wire for styleType. + */ + @java.lang.Override public int getStyleTypeValue() { + return styleType_; + } + /** + * .WebGiftFeed.StyleType styleType = 14; + * @param value The enum numeric value on the wire for styleType to set. + * @return This builder for chaining. + */ + public Builder setStyleTypeValue(int value) { + styleType_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * .WebGiftFeed.StyleType styleType = 14; + * @return The styleType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType getStyleType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.forNumber(styleType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNRECOGNIZED : result; + } + /** + * .WebGiftFeed.StyleType styleType = 14; + * @param value The styleType to set. + * @return This builder for chaining. + */ + public Builder setStyleType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + styleType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebGiftFeed.StyleType styleType = 14; + * @return This builder for chaining. + */ + public Builder clearStyleType() { + bitField0_ = (bitField0_ & ~0x00002000); + styleType_ = 0; + onChanged(); + return this; + } + + private int liveAssistantType_ = 0; + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @param value The enum numeric value on the wire for liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantTypeValue(int value) { + liveAssistantType_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @return The liveAssistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @param value The liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + liveAssistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebLiveAssistantType liveAssistantType = 15; + * @return This builder for chaining. + */ + public Builder clearLiveAssistantType() { + bitField0_ = (bitField0_ & ~0x00004000); + liveAssistantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 16; + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string deviceHash = 16; + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string deviceHash = 16; + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * string deviceHash = 16; + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * string deviceHash = 16; + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private boolean danmakuDisplay_ ; + /** + * bool danmakuDisplay = 17; + * @return The danmakuDisplay. + */ + @java.lang.Override + public boolean getDanmakuDisplay() { + return danmakuDisplay_; + } + /** + * bool danmakuDisplay = 17; + * @param value The danmakuDisplay to set. + * @return This builder for chaining. + */ + public Builder setDanmakuDisplay(boolean value) { + + danmakuDisplay_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * bool danmakuDisplay = 17; + * @return This builder for chaining. + */ + public Builder clearDanmakuDisplay() { + bitField0_ = (bitField0_ & ~0x00010000); + danmakuDisplay_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState liveAudienceState_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> liveAudienceStateBuilder_; + /** + * .LiveAudienceState liveAudienceState = 18; + * @return Whether the liveAudienceState field is set. + */ + public boolean hasLiveAudienceState() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * .LiveAudienceState liveAudienceState = 18; + * @return The liveAudienceState. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getLiveAudienceState() { + if (liveAudienceStateBuilder_ == null) { + return liveAudienceState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } else { + return liveAudienceStateBuilder_.getMessage(); + } + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + public Builder setLiveAudienceState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (liveAudienceStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + liveAudienceState_ = value; + } else { + liveAudienceStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + public Builder setLiveAudienceState( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder builderForValue) { + if (liveAudienceStateBuilder_ == null) { + liveAudienceState_ = builderForValue.build(); + } else { + liveAudienceStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + public Builder mergeLiveAudienceState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (liveAudienceStateBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + liveAudienceState_ != null && + liveAudienceState_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance()) { + getLiveAudienceStateBuilder().mergeFrom(value); + } else { + liveAudienceState_ = value; + } + } else { + liveAudienceStateBuilder_.mergeFrom(value); + } + if (liveAudienceState_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + public Builder clearLiveAudienceState() { + bitField0_ = (bitField0_ & ~0x00020000); + liveAudienceState_ = null; + if (liveAudienceStateBuilder_ != null) { + liveAudienceStateBuilder_.dispose(); + liveAudienceStateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder getLiveAudienceStateBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getLiveAudienceStateFieldBuilder().getBuilder(); + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getLiveAudienceStateOrBuilder() { + if (liveAudienceStateBuilder_ != null) { + return liveAudienceStateBuilder_.getMessageOrBuilder(); + } else { + return liveAudienceState_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } + } + /** + * .LiveAudienceState liveAudienceState = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> + getLiveAudienceStateFieldBuilder() { + if (liveAudienceStateBuilder_ == null) { + liveAudienceStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder>( + getLiveAudienceState(), + getParentForChildren(), + isClean()); + liveAudienceState_ = null; + } + return liveAudienceStateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebGiftFeed) + } + + // @@protoc_insertion_point(class_scope:WebGiftFeed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebGiftFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebGiftFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebGiftFeed_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\021WebGiftFeed.proto\032\024SimpleUserInfo.prot" + + "o\032\032WebLiveAssistantType.proto\032\027LiveAudie" + + "nceState.proto\"\352\004\n\013WebGiftFeed\022\n\n\002id\030\001 \001" + + "(\t\022\035\n\004user\030\002 \001(\0132\017.SimpleUserInfo\022\014\n\004tim" + + "e\030\003 \001(\004\022\021\n\tintGiftId\030\004 \001(\r\022\020\n\010sortRank\030\005" + + " \001(\004\022\020\n\010mergeKey\030\006 \001(\t\022\021\n\tbatchSize\030\007 \001(" + + "\r\022\022\n\ncomboCount\030\010 \001(\r\022\014\n\004rank\030\t \001(\r\022\026\n\016e" + + "xpireDuration\030\n \001(\004\022\027\n\017clientTimestamp\030\013" + + " \001(\004\022\033\n\023slotDisplayDuration\030\014 \001(\004\022\021\n\tsta" + + "rLevel\030\r \001(\r\022)\n\tstyleType\030\016 \001(\0162\026.WebGif" + + "tFeed.StyleType\0220\n\021liveAssistantType\030\017 \001" + + "(\0162\025.WebLiveAssistantType\022\022\n\ndeviceHash\030" + + "\020 \001(\t\022\026\n\016danmakuDisplay\030\021 \001(\010\022-\n\021liveAud" + + "ienceState\030\022 \001(\0132\022.LiveAudienceState\"\234\001\n" + + "\tStyleType\022\021\n\rUNKNOWN_STYLE\020\000\022\020\n\014BATCH_S" + + "TAR_0\020\001\022\020\n\014BATCH_STAR_1\020\002\022\020\n\014BATCH_STAR_" + + "2\020\003\022\020\n\014BATCH_STAR_3\020\004\022\020\n\014BATCH_STAR_4\020\005\022" + + "\020\n\014BATCH_STAR_5\020\006\022\020\n\014BATCH_STAR_6\020\007B<\n:t" + + "ech.ordinaryroad.live.chat.client.codec." + + "kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(), + }); + internal_static_WebGiftFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebGiftFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebGiftFeed_descriptor, + new java.lang.String[] { "Id", "User", "Time", "IntGiftId", "SortRank", "MergeKey", "BatchSize", "ComboCount", "Rank", "ExpireDuration", "ClientTimestamp", "SlotDisplayDuration", "StarLevel", "StyleType", "LiveAssistantType", "DeviceHash", "DanmakuDisplay", "LiveAudienceState", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebLikeFeedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebLikeFeedOuterClass.java new file mode 100644 index 0000000..f5ec287 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebLikeFeedOuterClass.java @@ -0,0 +1,1262 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebLikeFeed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebLikeFeedOuterClass { + private WebLikeFeedOuterClass() {} + 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 WebLikeFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebLikeFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * .SimpleUserInfo user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * uint64 sortRank = 3; + * @return The sortRank. + */ + long getSortRank(); + + /** + * string deviceHash = 4; + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * string deviceHash = 4; + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + + /** + * .LiveAudienceState liveAudienceState = 5; + * @return Whether the liveAudienceState field is set. + */ + boolean hasLiveAudienceState(); + /** + * .LiveAudienceState liveAudienceState = 5; + * @return The liveAudienceState. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getLiveAudienceState(); + /** + * .LiveAudienceState liveAudienceState = 5; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getLiveAudienceStateOrBuilder(); + } + /** + * Protobuf type {@code WebLikeFeed} + */ + public static final class WebLikeFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebLikeFeed) + WebLikeFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebLikeFeed.newBuilder() to construct. + private WebLikeFeed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebLikeFeed() { + id_ = ""; + deviceHash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebLikeFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + 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; + * @return The bytes for id. + */ + @java.lang.Override + 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 USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * .SimpleUserInfo user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int SORTRANK_FIELD_NUMBER = 3; + private long sortRank_ = 0L; + /** + * uint64 sortRank = 3; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int DEVICEHASH_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 4; + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * string deviceHash = 4; + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIVEAUDIENCESTATE_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState liveAudienceState_; + /** + * .LiveAudienceState liveAudienceState = 5; + * @return Whether the liveAudienceState field is set. + */ + @java.lang.Override + public boolean hasLiveAudienceState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .LiveAudienceState liveAudienceState = 5; + * @return The liveAudienceState. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getLiveAudienceState() { + return liveAudienceState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getLiveAudienceStateOrBuilder() { + return liveAudienceState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUser()); + } + if (sortRank_ != 0L) { + output.writeUInt64(3, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deviceHash_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getLiveAudienceState()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, deviceHash_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLiveAudienceState()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getSortRank() + != other.getSortRank()) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (hasLiveAudienceState() != other.hasLiveAudienceState()) return false; + if (hasLiveAudienceState()) { + if (!getLiveAudienceState() + .equals(other.getLiveAudienceState())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + if (hasLiveAudienceState()) { + hash = (37 * hash) + LIVEAUDIENCESTATE_FIELD_NUMBER; + hash = (53 * hash) + getLiveAudienceState().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebLikeFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebLikeFeed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + getLiveAudienceStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + sortRank_ = 0L; + deviceHash_ = ""; + liveAudienceState_ = null; + if (liveAudienceStateBuilder_ != null) { + liveAudienceStateBuilder_.dispose(); + liveAudienceStateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deviceHash_ = deviceHash_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.liveAudienceState_ = liveAudienceStateBuilder_ == null + ? liveAudienceState_ + : liveAudienceStateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasLiveAudienceState()) { + mergeLiveAudienceState(other.getLiveAudienceState()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getLiveAudienceStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + 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; + * @return The bytes for id. + */ + 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; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * .SimpleUserInfo user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long sortRank_ ; + /** + * uint64 sortRank = 3; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * uint64 sortRank = 3; + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 sortRank = 3; + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000004); + sortRank_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 4; + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string deviceHash = 4; + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string deviceHash = 4; + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string deviceHash = 4; + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string deviceHash = 4; + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState liveAudienceState_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> liveAudienceStateBuilder_; + /** + * .LiveAudienceState liveAudienceState = 5; + * @return Whether the liveAudienceState field is set. + */ + public boolean hasLiveAudienceState() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .LiveAudienceState liveAudienceState = 5; + * @return The liveAudienceState. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getLiveAudienceState() { + if (liveAudienceStateBuilder_ == null) { + return liveAudienceState_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } else { + return liveAudienceStateBuilder_.getMessage(); + } + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + public Builder setLiveAudienceState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (liveAudienceStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + liveAudienceState_ = value; + } else { + liveAudienceStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + public Builder setLiveAudienceState( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder builderForValue) { + if (liveAudienceStateBuilder_ == null) { + liveAudienceState_ = builderForValue.build(); + } else { + liveAudienceStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + public Builder mergeLiveAudienceState(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (liveAudienceStateBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + liveAudienceState_ != null && + liveAudienceState_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance()) { + getLiveAudienceStateBuilder().mergeFrom(value); + } else { + liveAudienceState_ = value; + } + } else { + liveAudienceStateBuilder_.mergeFrom(value); + } + if (liveAudienceState_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + public Builder clearLiveAudienceState() { + bitField0_ = (bitField0_ & ~0x00000010); + liveAudienceState_ = null; + if (liveAudienceStateBuilder_ != null) { + liveAudienceStateBuilder_.dispose(); + liveAudienceStateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder getLiveAudienceStateBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLiveAudienceStateFieldBuilder().getBuilder(); + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getLiveAudienceStateOrBuilder() { + if (liveAudienceStateBuilder_ != null) { + return liveAudienceStateBuilder_.getMessageOrBuilder(); + } else { + return liveAudienceState_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : liveAudienceState_; + } + } + /** + * .LiveAudienceState liveAudienceState = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> + getLiveAudienceStateFieldBuilder() { + if (liveAudienceStateBuilder_ == null) { + liveAudienceStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder>( + getLiveAudienceState(), + getParentForChildren(), + isClean()); + liveAudienceState_ = null; + } + return liveAudienceStateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebLikeFeed) + } + + // @@protoc_insertion_point(class_scope:WebLikeFeed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebLikeFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebLikeFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebLikeFeed_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\021WebLikeFeed.proto\032\024SimpleUserInfo.prot" + + "o\032\027LiveAudienceState.proto\"\215\001\n\013WebLikeFe" + + "ed\022\n\n\002id\030\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.SimpleUse" + + "rInfo\022\020\n\010sortRank\030\003 \001(\004\022\022\n\ndeviceHash\030\004 " + + "\001(\t\022-\n\021liveAudienceState\030\005 \001(\0132\022.LiveAud" + + "ienceStateB<\n:tech.ordinaryroad.live.cha" + + "t.client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(), + }); + internal_static_WebLikeFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebLikeFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebLikeFeed_descriptor, + new java.lang.String[] { "Id", "User", "SortRank", "DeviceHash", "LiveAudienceState", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebLiveAssistantTypeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebLiveAssistantTypeOuterClass.java new file mode 100644 index 0000000..ccf4a33 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebLiveAssistantTypeOuterClass.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebLiveAssistantType.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebLiveAssistantTypeOuterClass { + private WebLiveAssistantTypeOuterClass() {} + 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 WebLiveAssistantType} + */ + public enum WebLiveAssistantType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_ASSISTANT_TYPE = 0; + */ + UNKNOWN_ASSISTANT_TYPE(0), + /** + * SUPER = 1; + */ + SUPER(1), + /** + * JUNIOR = 2; + */ + JUNIOR(2), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_ASSISTANT_TYPE = 0; + */ + public static final int UNKNOWN_ASSISTANT_TYPE_VALUE = 0; + /** + * SUPER = 1; + */ + public static final int SUPER_VALUE = 1; + /** + * JUNIOR = 2; + */ + public static final int JUNIOR_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebLiveAssistantType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebLiveAssistantType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_ASSISTANT_TYPE; + case 1: return SUPER; + case 2: return JUNIOR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebLiveAssistantType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WebLiveAssistantType findValueByNumber(int number) { + return WebLiveAssistantType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebLiveAssistantType[] VALUES = values(); + + public static WebLiveAssistantType 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 WebLiveAssistantType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebLiveAssistantType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032WebLiveAssistantType.proto*I\n\024WebLiveA" + + "ssistantType\022\032\n\026UNKNOWN_ASSISTANT_TYPE\020\000" + + "\022\t\n\005SUPER\020\001\022\n\n\006JUNIOR\020\002B<\n:tech.ordinary" + + "road.live.chat.client.codec.kuaishou.pro" + + "tobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebPauseTypeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebPauseTypeOuterClass.java new file mode 100644 index 0000000..ecb504f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebPauseTypeOuterClass.java @@ -0,0 +1,180 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebPauseType.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebPauseTypeOuterClass { + private WebPauseTypeOuterClass() {} + 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 WebPauseType} + */ + public enum WebPauseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_PAUSE_TYPE = 0; + */ + UNKNOWN_PAUSE_TYPE(0), + /** + * TELEPHONE = 1; + */ + TELEPHONE(1), + /** + * SHARE = 2; + */ + SHARE(2), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_PAUSE_TYPE = 0; + */ + public static final int UNKNOWN_PAUSE_TYPE_VALUE = 0; + /** + * TELEPHONE = 1; + */ + public static final int TELEPHONE_VALUE = 1; + /** + * SHARE = 2; + */ + public static final int SHARE_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebPauseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebPauseType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_PAUSE_TYPE; + case 1: return TELEPHONE; + case 2: return SHARE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebPauseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WebPauseType findValueByNumber(int number) { + return WebPauseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebPauseTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebPauseType[] VALUES = values(); + + public static WebPauseType 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 WebPauseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebPauseType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\022WebPauseType.proto*@\n\014WebPauseType\022\026\n\022" + + "UNKNOWN_PAUSE_TYPE\020\000\022\r\n\tTELEPHONE\020\001\022\t\n\005S" + + "HARE\020\002B<\n:tech.ordinaryroad.live.chat.cl" + + "ient.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebRedPackCoverTypeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebRedPackCoverTypeOuterClass.java new file mode 100644 index 0000000..99ab1ab --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebRedPackCoverTypeOuterClass.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebRedPackCoverType.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebRedPackCoverTypeOuterClass { + private WebRedPackCoverTypeOuterClass() {} + 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 WebRedPackCoverType} + */ + public enum WebRedPackCoverType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_COVER_TYPE = 0; + */ + UNKNOWN_COVER_TYPE(0), + /** + * NORMAL_COVER = 1; + */ + NORMAL_COVER(1), + /** + * PRETTY_COVER = 2; + */ + PRETTY_COVER(2), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_COVER_TYPE = 0; + */ + public static final int UNKNOWN_COVER_TYPE_VALUE = 0; + /** + * NORMAL_COVER = 1; + */ + public static final int NORMAL_COVER_VALUE = 1; + /** + * PRETTY_COVER = 2; + */ + public static final int PRETTY_COVER_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebRedPackCoverType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebRedPackCoverType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_COVER_TYPE; + case 1: return NORMAL_COVER; + case 2: return PRETTY_COVER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebRedPackCoverType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WebRedPackCoverType findValueByNumber(int number) { + return WebRedPackCoverType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebRedPackCoverType[] VALUES = values(); + + public static WebRedPackCoverType 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 WebRedPackCoverType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebRedPackCoverType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031WebRedPackCoverType.proto*Q\n\023WebRedPac" + + "kCoverType\022\026\n\022UNKNOWN_COVER_TYPE\020\000\022\020\n\014NO" + + "RMAL_COVER\020\001\022\020\n\014PRETTY_COVER\020\002B<\n:tech.o" + + "rdinaryroad.live.chat.client.codec.kuais" + + "hou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebRedPackInfoOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebRedPackInfoOuterClass.java new file mode 100644 index 0000000..9d73435 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebRedPackInfoOuterClass.java @@ -0,0 +1,1536 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebRedPackInfo.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebRedPackInfoOuterClass { + private WebRedPackInfoOuterClass() {} + 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 WebRedPackInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebRedPackInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .SimpleUserInfo author = 2; + * @return Whether the author field is set. + */ + boolean hasAuthor(); + /** + * .SimpleUserInfo author = 2; + * @return The author. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getAuthor(); + /** + * .SimpleUserInfo author = 2; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getAuthorOrBuilder(); + + /** + * uint64 balance = 3; + * @return The balance. + */ + long getBalance(); + + /** + * uint64 openTime = 4; + * @return The openTime. + */ + long getOpenTime(); + + /** + * uint64 currentTime = 5; + * @return The currentTime. + */ + long getCurrentTime(); + + /** + * string grabToken = 6; + * @return The grabToken. + */ + java.lang.String getGrabToken(); + /** + * string grabToken = 6; + * @return The bytes for grabToken. + */ + com.google.protobuf.ByteString + getGrabTokenBytes(); + + /** + * bool needSendRequest = 7; + * @return The needSendRequest. + */ + boolean getNeedSendRequest(); + + /** + * uint64 requestDelayMillis = 8; + * @return The requestDelayMillis. + */ + long getRequestDelayMillis(); + + /** + * uint64 luckiestDelayMillis = 9; + * @return The luckiestDelayMillis. + */ + long getLuckiestDelayMillis(); + + /** + * .WebRedPackCoverType coverType = 10; + * @return The enum numeric value on the wire for coverType. + */ + int getCoverTypeValue(); + /** + * .WebRedPackCoverType coverType = 10; + * @return The coverType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType getCoverType(); + } + /** + * Protobuf type {@code WebRedPackInfo} + */ + public static final class WebRedPackInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebRedPackInfo) + WebRedPackInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebRedPackInfo.newBuilder() to construct. + private WebRedPackInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebRedPackInfo() { + id_ = ""; + grabToken_ = ""; + coverType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebRedPackInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + 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; + * @return The bytes for id. + */ + @java.lang.Override + 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 AUTHOR_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo author_; + /** + * .SimpleUserInfo author = 2; + * @return Whether the author field is set. + */ + @java.lang.Override + public boolean hasAuthor() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo author = 2; + * @return The author. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getAuthor() { + return author_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } + /** + * .SimpleUserInfo author = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getAuthorOrBuilder() { + return author_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } + + public static final int BALANCE_FIELD_NUMBER = 3; + private long balance_ = 0L; + /** + * uint64 balance = 3; + * @return The balance. + */ + @java.lang.Override + public long getBalance() { + return balance_; + } + + public static final int OPENTIME_FIELD_NUMBER = 4; + private long openTime_ = 0L; + /** + * uint64 openTime = 4; + * @return The openTime. + */ + @java.lang.Override + public long getOpenTime() { + return openTime_; + } + + public static final int CURRENTTIME_FIELD_NUMBER = 5; + private long currentTime_ = 0L; + /** + * uint64 currentTime = 5; + * @return The currentTime. + */ + @java.lang.Override + public long getCurrentTime() { + return currentTime_; + } + + public static final int GRABTOKEN_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object grabToken_ = ""; + /** + * string grabToken = 6; + * @return The grabToken. + */ + @java.lang.Override + public java.lang.String getGrabToken() { + java.lang.Object ref = grabToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + grabToken_ = s; + return s; + } + } + /** + * string grabToken = 6; + * @return The bytes for grabToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGrabTokenBytes() { + java.lang.Object ref = grabToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + grabToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEEDSENDREQUEST_FIELD_NUMBER = 7; + private boolean needSendRequest_ = false; + /** + * bool needSendRequest = 7; + * @return The needSendRequest. + */ + @java.lang.Override + public boolean getNeedSendRequest() { + return needSendRequest_; + } + + public static final int REQUESTDELAYMILLIS_FIELD_NUMBER = 8; + private long requestDelayMillis_ = 0L; + /** + * uint64 requestDelayMillis = 8; + * @return The requestDelayMillis. + */ + @java.lang.Override + public long getRequestDelayMillis() { + return requestDelayMillis_; + } + + public static final int LUCKIESTDELAYMILLIS_FIELD_NUMBER = 9; + private long luckiestDelayMillis_ = 0L; + /** + * uint64 luckiestDelayMillis = 9; + * @return The luckiestDelayMillis. + */ + @java.lang.Override + public long getLuckiestDelayMillis() { + return luckiestDelayMillis_; + } + + public static final int COVERTYPE_FIELD_NUMBER = 10; + private int coverType_ = 0; + /** + * .WebRedPackCoverType coverType = 10; + * @return The enum numeric value on the wire for coverType. + */ + @java.lang.Override public int getCoverTypeValue() { + return coverType_; + } + /** + * .WebRedPackCoverType coverType = 10; + * @return The coverType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType getCoverType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.forNumber(coverType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAuthor()); + } + if (balance_ != 0L) { + output.writeUInt64(3, balance_); + } + if (openTime_ != 0L) { + output.writeUInt64(4, openTime_); + } + if (currentTime_ != 0L) { + output.writeUInt64(5, currentTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(grabToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, grabToken_); + } + if (needSendRequest_ != false) { + output.writeBool(7, needSendRequest_); + } + if (requestDelayMillis_ != 0L) { + output.writeUInt64(8, requestDelayMillis_); + } + if (luckiestDelayMillis_ != 0L) { + output.writeUInt64(9, luckiestDelayMillis_); + } + if (coverType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNKNOWN_COVER_TYPE.getNumber()) { + output.writeEnum(10, coverType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAuthor()); + } + if (balance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, balance_); + } + if (openTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, openTime_); + } + if (currentTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, currentTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(grabToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, grabToken_); + } + if (needSendRequest_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, needSendRequest_); + } + if (requestDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(8, requestDelayMillis_); + } + if (luckiestDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(9, luckiestDelayMillis_); + } + if (coverType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNKNOWN_COVER_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, coverType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasAuthor() != other.hasAuthor()) return false; + if (hasAuthor()) { + if (!getAuthor() + .equals(other.getAuthor())) return false; + } + if (getBalance() + != other.getBalance()) return false; + if (getOpenTime() + != other.getOpenTime()) return false; + if (getCurrentTime() + != other.getCurrentTime()) return false; + if (!getGrabToken() + .equals(other.getGrabToken())) return false; + if (getNeedSendRequest() + != other.getNeedSendRequest()) return false; + if (getRequestDelayMillis() + != other.getRequestDelayMillis()) return false; + if (getLuckiestDelayMillis() + != other.getLuckiestDelayMillis()) return false; + if (coverType_ != other.coverType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + if (hasAuthor()) { + hash = (37 * hash) + AUTHOR_FIELD_NUMBER; + hash = (53 * hash) + getAuthor().hashCode(); + } + hash = (37 * hash) + BALANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBalance()); + hash = (37 * hash) + OPENTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpenTime()); + hash = (37 * hash) + CURRENTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCurrentTime()); + hash = (37 * hash) + GRABTOKEN_FIELD_NUMBER; + hash = (53 * hash) + getGrabToken().hashCode(); + hash = (37 * hash) + NEEDSENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedSendRequest()); + hash = (37 * hash) + REQUESTDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRequestDelayMillis()); + hash = (37 * hash) + LUCKIESTDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLuckiestDelayMillis()); + hash = (37 * hash) + COVERTYPE_FIELD_NUMBER; + hash = (53 * hash) + coverType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebRedPackInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebRedPackInfo) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAuthorFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + author_ = null; + if (authorBuilder_ != null) { + authorBuilder_.dispose(); + authorBuilder_ = null; + } + balance_ = 0L; + openTime_ = 0L; + currentTime_ = 0L; + grabToken_ = ""; + needSendRequest_ = false; + requestDelayMillis_ = 0L; + luckiestDelayMillis_ = 0L; + coverType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.author_ = authorBuilder_ == null + ? author_ + : authorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.balance_ = balance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.openTime_ = openTime_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.currentTime_ = currentTime_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.grabToken_ = grabToken_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.needSendRequest_ = needSendRequest_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.requestDelayMillis_ = requestDelayMillis_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.luckiestDelayMillis_ = luckiestDelayMillis_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.coverType_ = coverType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAuthor()) { + mergeAuthor(other.getAuthor()); + } + if (other.getBalance() != 0L) { + setBalance(other.getBalance()); + } + if (other.getOpenTime() != 0L) { + setOpenTime(other.getOpenTime()); + } + if (other.getCurrentTime() != 0L) { + setCurrentTime(other.getCurrentTime()); + } + if (!other.getGrabToken().isEmpty()) { + grabToken_ = other.grabToken_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getNeedSendRequest() != false) { + setNeedSendRequest(other.getNeedSendRequest()); + } + if (other.getRequestDelayMillis() != 0L) { + setRequestDelayMillis(other.getRequestDelayMillis()); + } + if (other.getLuckiestDelayMillis() != 0L) { + setLuckiestDelayMillis(other.getLuckiestDelayMillis()); + } + if (other.coverType_ != 0) { + setCoverTypeValue(other.getCoverTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getAuthorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + balance_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + openTime_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + currentTime_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + grabToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + needSendRequest_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + requestDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + luckiestDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + coverType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + 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; + * @return The bytes for id. + */ + 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; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo author_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> authorBuilder_; + /** + * .SimpleUserInfo author = 2; + * @return Whether the author field is set. + */ + public boolean hasAuthor() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .SimpleUserInfo author = 2; + * @return The author. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getAuthor() { + if (authorBuilder_ == null) { + return author_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } else { + return authorBuilder_.getMessage(); + } + } + /** + * .SimpleUserInfo author = 2; + */ + public Builder setAuthor(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (authorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + author_ = value; + } else { + authorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo author = 2; + */ + public Builder setAuthor( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (authorBuilder_ == null) { + author_ = builderForValue.build(); + } else { + authorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo author = 2; + */ + public Builder mergeAuthor(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (authorBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + author_ != null && + author_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getAuthorBuilder().mergeFrom(value); + } else { + author_ = value; + } + } else { + authorBuilder_.mergeFrom(value); + } + if (author_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .SimpleUserInfo author = 2; + */ + public Builder clearAuthor() { + bitField0_ = (bitField0_ & ~0x00000002); + author_ = null; + if (authorBuilder_ != null) { + authorBuilder_.dispose(); + authorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SimpleUserInfo author = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getAuthorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAuthorFieldBuilder().getBuilder(); + } + /** + * .SimpleUserInfo author = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getAuthorOrBuilder() { + if (authorBuilder_ != null) { + return authorBuilder_.getMessageOrBuilder(); + } else { + return author_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } + } + /** + * .SimpleUserInfo author = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getAuthorFieldBuilder() { + if (authorBuilder_ == null) { + authorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getAuthor(), + getParentForChildren(), + isClean()); + author_ = null; + } + return authorBuilder_; + } + + private long balance_ ; + /** + * uint64 balance = 3; + * @return The balance. + */ + @java.lang.Override + public long getBalance() { + return balance_; + } + /** + * uint64 balance = 3; + * @param value The balance to set. + * @return This builder for chaining. + */ + public Builder setBalance(long value) { + + balance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 balance = 3; + * @return This builder for chaining. + */ + public Builder clearBalance() { + bitField0_ = (bitField0_ & ~0x00000004); + balance_ = 0L; + onChanged(); + return this; + } + + private long openTime_ ; + /** + * uint64 openTime = 4; + * @return The openTime. + */ + @java.lang.Override + public long getOpenTime() { + return openTime_; + } + /** + * uint64 openTime = 4; + * @param value The openTime to set. + * @return This builder for chaining. + */ + public Builder setOpenTime(long value) { + + openTime_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 openTime = 4; + * @return This builder for chaining. + */ + public Builder clearOpenTime() { + bitField0_ = (bitField0_ & ~0x00000008); + openTime_ = 0L; + onChanged(); + return this; + } + + private long currentTime_ ; + /** + * uint64 currentTime = 5; + * @return The currentTime. + */ + @java.lang.Override + public long getCurrentTime() { + return currentTime_; + } + /** + * uint64 currentTime = 5; + * @param value The currentTime to set. + * @return This builder for chaining. + */ + public Builder setCurrentTime(long value) { + + currentTime_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 currentTime = 5; + * @return This builder for chaining. + */ + public Builder clearCurrentTime() { + bitField0_ = (bitField0_ & ~0x00000010); + currentTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object grabToken_ = ""; + /** + * string grabToken = 6; + * @return The grabToken. + */ + public java.lang.String getGrabToken() { + java.lang.Object ref = grabToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + grabToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string grabToken = 6; + * @return The bytes for grabToken. + */ + public com.google.protobuf.ByteString + getGrabTokenBytes() { + java.lang.Object ref = grabToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + grabToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string grabToken = 6; + * @param value The grabToken to set. + * @return This builder for chaining. + */ + public Builder setGrabToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + grabToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * string grabToken = 6; + * @return This builder for chaining. + */ + public Builder clearGrabToken() { + grabToken_ = getDefaultInstance().getGrabToken(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * string grabToken = 6; + * @param value The bytes for grabToken to set. + * @return This builder for chaining. + */ + public Builder setGrabTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + grabToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean needSendRequest_ ; + /** + * bool needSendRequest = 7; + * @return The needSendRequest. + */ + @java.lang.Override + public boolean getNeedSendRequest() { + return needSendRequest_; + } + /** + * bool needSendRequest = 7; + * @param value The needSendRequest to set. + * @return This builder for chaining. + */ + public Builder setNeedSendRequest(boolean value) { + + needSendRequest_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * bool needSendRequest = 7; + * @return This builder for chaining. + */ + public Builder clearNeedSendRequest() { + bitField0_ = (bitField0_ & ~0x00000040); + needSendRequest_ = false; + onChanged(); + return this; + } + + private long requestDelayMillis_ ; + /** + * uint64 requestDelayMillis = 8; + * @return The requestDelayMillis. + */ + @java.lang.Override + public long getRequestDelayMillis() { + return requestDelayMillis_; + } + /** + * uint64 requestDelayMillis = 8; + * @param value The requestDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setRequestDelayMillis(long value) { + + requestDelayMillis_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * uint64 requestDelayMillis = 8; + * @return This builder for chaining. + */ + public Builder clearRequestDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000080); + requestDelayMillis_ = 0L; + onChanged(); + return this; + } + + private long luckiestDelayMillis_ ; + /** + * uint64 luckiestDelayMillis = 9; + * @return The luckiestDelayMillis. + */ + @java.lang.Override + public long getLuckiestDelayMillis() { + return luckiestDelayMillis_; + } + /** + * uint64 luckiestDelayMillis = 9; + * @param value The luckiestDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setLuckiestDelayMillis(long value) { + + luckiestDelayMillis_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * uint64 luckiestDelayMillis = 9; + * @return This builder for chaining. + */ + public Builder clearLuckiestDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000100); + luckiestDelayMillis_ = 0L; + onChanged(); + return this; + } + + private int coverType_ = 0; + /** + * .WebRedPackCoverType coverType = 10; + * @return The enum numeric value on the wire for coverType. + */ + @java.lang.Override public int getCoverTypeValue() { + return coverType_; + } + /** + * .WebRedPackCoverType coverType = 10; + * @param value The enum numeric value on the wire for coverType to set. + * @return This builder for chaining. + */ + public Builder setCoverTypeValue(int value) { + coverType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * .WebRedPackCoverType coverType = 10; + * @return The coverType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType getCoverType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.forNumber(coverType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNRECOGNIZED : result; + } + /** + * .WebRedPackCoverType coverType = 10; + * @param value The coverType to set. + * @return This builder for chaining. + */ + public Builder setCoverType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + coverType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebRedPackCoverType coverType = 10; + * @return This builder for chaining. + */ + public Builder clearCoverType() { + bitField0_ = (bitField0_ & ~0x00000200); + coverType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebRedPackInfo) + } + + // @@protoc_insertion_point(class_scope:WebRedPackInfo) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebRedPackInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebRedPackInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebRedPackInfo_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\024WebRedPackInfo.proto\032\024SimpleUserInfo.p" + + "roto\032\031WebRedPackCoverType.proto\"\203\002\n\016WebR" + + "edPackInfo\022\n\n\002id\030\001 \001(\t\022\037\n\006author\030\002 \001(\0132\017" + + ".SimpleUserInfo\022\017\n\007balance\030\003 \001(\004\022\020\n\010open" + + "Time\030\004 \001(\004\022\023\n\013currentTime\030\005 \001(\004\022\021\n\tgrabT" + + "oken\030\006 \001(\t\022\027\n\017needSendRequest\030\007 \001(\010\022\032\n\022r" + + "equestDelayMillis\030\010 \001(\004\022\033\n\023luckiestDelay" + + "Millis\030\t \001(\004\022\'\n\tcoverType\030\n \001(\0162\024.WebRed" + + "PackCoverTypeB<\n:tech.ordinaryroad.live." + + "chat.client.codec.kuaishou.protobufb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.getDescriptor(), + }); + internal_static_WebRedPackInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebRedPackInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebRedPackInfo_descriptor, + new java.lang.String[] { "Id", "Author", "Balance", "OpenTime", "CurrentTime", "GrabToken", "NeedSendRequest", "RequestDelayMillis", "LuckiestDelayMillis", "CoverType", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebShareFeedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebShareFeedOuterClass.java new file mode 100644 index 0000000..ed3857e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebShareFeedOuterClass.java @@ -0,0 +1,1314 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebShareFeed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebShareFeedOuterClass { + private WebShareFeedOuterClass() {} + 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 WebShareFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebShareFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * .SimpleUserInfo user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * uint64 time = 3; + * @return The time. + */ + long getTime(); + + /** + * uint32 thirdPartyPlatform = 4; + * @return The thirdPartyPlatform. + */ + int getThirdPartyPlatform(); + + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + long getSortRank(); + + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @return The enum numeric value on the wire for liveAssistantType. + */ + int getLiveAssistantTypeValue(); + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @return The liveAssistantType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType(); + + /** + * string deviceHash = 7; + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * string deviceHash = 7; + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + } + /** + * Protobuf type {@code WebShareFeed} + */ + public static final class WebShareFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebShareFeed) + WebShareFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebShareFeed.newBuilder() to construct. + private WebShareFeed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebShareFeed() { + id_ = ""; + liveAssistantType_ = 0; + deviceHash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebShareFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + 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; + * @return The bytes for id. + */ + @java.lang.Override + 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 USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * .SimpleUserInfo user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int TIME_FIELD_NUMBER = 3; + private long time_ = 0L; + /** + * uint64 time = 3; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int THIRDPARTYPLATFORM_FIELD_NUMBER = 4; + private int thirdPartyPlatform_ = 0; + /** + * uint32 thirdPartyPlatform = 4; + * @return The thirdPartyPlatform. + */ + @java.lang.Override + public int getThirdPartyPlatform() { + return thirdPartyPlatform_; + } + + public static final int SORTRANK_FIELD_NUMBER = 5; + private long sortRank_ = 0L; + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int LIVEASSISTANTTYPE_FIELD_NUMBER = 6; + private int liveAssistantType_ = 0; + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @return The liveAssistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + + public static final int DEVICEHASH_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 7; + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * string deviceHash = 7; + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUser()); + } + if (time_ != 0L) { + output.writeUInt64(3, time_); + } + if (thirdPartyPlatform_ != 0) { + output.writeUInt32(4, thirdPartyPlatform_); + } + if (sortRank_ != 0L) { + output.writeUInt64(5, sortRank_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(6, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, deviceHash_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, time_); + } + if (thirdPartyPlatform_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, thirdPartyPlatform_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, sortRank_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, deviceHash_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getTime() + != other.getTime()) return false; + if (getThirdPartyPlatform() + != other.getThirdPartyPlatform()) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (liveAssistantType_ != other.liveAssistantType_) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + THIRDPARTYPLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyPlatform(); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + LIVEASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + liveAssistantType_; + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebShareFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebShareFeed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + time_ = 0L; + thirdPartyPlatform_ = 0; + sortRank_ = 0L; + liveAssistantType_ = 0; + deviceHash_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.thirdPartyPlatform_ = thirdPartyPlatform_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.liveAssistantType_ = liveAssistantType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.deviceHash_ = deviceHash_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.getThirdPartyPlatform() != 0) { + setThirdPartyPlatform(other.getThirdPartyPlatform()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (other.liveAssistantType_ != 0) { + setLiveAssistantTypeValue(other.getLiveAssistantTypeValue()); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + thirdPartyPlatform_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + liveAssistantType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + 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; + * @return The bytes for id. + */ + 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; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * .SimpleUserInfo user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long time_ ; + /** + * uint64 time = 3; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 3; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 time = 3; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000004); + time_ = 0L; + onChanged(); + return this; + } + + private int thirdPartyPlatform_ ; + /** + * uint32 thirdPartyPlatform = 4; + * @return The thirdPartyPlatform. + */ + @java.lang.Override + public int getThirdPartyPlatform() { + return thirdPartyPlatform_; + } + /** + * uint32 thirdPartyPlatform = 4; + * @param value The thirdPartyPlatform to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyPlatform(int value) { + + thirdPartyPlatform_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 thirdPartyPlatform = 4; + * @return This builder for chaining. + */ + public Builder clearThirdPartyPlatform() { + bitField0_ = (bitField0_ & ~0x00000008); + thirdPartyPlatform_ = 0; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * uint64 sortRank = 5; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * uint64 sortRank = 5; + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 sortRank = 5; + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000010); + sortRank_ = 0L; + onChanged(); + return this; + } + + private int liveAssistantType_ = 0; + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @param value The enum numeric value on the wire for liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantTypeValue(int value) { + liveAssistantType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @return The liveAssistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @param value The liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + liveAssistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebLiveAssistantType liveAssistantType = 6; + * @return This builder for chaining. + */ + public Builder clearLiveAssistantType() { + bitField0_ = (bitField0_ & ~0x00000020); + liveAssistantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * string deviceHash = 7; + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string deviceHash = 7; + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string deviceHash = 7; + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * string deviceHash = 7; + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * string deviceHash = 7; + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebShareFeed) + } + + // @@protoc_insertion_point(class_scope:WebShareFeed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebShareFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebShareFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebShareFeed_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\022WebShareFeed.proto\032\024SimpleUserInfo.pro" + + "to\032\032WebLiveAssistantType.proto\"\273\001\n\014WebSh" + + "areFeed\022\n\n\002id\030\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.Simp" + + "leUserInfo\022\014\n\004time\030\003 \001(\004\022\032\n\022thirdPartyPl" + + "atform\030\004 \001(\r\022\020\n\010sortRank\030\005 \001(\004\0220\n\021liveAs" + + "sistantType\030\006 \001(\0162\025.WebLiveAssistantType" + + "\022\022\n\ndeviceHash\030\007 \001(\tB<\n:tech.ordinaryroa" + + "d.live.chat.client.codec.kuaishou.protob" + + "ufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(), + }); + internal_static_WebShareFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebShareFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebShareFeed_descriptor, + new java.lang.String[] { "Id", "User", "Time", "ThirdPartyPlatform", "SortRank", "LiveAssistantType", "DeviceHash", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebSystemNoticeFeedOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebSystemNoticeFeedOuterClass.java new file mode 100644 index 0000000..85df819 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebSystemNoticeFeedOuterClass.java @@ -0,0 +1,1440 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebSystemNoticeFeed.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebSystemNoticeFeedOuterClass { + private WebSystemNoticeFeedOuterClass() {} + 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 WebSystemNoticeFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebSystemNoticeFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * .SimpleUserInfo user = 2; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * uint64 time = 3; + * @return The time. + */ + long getTime(); + + /** + * string content = 4; + * @return The content. + */ + java.lang.String getContent(); + /** + * string content = 4; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * uint64 displayDuration = 5; + * @return The displayDuration. + */ + long getDisplayDuration(); + + /** + * uint64 sortRank = 6; + * @return The sortRank. + */ + long getSortRank(); + + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @return The enum numeric value on the wire for displayType. + */ + int getDisplayTypeValue(); + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @return The displayType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType getDisplayType(); + } + /** + * Protobuf type {@code WebSystemNoticeFeed} + */ + public static final class WebSystemNoticeFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebSystemNoticeFeed) + WebSystemNoticeFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebSystemNoticeFeed.newBuilder() to construct. + private WebSystemNoticeFeed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebSystemNoticeFeed() { + id_ = ""; + content_ = ""; + displayType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebSystemNoticeFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder.class); + } + + /** + * Protobuf enum {@code WebSystemNoticeFeed.DisplayType} + */ + public enum DisplayType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_DISPLAY_TYPE = 0; + */ + UNKNOWN_DISPLAY_TYPE(0), + /** + * COMMENT = 1; + */ + COMMENT(1), + /** + * ALERT = 2; + */ + ALERT(2), + /** + * TOAST = 3; + */ + TOAST(3), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_DISPLAY_TYPE = 0; + */ + public static final int UNKNOWN_DISPLAY_TYPE_VALUE = 0; + /** + * COMMENT = 1; + */ + public static final int COMMENT_VALUE = 1; + /** + * ALERT = 2; + */ + public static final int ALERT_VALUE = 2; + /** + * TOAST = 3; + */ + public static final int TOAST_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DisplayType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DisplayType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_DISPLAY_TYPE; + case 1: return COMMENT; + case 2: return ALERT; + case 3: return TOAST; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DisplayType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DisplayType findValueByNumber(int number) { + return DisplayType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDescriptor().getEnumTypes().get(0); + } + + private static final DisplayType[] VALUES = values(); + + public static DisplayType 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 DisplayType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebSystemNoticeFeed.DisplayType) + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + @java.lang.Override + 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; + * @return The bytes for id. + */ + @java.lang.Override + 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 USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * .SimpleUserInfo user = 2; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int TIME_FIELD_NUMBER = 3; + private long time_ = 0L; + /** + * uint64 time = 3; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int CONTENT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * string content = 4; + * @return The content. + */ + @java.lang.Override + 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 = 4; + * @return The bytes for content. + */ + @java.lang.Override + 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 DISPLAYDURATION_FIELD_NUMBER = 5; + private long displayDuration_ = 0L; + /** + * uint64 displayDuration = 5; + * @return The displayDuration. + */ + @java.lang.Override + public long getDisplayDuration() { + return displayDuration_; + } + + public static final int SORTRANK_FIELD_NUMBER = 6; + private long sortRank_ = 0L; + /** + * uint64 sortRank = 6; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int DISPLAYTYPE_FIELD_NUMBER = 7; + private int displayType_ = 0; + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @return The enum numeric value on the wire for displayType. + */ + @java.lang.Override public int getDisplayTypeValue() { + return displayType_; + } + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @return The displayType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType getDisplayType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.forNumber(displayType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUser()); + } + if (time_ != 0L) { + output.writeUInt64(3, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, content_); + } + if (displayDuration_ != 0L) { + output.writeUInt64(5, displayDuration_); + } + if (sortRank_ != 0L) { + output.writeUInt64(6, sortRank_); + } + if (displayType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNKNOWN_DISPLAY_TYPE.getNumber()) { + output.writeEnum(7, displayType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, content_); + } + if (displayDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, displayDuration_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(6, sortRank_); + } + if (displayType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNKNOWN_DISPLAY_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, displayType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getTime() + != other.getTime()) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (getDisplayDuration() + != other.getDisplayDuration()) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (displayType_ != other.displayType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + DISPLAYDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayDuration()); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + DISPLAYTYPE_FIELD_NUMBER; + hash = (53 * hash) + displayType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebSystemNoticeFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebSystemNoticeFeed) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + time_ = 0L; + content_ = ""; + displayDuration_ = 0L; + sortRank_ = 0L; + displayType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayDuration_ = displayDuration_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.displayType_ = displayType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getDisplayDuration() != 0L) { + setDisplayDuration(other.getDisplayDuration()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (other.displayType_ != 0) { + setDisplayTypeValue(other.getDisplayTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + displayDuration_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + displayType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1; + * @return The id. + */ + 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; + * @return The bytes for id. + */ + 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; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string id = 1; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * .SimpleUserInfo user = 2; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .SimpleUserInfo user = 2; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .SimpleUserInfo user = 2; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * .SimpleUserInfo user = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long time_ ; + /** + * uint64 time = 3; + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * uint64 time = 3; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * uint64 time = 3; + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000004); + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * string content = 4; + * @return The content. + */ + 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 = 4; + * @return The bytes for content. + */ + 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 = 4; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string content = 4; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string content = 4; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long displayDuration_ ; + /** + * uint64 displayDuration = 5; + * @return The displayDuration. + */ + @java.lang.Override + public long getDisplayDuration() { + return displayDuration_; + } + /** + * uint64 displayDuration = 5; + * @param value The displayDuration to set. + * @return This builder for chaining. + */ + public Builder setDisplayDuration(long value) { + + displayDuration_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 displayDuration = 5; + * @return This builder for chaining. + */ + public Builder clearDisplayDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + displayDuration_ = 0L; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * uint64 sortRank = 6; + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * uint64 sortRank = 6; + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * uint64 sortRank = 6; + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000020); + sortRank_ = 0L; + onChanged(); + return this; + } + + private int displayType_ = 0; + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @return The enum numeric value on the wire for displayType. + */ + @java.lang.Override public int getDisplayTypeValue() { + return displayType_; + } + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @param value The enum numeric value on the wire for displayType to set. + * @return This builder for chaining. + */ + public Builder setDisplayTypeValue(int value) { + displayType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @return The displayType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType getDisplayType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.forNumber(displayType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNRECOGNIZED : result; + } + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @param value The displayType to set. + * @return This builder for chaining. + */ + public Builder setDisplayType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + displayType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebSystemNoticeFeed.DisplayType displayType = 7; + * @return This builder for chaining. + */ + public Builder clearDisplayType() { + bitField0_ = (bitField0_ & ~0x00000040); + displayType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebSystemNoticeFeed) + } + + // @@protoc_insertion_point(class_scope:WebSystemNoticeFeed) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebSystemNoticeFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebSystemNoticeFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebSystemNoticeFeed_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\031WebSystemNoticeFeed.proto\032\024SimpleUserI" + + "nfo.proto\"\215\002\n\023WebSystemNoticeFeed\022\n\n\002id\030" + + "\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.SimpleUserInfo\022\014\n\004" + + "time\030\003 \001(\004\022\017\n\007content\030\004 \001(\t\022\027\n\017displayDu" + + "ration\030\005 \001(\004\022\020\n\010sortRank\030\006 \001(\004\0225\n\013displa" + + "yType\030\007 \001(\0162 .WebSystemNoticeFeed.Displa" + + "yType\"J\n\013DisplayType\022\030\n\024UNKNOWN_DISPLAY_" + + "TYPE\020\000\022\013\n\007COMMENT\020\001\022\t\n\005ALERT\020\002\022\t\n\005TOAST\020" + + "\003B<\n:tech.ordinaryroad.live.chat.client." + + "codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + }); + internal_static_WebSystemNoticeFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebSystemNoticeFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebSystemNoticeFeed_descriptor, + new java.lang.String[] { "Id", "User", "Time", "Content", "DisplayDuration", "SortRank", "DisplayType", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebUserPauseTypeOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebUserPauseTypeOuterClass.java new file mode 100644 index 0000000..257bbb2 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebUserPauseTypeOuterClass.java @@ -0,0 +1,171 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebUserPauseType.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebUserPauseTypeOuterClass { + private WebUserPauseTypeOuterClass() {} + 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 WebUserPauseType} + */ + public enum WebUserPauseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN_USER_PAUSE_TYPE = 0; + */ + UNKNOWN_USER_PAUSE_TYPE(0), + /** + * BACKGROUND = 1; + */ + BACKGROUND(1), + UNRECOGNIZED(-1), + ; + + /** + * UNKNOWN_USER_PAUSE_TYPE = 0; + */ + public static final int UNKNOWN_USER_PAUSE_TYPE_VALUE = 0; + /** + * BACKGROUND = 1; + */ + public static final int BACKGROUND_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebUserPauseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebUserPauseType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_USER_PAUSE_TYPE; + case 1: return BACKGROUND; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebUserPauseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WebUserPauseType findValueByNumber(int number) { + return WebUserPauseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebUserPauseTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebUserPauseType[] VALUES = values(); + + public static WebUserPauseType 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 WebUserPauseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebUserPauseType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026WebUserPauseType.proto*?\n\020WebUserPause" + + "Type\022\033\n\027UNKNOWN_USER_PAUSE_TYPE\020\000\022\016\n\nBAC" + + "KGROUND\020\001B<\n:tech.ordinaryroad.live.chat" + + ".client.codec.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebWatchingUserInfoOuterClass.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebWatchingUserInfoOuterClass.java new file mode 100644 index 0000000..87df332 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/protobuf/WebWatchingUserInfoOuterClass.java @@ -0,0 +1,1093 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebWatchingUserInfo.proto + +// Protobuf Java Version: 3.25.3 +package tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf; + +public final class WebWatchingUserInfoOuterClass { + private WebWatchingUserInfoOuterClass() {} + 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 WebWatchingUserInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebWatchingUserInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * .SimpleUserInfo user = 1; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * .SimpleUserInfo user = 1; + * @return The user. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * .SimpleUserInfo user = 1; + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * bool offline = 2; + * @return The offline. + */ + boolean getOffline(); + + /** + * bool tuhao = 3; + * @return The tuhao. + */ + boolean getTuhao(); + + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @return The enum numeric value on the wire for liveAssistantType. + */ + int getLiveAssistantTypeValue(); + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @return The liveAssistantType. + */ + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType(); + + /** + * string displayKsCoin = 5; + * @return The displayKsCoin. + */ + java.lang.String getDisplayKsCoin(); + /** + * string displayKsCoin = 5; + * @return The bytes for displayKsCoin. + */ + com.google.protobuf.ByteString + getDisplayKsCoinBytes(); + } + /** + * Protobuf type {@code WebWatchingUserInfo} + */ + public static final class WebWatchingUserInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebWatchingUserInfo) + WebWatchingUserInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebWatchingUserInfo.newBuilder() to construct. + private WebWatchingUserInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebWatchingUserInfo() { + liveAssistantType_ = 0; + displayKsCoin_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebWatchingUserInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder.class); + } + + private int bitField0_; + public static final int USER_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * .SimpleUserInfo user = 1; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo user = 1; + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * .SimpleUserInfo user = 1; + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int OFFLINE_FIELD_NUMBER = 2; + private boolean offline_ = false; + /** + * bool offline = 2; + * @return The offline. + */ + @java.lang.Override + public boolean getOffline() { + return offline_; + } + + public static final int TUHAO_FIELD_NUMBER = 3; + private boolean tuhao_ = false; + /** + * bool tuhao = 3; + * @return The tuhao. + */ + @java.lang.Override + public boolean getTuhao() { + return tuhao_; + } + + public static final int LIVEASSISTANTTYPE_FIELD_NUMBER = 4; + private int liveAssistantType_ = 0; + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @return The liveAssistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + + public static final int DISPLAYKSCOIN_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object displayKsCoin_ = ""; + /** + * string displayKsCoin = 5; + * @return The displayKsCoin. + */ + @java.lang.Override + public java.lang.String getDisplayKsCoin() { + java.lang.Object ref = displayKsCoin_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayKsCoin_ = s; + return s; + } + } + /** + * string displayKsCoin = 5; + * @return The bytes for displayKsCoin. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayKsCoinBytes() { + java.lang.Object ref = displayKsCoin_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayKsCoin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUser()); + } + if (offline_ != false) { + output.writeBool(2, offline_); + } + if (tuhao_ != false) { + output.writeBool(3, tuhao_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(4, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayKsCoin_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayKsCoin_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUser()); + } + if (offline_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, offline_); + } + if (tuhao_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, tuhao_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayKsCoin_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayKsCoin_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo other = (tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo) obj; + + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getOffline() + != other.getOffline()) return false; + if (getTuhao() + != other.getTuhao()) return false; + if (liveAssistantType_ != other.liveAssistantType_) return false; + if (!getDisplayKsCoin() + .equals(other.getDisplayKsCoin())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + OFFLINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOffline()); + hash = (37 * hash) + TUHAO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getTuhao()); + hash = (37 * hash) + LIVEASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + liveAssistantType_; + hash = (37 * hash) + DISPLAYKSCOIN_FIELD_NUMBER; + hash = (53 * hash) + getDisplayKsCoin().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo 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 tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + 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 WebWatchingUserInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:WebWatchingUserInfo) + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.class, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + offline_ = false; + tuhao_ = false; + liveAssistantType_ = 0; + displayKsCoin_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo build() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo buildPartial() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo result = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.offline_ = offline_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tuhao_ = tuhao_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.liveAssistantType_ = liveAssistantType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayKsCoin_ = displayKsCoin_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo other) { + if (other == tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance()) return this; + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getOffline() != false) { + setOffline(other.getOffline()); + } + if (other.getTuhao() != false) { + setTuhao(other.getTuhao()); + } + if (other.liveAssistantType_ != 0) { + setLiveAssistantTypeValue(other.getLiveAssistantTypeValue()); + } + if (!other.getDisplayKsCoin().isEmpty()) { + displayKsCoin_ = other.displayKsCoin_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + offline_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + tuhao_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + liveAssistantType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + displayKsCoin_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * .SimpleUserInfo user = 1; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .SimpleUserInfo user = 1; + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * .SimpleUserInfo user = 1; + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 1; + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 1; + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .SimpleUserInfo user = 1; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000001); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SimpleUserInfo user = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * .SimpleUserInfo user = 1; + */ + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * .SimpleUserInfo user = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private boolean offline_ ; + /** + * bool offline = 2; + * @return The offline. + */ + @java.lang.Override + public boolean getOffline() { + return offline_; + } + /** + * bool offline = 2; + * @param value The offline to set. + * @return This builder for chaining. + */ + public Builder setOffline(boolean value) { + + offline_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * bool offline = 2; + * @return This builder for chaining. + */ + public Builder clearOffline() { + bitField0_ = (bitField0_ & ~0x00000002); + offline_ = false; + onChanged(); + return this; + } + + private boolean tuhao_ ; + /** + * bool tuhao = 3; + * @return The tuhao. + */ + @java.lang.Override + public boolean getTuhao() { + return tuhao_; + } + /** + * bool tuhao = 3; + * @param value The tuhao to set. + * @return This builder for chaining. + */ + public Builder setTuhao(boolean value) { + + tuhao_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool tuhao = 3; + * @return This builder for chaining. + */ + public Builder clearTuhao() { + bitField0_ = (bitField0_ & ~0x00000004); + tuhao_ = false; + onChanged(); + return this; + } + + private int liveAssistantType_ = 0; + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @param value The enum numeric value on the wire for liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantTypeValue(int value) { + liveAssistantType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @return The liveAssistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @param value The liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantType(tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + liveAssistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .WebLiveAssistantType liveAssistantType = 4; + * @return This builder for chaining. + */ + public Builder clearLiveAssistantType() { + bitField0_ = (bitField0_ & ~0x00000008); + liveAssistantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayKsCoin_ = ""; + /** + * string displayKsCoin = 5; + * @return The displayKsCoin. + */ + public java.lang.String getDisplayKsCoin() { + java.lang.Object ref = displayKsCoin_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayKsCoin_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string displayKsCoin = 5; + * @return The bytes for displayKsCoin. + */ + public com.google.protobuf.ByteString + getDisplayKsCoinBytes() { + java.lang.Object ref = displayKsCoin_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayKsCoin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string displayKsCoin = 5; + * @param value The displayKsCoin to set. + * @return This builder for chaining. + */ + public Builder setDisplayKsCoin( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayKsCoin_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * string displayKsCoin = 5; + * @return This builder for chaining. + */ + public Builder clearDisplayKsCoin() { + displayKsCoin_ = getDefaultInstance().getDisplayKsCoin(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * string displayKsCoin = 5; + * @param value The bytes for displayKsCoin to set. + * @return This builder for chaining. + */ + public Builder setDisplayKsCoinBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayKsCoin_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebWatchingUserInfo) + } + + // @@protoc_insertion_point(class_scope:WebWatchingUserInfo) + private static final tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo(); + } + + public static tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebWatchingUserInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebWatchingUserInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebWatchingUserInfo_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\031WebWatchingUserInfo.proto\032\024SimpleUserI" + + "nfo.proto\032\032WebLiveAssistantType.proto\"\235\001" + + "\n\023WebWatchingUserInfo\022\035\n\004user\030\001 \001(\0132\017.Si" + + "mpleUserInfo\022\017\n\007offline\030\002 \001(\010\022\r\n\005tuhao\030\003" + + " \001(\010\0220\n\021liveAssistantType\030\004 \001(\0162\025.WebLiv" + + "eAssistantType\022\025\n\rdisplayKsCoin\030\005 \001(\tB<\n" + + ":tech.ordinaryroad.live.chat.client.code" + + "c.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(), + }); + internal_static_WebWatchingUserInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebWatchingUserInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebWatchingUserInfo_descriptor, + new java.lang.String[] { "User", "Offline", "Tuhao", "LiveAssistantType", "DisplayKsCoin", }); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/AuditAudienceMask.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/AuditAudienceMask.proto new file mode 100644 index 0000000..0ae2176 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/AuditAudienceMask.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +import "LiveCdnNodeView.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message AuditAudienceMask { + repeated LiveCdnNodeView iconCdnNodeView = 1; + string title = 2; + string detail = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSError.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSError.proto new file mode 100644 index 0000000..9b731bf --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSError.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSError { + uint32 code = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSHeartbeat.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSHeartbeat.proto new file mode 100644 index 0000000..705b2b9 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSHeartbeat.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSHeartbeat { + uint64 timestamp = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSPing.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSPing.proto new file mode 100644 index 0000000..4ce51fa --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSPing.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +import "ClientId.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSPing { + string echoData = 1; + ClientId clientId = 2; + string deviceId = 3; + string appVer = 4; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebEnterRoom.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebEnterRoom.proto new file mode 100644 index 0000000..d8cbe7e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebEnterRoom.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSWebEnterRoom { + string token = 1; + string liveStreamId = 2; + uint32 reconnectCount = 3; + uint32 lastErrorCode = 4; + string expTag = 5; + string attach = 6; + string pageId = 7; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebError.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebError.proto new file mode 100644 index 0000000..1fc8ddb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebError.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSWebError { + uint32 code = 1; + string msg = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebHeartbeat.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebHeartbeat.proto new file mode 100644 index 0000000..6d4d059 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebHeartbeat.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSWebHeartbeat { + uint64 timestamp = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebUserExit.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebUserExit.proto new file mode 100644 index 0000000..866dc28 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebUserExit.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSWebUserExit { + uint64 time = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebUserPause.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebUserPause.proto new file mode 100644 index 0000000..1946b73 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/CSWebUserPause.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "WebUserPauseType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message CSWebUserPause { + uint64 time = 1; + WebUserPauseType pauseType = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ClientId.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ClientId.proto new file mode 100644 index 0000000..533f7a4 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ClientId.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum ClientId { + NONE = 0; + IPHONE = 1; + ANDROID = 2; + WEB = 3; + PC = 6; + IPHONE_LIVE_MATE = 8; + ANDROID_LIVE_MATE = 9; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ConfigSwitchItem.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ConfigSwitchItem.proto new file mode 100644 index 0000000..12adb30 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ConfigSwitchItem.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "ConfigSwitchType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message ConfigSwitchItem { + ConfigSwitchType configSwitchType = 1; + bool value = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ConfigSwitchType.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ConfigSwitchType.proto new file mode 100644 index 0000000..78cac62 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/ConfigSwitchType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum ConfigSwitchType { + UNKNOWN = 0; + HIDE_BARRAGE = 1; + HIDE_SPECIAL_EFFECT = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/GzoneNameplate.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/GzoneNameplate.proto new file mode 100644 index 0000000..973c975 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/GzoneNameplate.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +import "PicUrl.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message GzoneNameplate { + int64 id = 1; + string name = 2; + repeated PicUrl urls = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveAudienceState.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveAudienceState.proto new file mode 100644 index 0000000..abb3f76 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveAudienceState.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; +import "GzoneNameplate.proto"; +import "LiveFansGroupState.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message LiveAudienceState { + bool isFromFansTop = 1; + bool isKoi = 2; + AssistantType assistantType = 3; + uint32 fansGroupIntimacyLevel = 4; + GzoneNameplate nameplate = 5; + LiveFansGroupState liveFansGroupState = 6; + uint32 wealthGrade = 7; + string badgeKey = 8; + repeated LiveAudienceState_11 liveAudienceState_11 = 11; + + message LiveAudienceState_11{ + LiveAudienceState_11_1 liveAudienceState_11_1 = 1; + message LiveAudienceState_11_1{ + // string s1 = 1; + string badgeIcon = 2; + // uint32 int3 = 3; + string badgeName = 4; + } + } + + enum AssistantType { + UNKNOWN_ASSISTANT_TYPE = 0; + SUPER = 1; + JUNIOR = 2; + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveCdnNodeView.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveCdnNodeView.proto new file mode 100644 index 0000000..99b5f7e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveCdnNodeView.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message LiveCdnNodeView { + string cdn = 1; + string url = 2; + bool freeTraffic = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveFansGroupState.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveFansGroupState.proto new file mode 100644 index 0000000..225a580 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/LiveFansGroupState.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message LiveFansGroupState { + uint32 intimacyLevel = 1; + uint32 enterRoomSpecialEffect = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PSHostInfo.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PSHostInfo.proto new file mode 100644 index 0000000..92e4fed --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PSHostInfo.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message PSHostInfo { + string ip = 1; + int32 port = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PayloadType.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PayloadType.proto new file mode 100644 index 0000000..a5a64ea --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PayloadType.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum PayloadType { + UNKNOWN = 0; + CS_HEARTBEAT = 1; + CS_ERROR = 3; + CS_PING = 4; + PS_HOST_INFO = 51; + SC_HEARTBEAT_ACK = 101; + SC_ECHO = 102; + SC_ERROR = 103; + SC_PING_ACK = 104; + SC_INFO = 105; + CS_ENTER_ROOM = 200; + CS_USER_PAUSE = 201; + CS_USER_EXIT = 202; + CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203; + CS_HORSE_RACING = 204; + CS_RACE_LOSE = 205; + CS_VOIP_SIGNAL = 206; + SC_ENTER_ROOM_ACK = 300; + SC_AUTHOR_PAUSE = 301; + SC_AUTHOR_RESUME = 302; + SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303; + SC_AUTHOR_HEARTBEAT_MISS = 304; + SC_PIP_STARTED = 305; + SC_PIP_ENDED = 306; + SC_HORSE_RACING_ACK = 307; + SC_VOIP_SIGNAL = 308; + SC_FEED_PUSH = 310; + SC_ASSISTANT_STATUS = 311; + SC_REFRESH_WALLET = 312; + SC_LIVE_CHAT_CALL = 320; + SC_LIVE_CHAT_CALL_ACCEPTED = 321; + SC_LIVE_CHAT_CALL_REJECTED = 322; + SC_LIVE_CHAT_READY = 323; + SC_LIVE_CHAT_GUEST_END = 324; + SC_LIVE_CHAT_ENDED = 325; + SC_RENDERING_MAGIC_FACE_DISABLE = 326; + SC_RENDERING_MAGIC_FACE_ENABLE = 327; + SC_RED_PACK_FEED = 330; + SC_LIVE_WATCHING_LIST = 340; + SC_LIVE_QUIZ_QUESTION_ASKED = 350; + SC_LIVE_QUIZ_QUESTION_REVIEWED = 351; + SC_LIVE_QUIZ_SYNC = 352; + SC_LIVE_QUIZ_ENDED = 353; + SC_LIVE_QUIZ_WINNERS = 354; + SC_SUSPECTED_VIOLATION = 355; + SC_SHOP_OPENED = 360; + SC_SHOP_CLOSED = 361; + SC_GUESS_OPENED = 370; + SC_GUESS_CLOSED = 371; + SC_PK_INVITATION = 380; + SC_PK_STATISTIC = 381; + SC_RIDDLE_OPENED = 390; + SC_RIDDLE_CLOESED = 391; + SC_RIDE_CHANGED = 412; + SC_BET_CHANGED = 441; + SC_BET_CLOSED = 442; + SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645; + SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE = 758; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PicUrl.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PicUrl.proto new file mode 100644 index 0000000..26e2c54 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/PicUrl.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message PicUrl { + string cdn = 1; + string url = 2; + string urlPattern = 3; + string ip = 4; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCEcho.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCEcho.proto new file mode 100644 index 0000000..5816960 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCEcho.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCEcho { + string content = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCError.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCError.proto new file mode 100644 index 0000000..8e60b4b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCError.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCError { + uint32 code = 1; + string msg = 2; + uint32 subCode = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCHeartbeatAck.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCHeartbeatAck.proto new file mode 100644 index 0000000..55923e6 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCHeartbeatAck.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCHeartbeatAck { + uint64 timestamp = 1; + uint64 clientTimestamp = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCInfo.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCInfo.proto new file mode 100644 index 0000000..01fd255 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCInfo.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCInfo { + uint32 code = 1; + string msg = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCLiveWarningMaskStatusChangedAudience.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCLiveWarningMaskStatusChangedAudience.proto new file mode 100644 index 0000000..ee868ce --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCLiveWarningMaskStatusChangedAudience.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "AuditAudienceMask.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCLiveWarningMaskStatusChangedAudience { + bool displayMask = 1; + AuditAudienceMask warningMask = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCPingAck.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCPingAck.proto new file mode 100644 index 0000000..22c14da --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCPingAck.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCPingAck { + string echoData = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebAuthorPause.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebAuthorPause.proto new file mode 100644 index 0000000..5fd3730 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebAuthorPause.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "WebPauseType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebAuthorPause { + uint64 time = 1; + WebPauseType pauseType = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebAuthorResume.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebAuthorResume.proto new file mode 100644 index 0000000..8613b46 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebAuthorResume.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebAuthorResume { + uint64 time = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebBetChanged.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebBetChanged.proto new file mode 100644 index 0000000..e142f0a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebBetChanged.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebBetChanged { + uint64 maxDelayMillis = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebBetClosed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebBetClosed.proto new file mode 100644 index 0000000..8063d53 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebBetClosed.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebBetClosed { + uint64 maxDelayMillis = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebCurrentRedPackFeed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebCurrentRedPackFeed.proto new file mode 100644 index 0000000..f9c3f77 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebCurrentRedPackFeed.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "WebRedPackInfo.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebCurrentRedPackFeed { + repeated WebRedPackInfo redPack = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebEnterRoomAck.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebEnterRoomAck.proto new file mode 100644 index 0000000..cf1945a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebEnterRoomAck.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebEnterRoomAck { + uint64 minReconnectMs = 1; + uint64 maxReconnectMs = 2; + uint64 heartbeatIntervalMs = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebError.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebError.proto new file mode 100644 index 0000000..84fdcf0 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebError.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebError { + uint32 code = 1; + string msg = 2; + uint32 subCode = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebFeedPush.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebFeedPush.proto new file mode 100644 index 0000000..a1dbb7a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebFeedPush.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +import "WebCommentFeed.proto"; +import "WebComboCommentFeed.proto"; +import "WebLikeFeed.proto"; +import "WebGiftFeed.proto"; +import "WebSystemNoticeFeed.proto"; +import "WebShareFeed.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebFeedPush { + string displayWatchingCount = 1; + string displayLikeCount = 2; + uint64 pendingLikeCount = 3; + uint64 pushInterval = 4; + repeated WebCommentFeed commentFeeds = 5; + string commentCursor = 6; + repeated WebComboCommentFeed comboCommentFeed = 7; + repeated WebLikeFeed likeFeeds = 8; + repeated WebGiftFeed giftFeeds = 9; + string giftCursor = 10; + repeated WebSystemNoticeFeed systemNoticeFeeds = 11; + repeated WebShareFeed shareFeeds = 12; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebGuessClosed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebGuessClosed.proto new file mode 100644 index 0000000..7964d1c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebGuessClosed.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebGuessClosed { + uint64 time = 1; + string guessId = 2; + uint64 displayMaxDelayMillis = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebGuessOpened.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebGuessOpened.proto new file mode 100644 index 0000000..2ba258a --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebGuessOpened.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebGuessOpened { + uint64 time = 1; + string guessId = 2; + uint64 submitDeadline = 3; + uint64 displayMaxDelayMillis = 4; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebHeartbeatAck.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebHeartbeatAck.proto new file mode 100644 index 0000000..7d6493f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebHeartbeatAck.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebHeartbeatAck { + uint64 timestamp = 1; + uint64 clientTimestamp = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebLiveSpecialAccountConfigState.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebLiveSpecialAccountConfigState.proto new file mode 100644 index 0000000..30197a6 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebLiveSpecialAccountConfigState.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "ConfigSwitchItem.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebLiveSpecialAccountConfigState { + repeated ConfigSwitchItem configSwitchItem = 1; + uint64 timestamp = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebLiveWatchingUsers.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebLiveWatchingUsers.proto new file mode 100644 index 0000000..dd125eb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebLiveWatchingUsers.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +import "WebWatchingUserInfo.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebLiveWatchingUsers { + repeated WebWatchingUserInfo watchingUser = 1; + string displayWatchingCount = 2; + uint64 pendingDuration = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebPipEnded.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebPipEnded.proto new file mode 100644 index 0000000..a410510 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebPipEnded.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebPipEnded { + uint64 time = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebPipStarted.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebPipStarted.proto new file mode 100644 index 0000000..aefb8ee --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebPipStarted.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebPipStarted { + uint64 time = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebRefreshWallet.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebRefreshWallet.proto new file mode 100644 index 0000000..f27428b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebRefreshWallet.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebRefreshWallet { + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebRideChanged.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebRideChanged.proto new file mode 100644 index 0000000..0064ef2 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebRideChanged.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebRideChanged { + string rideId = 1; + uint32 requestMaxDelayMillis = 2; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebSuspectedViolation.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebSuspectedViolation.proto new file mode 100644 index 0000000..620ae2c --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SCWebSuspectedViolation.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SCWebSuspectedViolation { + bool suspectedViolation = 1; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SimpleUserInfo.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SimpleUserInfo.proto new file mode 100644 index 0000000..27626ba --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SimpleUserInfo.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SimpleUserInfo { + string principalId = 1; + string userName = 2; + string headUrl = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SocketMessage.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SocketMessage.proto new file mode 100644 index 0000000..6679503 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/SocketMessage.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +import "PayloadType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message SocketMessage { + PayloadType payloadType = 1; + CompressionType compressionType = 2; + bytes payload = 3; + +enum CompressionType { + UNKNOWN = 0; + NONE = 1; + GZIP = 2; + AES = 3; +} +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/UserInfo.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/UserInfo.proto new file mode 100644 index 0000000..8e42ecc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/UserInfo.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +import "PicUrl.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message UserInfo { + uint64 userId = 1; + string userName = 2; + string userGender = 3; + string userText = 4; + repeated PicUrl headUrls = 5; + bool verified = 6; + string sUserId = 7; + repeated PicUrl httpsHeadUrls = 8; + string kwaiId = 9; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebComboCommentFeed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebComboCommentFeed.proto new file mode 100644 index 0000000..6618a2f --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebComboCommentFeed.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebComboCommentFeed { + string id = 1; + string content = 2; + uint32 comboCount = 3; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebCommentFeed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebCommentFeed.proto new file mode 100644 index 0000000..80bd609 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebCommentFeed.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebCommentFeedShowType.proto"; +import "LiveAudienceState.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebCommentFeed { + string id = 1; + SimpleUserInfo user = 2; + string content = 3; + string deviceHash = 4; + uint64 sortRank = 5; + string color = 6; + WebCommentFeedShowType showType = 7; + LiveAudienceState senderState = 8; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebCommentFeedShowType.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebCommentFeedShowType.proto new file mode 100644 index 0000000..3ca44fc --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebCommentFeedShowType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum WebCommentFeedShowType { + FEED_SHOW_UNKNOWN = 0; + FEED_SHOW_NORMAL = 1; + FEED_HIDDEN = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebGiftFeed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebGiftFeed.proto new file mode 100644 index 0000000..45afb0e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebGiftFeed.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebLiveAssistantType.proto"; +import "LiveAudienceState.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebGiftFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 time = 3; + uint32 intGiftId = 4; + uint64 sortRank = 5; + string mergeKey = 6; + uint32 batchSize = 7; + uint32 comboCount = 8; + uint32 rank = 9; + uint64 expireDuration = 10; + uint64 clientTimestamp = 11; + uint64 slotDisplayDuration = 12; + uint32 starLevel = 13; + StyleType styleType = 14; + WebLiveAssistantType liveAssistantType = 15; + string deviceHash = 16; + bool danmakuDisplay = 17; + LiveAudienceState liveAudienceState = 18; + + enum StyleType { + UNKNOWN_STYLE = 0; + BATCH_STAR_0 = 1; + BATCH_STAR_1 = 2; + BATCH_STAR_2 = 3; + BATCH_STAR_3 = 4; + BATCH_STAR_4 = 5; + BATCH_STAR_5 = 6; + BATCH_STAR_6 = 7; + } +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebLikeFeed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebLikeFeed.proto new file mode 100644 index 0000000..63dde46 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebLikeFeed.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "LiveAudienceState.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebLikeFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 sortRank = 3; + string deviceHash = 4; + LiveAudienceState liveAudienceState = 5; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebLiveAssistantType.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebLiveAssistantType.proto new file mode 100644 index 0000000..90392d3 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebLiveAssistantType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum WebLiveAssistantType { + UNKNOWN_ASSISTANT_TYPE = 0; + SUPER = 1; + JUNIOR = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebPauseType.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebPauseType.proto new file mode 100644 index 0000000..c3f83a8 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebPauseType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum WebPauseType { + UNKNOWN_PAUSE_TYPE = 0; + TELEPHONE = 1; + SHARE = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebRedPackCoverType.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebRedPackCoverType.proto new file mode 100644 index 0000000..0a52ac6 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebRedPackCoverType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum WebRedPackCoverType { + UNKNOWN_COVER_TYPE = 0; + NORMAL_COVER = 1; + PRETTY_COVER = 2; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebRedPackInfo.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebRedPackInfo.proto new file mode 100644 index 0000000..d8d6988 --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebRedPackInfo.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebRedPackCoverType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebRedPackInfo { + string id = 1; + SimpleUserInfo author = 2; + uint64 balance = 3; + uint64 openTime = 4; + uint64 currentTime = 5; + string grabToken = 6; + bool needSendRequest = 7; + uint64 requestDelayMillis = 8; + uint64 luckiestDelayMillis = 9; + WebRedPackCoverType coverType = 10; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebShareFeed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebShareFeed.proto new file mode 100644 index 0000000..c7d045d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebShareFeed.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebLiveAssistantType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebShareFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 time = 3; + uint32 thirdPartyPlatform = 4; + uint64 sortRank = 5; + WebLiveAssistantType liveAssistantType = 6; + string deviceHash = 7; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebSystemNoticeFeed.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebSystemNoticeFeed.proto new file mode 100644 index 0000000..5f0f57b --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebSystemNoticeFeed.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebSystemNoticeFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 time = 3; + string content = 4; + uint64 displayDuration = 5; + uint64 sortRank = 6; + DisplayType displayType = 7; + +enum DisplayType { + UNKNOWN_DISPLAY_TYPE = 0; + COMMENT = 1; + ALERT = 2; + TOAST = 3; +} +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebUserPauseType.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebUserPauseType.proto new file mode 100644 index 0000000..7fbcd8e --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebUserPauseType.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +enum WebUserPauseType { + UNKNOWN_USER_PAUSE_TYPE = 0; + BACKGROUND = 1; +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebWatchingUserInfo.proto b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebWatchingUserInfo.proto new file mode 100644 index 0000000..7763e2d --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/main/resources/proto/WebWatchingUserInfo.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebLiveAssistantType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf"; + +message WebWatchingUserInfo { + SimpleUserInfo user = 1; + bool offline = 2; + bool tuhao = 3; + WebLiveAssistantType liveAssistantType = 4; + string displayKsCoin = 5; + +} \ No newline at end of file diff --git a/live-chat-client-codec/live-chat-client-codec-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/api/KuaishouApisTest.java b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/api/KuaishouApisTest.java new file mode 100644 index 0000000..56bf5eb --- /dev/null +++ b/live-chat-client-codec/live-chat-client-codec-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/codec/kuaishou/api/KuaishouApisTest.java @@ -0,0 +1,42 @@ +package tech.ordinaryroad.live.chat.client.codec.kuaishou.api; + +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; + +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +/** + * @author mjz + * @date 2024/1/6 + */ +@Slf4j +class KuaishouApisTest { + + @Test + void allgifts() { + Map allgifts = KuaishouApis.allgifts(); + assertNotEquals(0, allgifts.size()); + } + + @Test + void getGiftInfoById() { + KuaishouApis.GiftInfo giftInfoById = KuaishouApis.getGiftInfoById("1"); + assertEquals("荧光棒", giftInfoById.getGiftName()); + + } + + @Test + void sendComment() { + System.out.println(KuaishouApis.sendComment(System.getenv("cookie"), + "3x3gjx4jfca4zfs", + KuaishouApis.SendCommentRequest + .builder() + .liveStreamId("53SZUUkYtqQ") + .content("12222222") + .build() + )); + } +} \ No newline at end of file diff --git a/live-chat-client-codec/pom.xml b/live-chat-client-codec/pom.xml new file mode 100644 index 0000000..c81214f --- /dev/null +++ b/live-chat-client-codec/pom.xml @@ -0,0 +1,21 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client + 0.7.0 + + pom + + live-chat-client-codec + ordinaryroad-live-chat-client-codec + + + live-chat-client-codec-bilibili + live-chat-client-codec-douyu + live-chat-client-codec-huya + live-chat-client-codec-douyin + live-chat-client-codec-kuaishou + + diff --git a/live-chat-client-commons/live-chat-client-commons-base/pom.xml b/live-chat-client-commons/live-chat-client-commons-base/pom.xml new file mode 100644 index 0000000..63750fc --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/pom.xml @@ -0,0 +1,48 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-client-commons + 0.7.0 + + jar + + live-chat-client-commons-base + ordinaryroad-live-chat-client-commons-base + + + UTF-8 + + + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/Constants.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/Constants.java new file mode 100644 index 0000000..faf4a69 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/Constants.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.constant; + +/** + * @author mjz + * @date 2023/8/26 + */ +public class Constants { +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/LiveStatusAction.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/LiveStatusAction.java new file mode 100644 index 0000000..e7c2184 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/LiveStatusAction.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.constant; + +/** + * @author mjz + * @date 2024/3/10 + */ +public enum LiveStatusAction { + BEGIN, + END +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/exception/BaseException.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/exception/BaseException.java new file mode 100644 index 0000000..71248e7 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/exception/BaseException.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.exception; + +/** + * @author mjz + * @date 2023/9/5 + */ +public class BaseException extends RuntimeException { + + public BaseException() { + } + + public BaseException(String message) { + super(message); + } + + public BaseException(String message, Throwable cause) { + super(message, cause); + } + + public BaseException(Throwable cause) { + super(cause); + } + + public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseConnectionListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseConnectionListener.java new file mode 100644 index 0000000..4398cf9 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseConnectionListener.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 连接回调 + * + * @author mjz + * @date 2023/8/26 + */ +public interface IBaseConnectionListener { + + /** + * 连接建立成功 + */ + default void onConnected(T t) { + // ignore + } + + /** + * 连接建立失败 + * + * @param t + */ + default void onConnectFailed(T t) { + // ignore + } + + /** + * 连接断开 + * + * @param t + */ + default void onDisconnected(T t) { + // ignore + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseMsgListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseMsgListener.java new file mode 100644 index 0000000..4084c4b --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseMsgListener.java @@ -0,0 +1,93 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * Base消息回调 + * + * @author mjz + * @date 2023/8/26 + */ +public interface IBaseMsgListener> { + + /** + * 收到消息(所有消息) + * + * @param msg IMsg + */ + default void onMsg(T t, IMsg msg) { + this.onMsg(msg); + } + + default void onMsg(IMsg msg) { + // ignore + } + + /** + * 收到cmd消息(所有cmd) + * + * @param cmd CmdEnum + * @param cmdMsg BaseCmdMsg + */ + default void onCmdMsg(T t, CmdEnum cmd, ICmdMsg cmdMsg) { + this.onCmdMsg(cmd, cmdMsg); + } + + default void onCmdMsg(CmdEnum cmd, ICmdMsg cmdMsg) { + // ignore + } + + /** + * 收到其他cmd消息(存在Enum,但Listener没有对应的回调) + * + * @param cmd CmdEnum + * @param cmdMsg BaseCmdMsg + */ + default void onOtherCmdMsg(T t, CmdEnum cmd, ICmdMsg cmdMsg) { + this.onOtherCmdMsg(cmd, cmdMsg); + } + + default void onOtherCmdMsg(CmdEnum cmd, ICmdMsg cmdMsg) { + // ignore + } + + /** + * 收到未知cmd消息 + * + * @param cmdString 实际收到的cmd字符串 + * @param msg BaseMsg + */ + default void onUnknownCmd(T t, String cmdString, IMsg msg) { + this.onUnknownCmd(cmdString, msg); + } + + default void onUnknownCmd(String cmdString, IMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IDanmuMsgListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IDanmuMsgListener.java new file mode 100644 index 0000000..52b8dac --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IDanmuMsgListener.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 弹幕消息回调 + * + * @author mjz + * @since 0.0.6 + */ +public interface IDanmuMsgListener { + + /** + * 收到弹幕 + */ + default void onDanmuMsg(T t, DanmuMsg msg) { + this.onDanmuMsg(msg); + } + + default void onDanmuMsg(DanmuMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IEnterRoomMsgListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IEnterRoomMsgListener.java new file mode 100644 index 0000000..931f35f --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IEnterRoomMsgListener.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 进入房间消息回调 + * + * @author mjz + * @date 2023/12/14 + * @since 0.0.16 + */ +public interface IEnterRoomMsgListener { + + /** + * 用户进入房间 + */ + default void onEnterRoomMsg(T t, EnterRoomMsg msg) { + this.onEnterRoomMsg(msg); + } + + default void onEnterRoomMsg(EnterRoomMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IGiftMsgListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IGiftMsgListener.java new file mode 100644 index 0000000..f486b96 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IGiftMsgListener.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 礼物消息回调 + * + * @author mjz + * @since 0.0.8 + */ +public interface IGiftMsgListener { + + + /** + * 收到礼物 + */ + default void onGiftMsg(T t, GiftMsg msg) { + this.onGiftMsg(msg); + } + + default void onGiftMsg(GiftMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILikeMsgListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILikeMsgListener.java new file mode 100644 index 0000000..42cc886 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILikeMsgListener.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 点赞消息回调 + * + * @author mjz + * @since 0.2.0 + */ +public interface ILikeMsgListener { + + /** + * 收到点赞 + */ + default void onLikeMsg(T t, LikeMsg msg) { + this.onLikeMsg(msg); + } + + default void onLikeMsg(LikeMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILiveStatusChangeListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILiveStatusChangeListener.java new file mode 100644 index 0000000..e8d3701 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILiveStatusChangeListener.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 直播状态变化消息回调 + * + * @author mjz + * @date 2024/3/10 + */ +public interface ILiveStatusChangeListener { + + /** + * 直播状态变化 + */ + default void onLiveStatusMsg(T t, LiveStatusMsg msg) { + this.onLiveStatusMsg(msg); + } + + default void onLiveStatusMsg(LiveStatusMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IRoomStatsMsgListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IRoomStatsMsgListener.java new file mode 100644 index 0000000..b89fb22 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IRoomStatsMsgListener.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 直播间房间统计消息回调 + * + * @author mjz + * @date 2024/4/24 + */ +public interface IRoomStatsMsgListener { + + /** + * 房间统计消息 + */ + default void onRoomStatsMsg(T t, RoomStatsMsg msg) { + this.onRoomStatsMsg(msg); + } + + default void onRoomStatsMsg(RoomStatsMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ISuperChatMsgListener.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ISuperChatMsgListener.java new file mode 100644 index 0000000..1a70b60 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ISuperChatMsgListener.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 醒目留言消息回调 + * + * @author mjz + * @date 2023/9/24 + * @since 0.0.11 + */ +public interface ISuperChatMsgListener { + + /** + * 收到醒目留言 + */ + default void onSuperChatMsg(T t, SuperChatMsg msg) { + this.onSuperChatMsg(msg); + } + + default void onSuperChatMsg(SuperChatMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ICmdMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ICmdMsg.java new file mode 100644 index 0000000..7a0b2cf --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ICmdMsg.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2023/10/2 + */ +public interface ICmdMsg> extends IMsg { + + String getCmd(); + + void setCmd(String cmd); + + CmdEnum getCmdEnum(); +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IDanmuMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IDanmuMsg.java new file mode 100644 index 0000000..7a4745c --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IDanmuMsg.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2023/9/8 + */ +public interface IDanmuMsg extends IMsg { + + /** + * 粉丝牌名称 + */ + String getBadgeName(); + + /** + * 粉丝牌等级 + */ + byte getBadgeLevel(); + + /** + * 弹幕发送者id + */ + String getUid(); + + /** + * 弹幕发送者用户名 + */ + String getUsername(); + + /** + * 弹幕发送者头像地址 + * + * @since 0.0.11 + */ + default String getUserAvatar() { + return null; + } + + /** + * 弹幕内容 + */ + String getContent(); + +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IEnterRoomMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IEnterRoomMsg.java new file mode 100644 index 0000000..a914e63 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IEnterRoomMsg.java @@ -0,0 +1,62 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * 入房消息 + * + * @author mjz + * @date 2023/12/26 + * @since 0.0.16 + */ +public interface IEnterRoomMsg extends IMsg { + + /** + * 粉丝牌名称 + */ + String getBadgeName(); + + /** + * 粉丝牌等级 + */ + byte getBadgeLevel(); + + /** + * 用户id + */ + String getUid(); + + /** + * 用户名 + */ + String getUsername(); + + /** + * 头像地址 + */ + default String getUserAvatar() { + return null; + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IGiftMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IGiftMsg.java new file mode 100644 index 0000000..b424308 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IGiftMsg.java @@ -0,0 +1,102 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2023/9/8 + */ +public interface IGiftMsg extends IMsg { + + /** + * 粉丝牌名称 + */ + default String getBadgeName() { + return ""; + } + + /** + * 粉丝牌等级 + */ + default byte getBadgeLevel() { + return 0; + } + + /** + * 发送方id + */ + String getUid(); + + /** + * 发送方用户名 + */ + String getUsername(); + + /** + * 发送方头像地址 + * + * @since 0.0.11 + */ + default String getUserAvatar() { + return null; + } + + /** + * 礼物名称 + */ + String getGiftName(); + + /** + * 礼物图像地址 + */ + String getGiftImg(); + + /** + * 礼物id + */ + String getGiftId(); + + /** + * 礼物数量 + * + * @return 礼物数量,可能小于等于0 + */ + int getGiftCount(); + + /** + * 单个礼物价格 + */ + int getGiftPrice(); + + /** + * 接收方id + */ + String getReceiveUid(); + + /** + * 接收方用户名 + */ + String getReceiveUsername(); +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILikeMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILikeMsg.java new file mode 100644 index 0000000..c10fe97 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILikeMsg.java @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2024/1/31 + * @since 0.2.0 + */ +public interface ILikeMsg extends IMsg { + + /** + * 粉丝牌名称 + */ + default String getBadgeName(){ + return ""; + } + + /** + * 粉丝牌等级 + */ + default byte getBadgeLevel(){ + return 0; + } + + /** + * 点赞者id + */ + String getUid(); + + /** + * 点赞者用户名 + */ + String getUsername(); + + /** + * 点赞者头像地址 + */ + default String getUserAvatar() { + return null; + } + + /** + * 点赞数 + */ + default int getClickCount() { + return 1; + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILiveStatusChangeMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILiveStatusChangeMsg.java new file mode 100644 index 0000000..de8129d --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILiveStatusChangeMsg.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +import tech.ordinaryroad.live.chat.client.commons.base.constant.LiveStatusAction; + +/** + * 直播状态变化消息 + * + * @author mjz + * @date 2024/3/10 + */ +public interface ILiveStatusChangeMsg extends IMsg { + + /** + * 状态变化 + */ + LiveStatusAction getLiveStatusAction(); + +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IMsg.java new file mode 100644 index 0000000..c02a336 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +import java.io.Serializable; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IMsg extends Serializable { +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IRoomStatsMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IRoomStatsMsg.java new file mode 100644 index 0000000..1d148c7 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IRoomStatsMsg.java @@ -0,0 +1,55 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * 房间统计消息 + * + * @author mjz + * @date 2024/4/23 + */ +public interface IRoomStatsMsg extends IMsg { + + /** + * 获取累计点赞数 + */ + default String getLikedCount() { + return null; + } + + /** + * 获取当前观看人数 + */ + default String getWatchingCount() { + return null; + } + + /** + * 获取累计观看人数 + */ + default String getWatchedCount() { + return null; + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ISuperChatMsg.java b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ISuperChatMsg.java new file mode 100644 index 0000000..58c9491 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ISuperChatMsg.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * 醒目留言 + * + * @author mjz + * @date 2023/9/22 + */ +public interface ISuperChatMsg extends IDanmuMsg { + + /** + * 醒目留言持续时间,单位秒 + */ + int getDuration(); + + @Override + default String getBadgeName() { + return ""; + } + + @Override + default byte getBadgeLevel() { + return 0; + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-client/pom.xml b/live-chat-client-commons/live-chat-client-commons-client/pom.xml new file mode 100644 index 0000000..3f2166e --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-client/pom.xml @@ -0,0 +1,53 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-client-commons + 0.7.0 + + jar + + live-chat-client-commons-client + live-chat-client-commons-client + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-commons-base + + + + tech.ordinaryroad + live-chat-client-commons-util + + + diff --git a/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/BaseLiveChatClient.java b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/BaseLiveChatClient.java new file mode 100644 index 0000000..90c01d4 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/BaseLiveChatClient.java @@ -0,0 +1,223 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client; + +import lombok.Getter; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.client.config.BaseLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.commons.client.listener.IClientStatusChangeListener; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/8/26 + */ +public abstract class BaseLiveChatClient< + Config extends BaseLiveChatClientConfig, + MsgListener extends IBaseMsgListener + > implements IBaseLiveChatClient { + + private final Config config; + private volatile ClientStatusEnums status = ClientStatusEnums.NEW; + protected PropertyChangeSupport statusChangeSupport = new PropertyChangeSupport(status); + protected volatile boolean cancelReconnect = false; + @Getter + private final List msgListeners = Collections.synchronizedList(new ArrayList<>()); + + protected BaseLiveChatClient(Config config) { + this.config = config; + + // 触发setter + this.config.setSocks5ProxyHost(this.config.getSocks5ProxyHost()); + this.config.setSocks5ProxyPort(this.config.getSocks5ProxyPort()); + this.config.setSocks5ProxyUsername(this.config.getSocks5ProxyUsername()); + this.config.setSocks5ProxyPassword(this.config.getSocks5ProxyPassword()); + } + + public Config getConfig() { + return config; + } + + @Override + public void connect(Runnable success) { + this.connect(success, null); + } + + @Override + public void connect() { + this.connect(null, null); + } + + @Override + public void disconnect(boolean cancelReconnect) { + this.cancelReconnect = cancelReconnect; + this.disconnect(); + } + + @Override + public void send(Object msg) { + this.send(msg, null, null); + } + + @Override + public void send(Object msg, Runnable success) { + this.send(msg, success, null); + } + + @Override + public void send(Object msg, Consumer failed) { + this.send(msg, null, failed); + } + + @Override + public void sendDanmu(Object danmu) { + this.sendDanmu(danmu, null, null); + } + + @Override + public void sendDanmu(Object danmu, Runnable success) { + this.sendDanmu(danmu, success, null); + } + + @Override + public void sendDanmu(Object danmu, Consumer failed) { + this.sendDanmu(danmu, null, failed); + } + + @Override + public void clickLike(int count) { + this.clickLike(count, null, null); + } + + @Override + public void clickLike(int count, Runnable success) { + this.clickLike(count, success, null); + } + + @Override + public void clickLike(int count, Consumer failed) { + this.clickLike(count, null, failed); + } + + protected abstract void tryReconnect(); + + protected abstract String getWebSocketUriString(); + + /** + * 判断是否处于某个状态,或者处于后续状态 + * + * @param status {@link ClientStatusEnums} + * @return false: 还没有到达该状态 + */ + protected boolean checkStatus(ClientStatusEnums status) { + return this.status.getCode() >= Objects.requireNonNull(status).getCode(); + } + + protected void setStatus(ClientStatusEnums status) { + ClientStatusEnums oldStatus = this.status; + if (oldStatus != status) { + this.status = status; + this.statusChangeSupport.firePropertyChange("status", oldStatus, status); + } + } + + @Override + public ClientStatusEnums getStatus() { + return this.status; + } + + @Override + public void addStatusChangeListener(IClientStatusChangeListener listener) { + this.statusChangeSupport.addPropertyChangeListener(listener); + } + + @Override + public void removeStatusChangeListener(IClientStatusChangeListener listener) { + this.statusChangeSupport.removePropertyChangeListener(listener); + } + + @Override + public void destroy() { + for (PropertyChangeListener propertyChangeListener : this.statusChangeSupport.getPropertyChangeListeners()) { + this.statusChangeSupport.removePropertyChangeListener(propertyChangeListener); + } + this.msgListeners.clear(); + } + + @Override + public boolean addMsgListener(MsgListener msgListener) { + if (msgListener == null) { + return false; + } + return this.msgListeners.add(msgListener); + } + + @Override + public boolean addMsgListeners(List msgListeners) { + if (msgListeners == null || msgListeners.isEmpty()) { + return false; + } + return this.msgListeners.addAll(msgListeners); + } + + @Override + public boolean removeMsgListener(MsgListener msgListener) { + if (msgListener == null) { + return false; + } + return this.msgListeners.remove(msgListener); + } + + @Override + public boolean removeMsgListeners(List msgListeners) { + if (msgListeners == null || msgListeners.isEmpty()) { + return false; + } + return this.msgListeners.removeAll(msgListeners); + } + + @Override + public void removeAllMsgListeners() { + this.msgListeners.clear(); + } + + @SuppressWarnings("ForLoopReplaceableByForEach") + public void iteratorMsgListeners(Consumer consumer) { + if (msgListeners.isEmpty()) { + return; + } + for (int i = 0; i < msgListeners.size(); i++) { + consumer.accept(msgListeners.get(i)); + } + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/IBaseLiveChatClient.java b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/IBaseLiveChatClient.java new file mode 100644 index 0000000..2a8fa5b --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/IBaseLiveChatClient.java @@ -0,0 +1,153 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.commons.client.listener.IClientStatusChangeListener; + +import java.util.List; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/9/5 + */ +public interface IBaseLiveChatClient> { + + void init(); + + boolean addMsgListener(MsgListener msgListener); + + boolean addMsgListeners(List msgListeners); + + boolean removeMsgListener(MsgListener msgListener); + + boolean removeMsgListeners(List msgListeners); + + void removeAllMsgListeners(); + + void connect(Runnable success, Consumer failed); + + void connect(Runnable success); + + void connect(); + + /** + * 手动断开连接 + * + * @param cancelReconnect 取消本次的自动重连(如果启用自动重连) + */ + void disconnect(boolean cancelReconnect); + + void disconnect(); + + void destroy(); + + void send(Object msg); + + void send(Object msg, Runnable success, Consumer failed); + + void send(Object msg, Runnable success); + + void send(Object msg, Consumer failed); + + /** + * 发送弹幕 + * + * @param danmu 弹幕内容 + * @since 0.0.6 + */ + void sendDanmu(Object danmu); + + /** + * 发送弹幕 + * + * @param danmu 弹幕内容 + * @since 0.0.6 + */ + void sendDanmu(Object danmu, Runnable success, Consumer failed); + + /** + * 发送弹幕 + * + * @param danmu 弹幕内容 + * @since 0.0.6 + */ + void sendDanmu(Object danmu, Runnable success); + + /** + * 发送弹幕 + * + * @param danmu 弹幕内容 + * @since 0.0.6 + */ + void sendDanmu(Object danmu, Consumer failed); + + /** + * 为直播间点赞 + * + * @since 0.2.0 + */ + void clickLike(int count); + + /** + * 为直播间点赞 + * + * @since 0.2.0 + */ + void clickLike(int count, Runnable success, Consumer failed); + + /** + * 为直播间点赞 + * + * @since 0.2.0 + */ + void clickLike(int count, Runnable success); + + /** + * 为直播间点赞 + * + * @since 0.2.0 + */ + void clickLike(int count, Consumer failed); + + /** + * 获取当前状态 + * + * @return {@link ClientStatusEnums} + */ + ClientStatusEnums getStatus(); + + /** + * 添加状态变化监听器 + */ + void addStatusChangeListener(IClientStatusChangeListener listener); + + /** + * 移除状态变化监听器 + */ + void removeStatusChangeListener(IClientStatusChangeListener listener); +} diff --git a/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/config/BaseLiveChatClientConfig.java b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/config/BaseLiveChatClientConfig.java new file mode 100644 index 0000000..6b83028 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/config/BaseLiveChatClientConfig.java @@ -0,0 +1,243 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client.config; + + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatHttpUtil; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; + +/** + * 直播间弹幕客户端配置 + * + * @author mjz + * @date 2023/8/26 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public abstract class BaseLiveChatClientConfig { + + protected final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this); + public static final long DEFAULT_HEARTBEAT_INITIAL_DELAY = 15; + public static final long DEFAULT_HEARTBEAT_PERIOD = 25; + public static final long DEFAULT_MIN_SEND_DANMU_PERIOD = 3000L; + /** + * 默认WebSocket握手超时时间 + */ + public static final long DEFAULT_HANDSHAKE_TIMEOUT_MILLIS = 5 * 1000L; + + private String websocketUri; + + /** + * 消息转发地址,WebSocket Server地址 + */ + private String forwardWebsocketUri; + + /** + * 浏览器中的Cookie + */ + private String cookie; + + /** + * 直播间id + */ + private Object roomId; + + /** + * 是否启用自动重连 + */ + @Builder.Default + private boolean autoReconnect = Boolean.TRUE; + + /** + * 重试延迟时间(秒),默认5s后重试 + */ + @Builder.Default + private int reconnectDelay = 5; + + /** + * 首次发送心跳包的延迟时间(秒) + */ + @Builder.Default + private long heartbeatInitialDelay = DEFAULT_HEARTBEAT_INITIAL_DELAY; + + /** + * 心跳包发送周期(秒) + */ + @Builder.Default + private long heartbeatPeriod = DEFAULT_HEARTBEAT_PERIOD; + + /** + * 最小发送弹幕时间间隔(毫秒) + */ + @Builder.Default + private long minSendDanmuPeriod = DEFAULT_MIN_SEND_DANMU_PERIOD; + + /** + * 握手超时时间(毫秒) + */ + @Builder.Default + private long handshakeTimeoutMillis = DEFAULT_HANDSHAKE_TIMEOUT_MILLIS; + + /** + * Socks5代理——地址 + */ + private String socks5ProxyHost; + + /** + * Socks5代理——端口 + */ + private int socks5ProxyPort; + + /** + * Socks5代理——用户名 + */ + private String socks5ProxyUsername; + + /** + * Socks5代理——密码 + */ + private String socks5ProxyPassword; + + public void setWebsocketUri(String websocketUri) { + String oldValue = this.websocketUri; + this.websocketUri = websocketUri; + this.propertyChangeSupport.firePropertyChange("websocketUri", oldValue, websocketUri); + } + + public void setForwardWebsocketUri(String forwardWebsocketUri) { + String oldValue = this.forwardWebsocketUri; + this.forwardWebsocketUri = forwardWebsocketUri; + this.propertyChangeSupport.firePropertyChange("forwardWebsocketUri", oldValue, forwardWebsocketUri); + } + + public void setCookie(String cookie) { + String oldValue = this.cookie; + this.cookie = cookie; + this.propertyChangeSupport.firePropertyChange("cookie", oldValue, cookie); + } + + public void setRoomId(Object roomId) { + if (!(roomId instanceof Number || roomId instanceof String)) { + throw new BaseException("房间ID仅支持数字或字符串,所传参数类型:" + roomId.getClass() + "值:" + roomId); + } + Object oldValue = this.roomId; + this.roomId = roomId; + this.propertyChangeSupport.firePropertyChange("roomId", oldValue, roomId); + } + + public void setAutoReconnect(boolean autoReconnect) { + boolean oldValue = this.autoReconnect; + this.autoReconnect = autoReconnect; + this.propertyChangeSupport.firePropertyChange("autoReconnect", oldValue, autoReconnect); + } + + public void setReconnectDelay(int reconnectDelay) { + int oldValue = this.reconnectDelay; + this.reconnectDelay = reconnectDelay; + this.propertyChangeSupport.firePropertyChange("reconnectDelay", oldValue, reconnectDelay); + } + + public void setHeartbeatInitialDelay(long heartbeatInitialDelay) { + long oldValue = this.heartbeatInitialDelay; + this.heartbeatInitialDelay = heartbeatInitialDelay; + this.propertyChangeSupport.firePropertyChange("heartbeatInitialDelay", oldValue, heartbeatInitialDelay); + } + + public void setHeartbeatPeriod(long heartbeatPeriod) { + long oldValue = this.heartbeatPeriod; + this.heartbeatPeriod = heartbeatPeriod; + this.propertyChangeSupport.firePropertyChange("heartbeatPeriod", oldValue, heartbeatPeriod); + } + + public void setMinSendDanmuPeriod(long minSendDanmuPeriod) { + long oldValue = this.minSendDanmuPeriod; + this.minSendDanmuPeriod = minSendDanmuPeriod; + this.propertyChangeSupport.firePropertyChange("minSendDanmuPeriod", oldValue, minSendDanmuPeriod); + } + + public void setHandshakeTimeoutMillis(long handshakeTimeoutMillis) { + long oldValue = this.handshakeTimeoutMillis; + this.handshakeTimeoutMillis = handshakeTimeoutMillis; + this.propertyChangeSupport.firePropertyChange("handshakeTimeoutMillis", oldValue, handshakeTimeoutMillis); + } + + public void setSocks5ProxyHost(String socks5ProxyHost) { + String oldValue = this.socks5ProxyHost; + this.socks5ProxyHost = socks5ProxyHost; + this.propertyChangeSupport.firePropertyChange("socks5ProxyHost", oldValue, socks5ProxyHost); + + OrLiveChatHttpUtil.updateProxyHost(socks5ProxyHost); + } + + public void setSocks5ProxyPort(int socks5ProxyPort) { + int oldValue = this.socks5ProxyPort; + this.socks5ProxyPort = socks5ProxyPort; + this.propertyChangeSupport.firePropertyChange("socks5ProxyPort", oldValue, socks5ProxyPort); + + OrLiveChatHttpUtil.updateProxyPort(socks5ProxyPort); + } + + public void setSocks5ProxyUsername(String socks5ProxyUsername) { + String oldValue = this.socks5ProxyUsername; + this.socks5ProxyUsername = socks5ProxyUsername; + this.propertyChangeSupport.firePropertyChange("socks5ProxyUsername", oldValue, socks5ProxyUsername); + + OrLiveChatHttpUtil.updateProxyUsername(socks5ProxyUsername); + } + + public void setSocks5ProxyPassword(String socks5ProxyPassword) { + String oldValue = this.socks5ProxyPassword; + this.socks5ProxyPassword = socks5ProxyPassword; + this.propertyChangeSupport.firePropertyChange("socks5ProxyPassword", oldValue, socks5ProxyPassword); + + OrLiveChatHttpUtil.updateProxyPassword(socks5ProxyPassword); + } + + public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) { + this.propertyChangeSupport.addPropertyChangeListener(propertyName, listener); + } + + public void addPropertyChangeListener(PropertyChangeListener listener) { + this.propertyChangeSupport.addPropertyChangeListener(listener); + } + + public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) { + this.propertyChangeSupport.removePropertyChangeListener(propertyName, listener); + } + + public void removePropertyChangeListener(PropertyChangeListener listener) { + this.propertyChangeSupport.removePropertyChangeListener(listener); + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/enums/ClientStatusEnums.java b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/enums/ClientStatusEnums.java new file mode 100644 index 0000000..29d2c75 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/enums/ClientStatusEnums.java @@ -0,0 +1,83 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client.enums; + +/** + * @author mjz + * @date 2023/8/26 + */ +public enum ClientStatusEnums { + /** + * 新创建 + */ + NEW(0), + + /** + * 已初始化 + */ + INITIALIZED(1), + + /** + * 连接中 + */ + CONNECTING(100), + + /** + * 重新连接中 + */ + RECONNECTING(101), + + /** + * 已连接 + */ + CONNECTED(200), + + /** + * 连接失败 + */ + CONNECT_FAILED(401), + + /** + * 已断开连接 + */ + DISCONNECTED(400), + + /** + * 已销毁 + */ + DESTROYED(-1), + ; + + public int getCode() { + return code; + } + + ClientStatusEnums(int order) { + this.code = order; + } + + private final int code; + +} diff --git a/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/listener/IClientStatusChangeListener.java b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/listener/IClientStatusChangeListener.java new file mode 100644 index 0000000..63f4a1c --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/listener/IClientStatusChangeListener.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client.listener; + +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +/** + * 客户端状态变化Listener + * + * @author mjz + * @date 2024/3/6 + * @since 0.2.2 + */ +public interface IClientStatusChangeListener extends PropertyChangeListener { + + @Override + default void propertyChange(PropertyChangeEvent evt) { + this.onStatusChange(evt, (ClientStatusEnums) evt.getOldValue(), (ClientStatusEnums) evt.getNewValue()); + } + + void onStatusChange(PropertyChangeEvent evt, ClientStatusEnums oldStatus, ClientStatusEnums newStatus); +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/pom.xml b/live-chat-client-commons/live-chat-client-commons-util/pom.xml new file mode 100644 index 0000000..cdb0894 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/pom.xml @@ -0,0 +1,34 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client-commons + 0.7.0 + + jar + + live-chat-client-commons-util + live-chat-client-commons-util + + + UTF-8 + + + + + com.fasterxml.jackson.core + jackson-databind + + + + com.google.protobuf + protobuf-java + + + + cn.hutool + hutool-all + + + diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrJacksonUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrJacksonUtil.java new file mode 100644 index 0000000..86dbdd1 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrJacksonUtil.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +/** + * @author mjz + * @date 2024/4/25 + */ +public class OrJacksonUtil extends ObjectMapper { + + private static final OrJacksonUtil INSTANCE = new OrJacksonUtil() {{ + configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + }}; + + public static OrJacksonUtil getInstance() { + return INSTANCE; + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCollUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCollUtil.java new file mode 100644 index 0000000..42e0b29 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCollUtil.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.RandomUtil; + +import java.util.List; + +/** + * @author mjz + * @date 2024/3/25 + */ +public class OrLiveChatCollUtil extends CollUtil { + public static T getRandom(List list) { + return CollUtil.get(list, RandomUtil.randomInt(CollUtil.size(list))); + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCookieUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCookieUtil.java new file mode 100644 index 0000000..1d2fff9 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCookieUtil.java @@ -0,0 +1,99 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.StrUtil; + +import java.net.HttpCookie; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +/** + * @author mjz + * @date 2023/8/27 + */ +public class OrLiveChatCookieUtil { + + public static String toString(List cookies) { + if (CollUtil.isEmpty(cookies)) { + return StrUtil.EMPTY; + } + + return cookies.stream().map(httpCookie -> { + httpCookie.setVersion(0); + return httpCookie.toString(); + }).collect(Collectors.joining("; ")); + } + + public static Map parseCookieString(String cookies) { + Map map = new HashMap<>(); + if (StrUtil.isNotBlank(cookies) && !StrUtil.isNullOrUndefined(cookies)) { + try { + String[] split = cookies.split("; "); + for (String s : split) { + String[] split1 = s.split("="); + map.put(split1[0], split1[1]); + } + } catch (Exception e) { + throw new RuntimeException("cookie解析失败 " + cookies, e); + } + } + return map; + } + + public static String toCookieString(Map cookies) { + if (cookies.isEmpty()) { + return null; + } + + StringBuilder sb = new StringBuilder(); + for (Map.Entry stringStringEntry : cookies.entrySet()) { + String key = stringStringEntry.getKey(); + String value = stringStringEntry.getValue(); + sb.append(key) + .append("=") + .append(value) + .append("; "); + } + int length = sb.length(); + sb.delete(length - 2, length); + return sb.toString(); + } + + public static String getCookieByName(Map cookieMap, String name, Supplier supplier) { + String str = MapUtil.getStr(cookieMap, name); + return str == null ? supplier.get() : str; + } + + public static String getCookieByName(String cookie, String name, Supplier supplier) { + String str = MapUtil.getStr(parseCookieString(cookie), name); + return str == null ? supplier.get() : str; + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatHttpUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatHttpUtil.java new file mode 100644 index 0000000..b55d5ec --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatHttpUtil.java @@ -0,0 +1,102 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.net.InetSocketAddress; +import java.net.Proxy; + +/** + * @author mjz + * @date 2024/3/20 + */ +public class OrLiveChatHttpUtil extends HttpUtil { + + public static final String USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"; + private static final ProxyProperties PROXY_PROPERTIES = new ProxyProperties(); + + static { + GlobalHeaders.INSTANCE.header(Header.USER_AGENT, USER_AGENT); + } + + public static void updateProxyHost(String host) { + PROXY_PROPERTIES.setHost(host); + } + + public static void updateProxyPort(int port) { + PROXY_PROPERTIES.setPort(port); + } + + public static void updateProxyUsername(String username) { + PROXY_PROPERTIES.setUsername(username); + } + + public static void updateProxyPassword(String password) { + PROXY_PROPERTIES.setPassword(password); + } + + public static HttpRequest createRequest(Method method, String url) { + return setRequestSocks5Proxy(HttpUtil.createRequest(method, url)); + } + + public static HttpRequest createGet(String url, boolean isFollowRedirects) { + return setRequestSocks5Proxy(HttpUtil.createGet(url, isFollowRedirects)); + } + + public static HttpRequest createGet(String url) { + return setRequestSocks5Proxy(HttpUtil.createGet(url)); + } + + public static HttpRequest createPost(String url) { + return setRequestSocks5Proxy(HttpUtil.createPost(url)); + } + + public static HttpRequest setRequestSocks5Proxy(HttpRequest request) { + String host = PROXY_PROPERTIES.getHost(); + if (StrUtil.isNotBlank(host)) { + request.setProxy(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(host, PROXY_PROPERTIES.getPort()))); + String username = PROXY_PROPERTIES.getUsername(); + if (StrUtil.isNotBlank(username)) { + request.basicProxyAuth(username, PROXY_PROPERTIES.getPassword()); + } + } + return request; + } + + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class ProxyProperties { + private String host; + private int port; + private String username; + private String password; + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatLocalDateTimeUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatLocalDateTimeUtil.java new file mode 100644 index 0000000..cac9046 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatLocalDateTimeUtil.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.date.LocalDateTimeUtil; + +import java.time.ZoneId; +import java.time.ZonedDateTime; + +/** + * @author mjz + * @date 2023/9/7 + */ +public class OrLiveChatLocalDateTimeUtil extends LocalDateTimeUtil { + + public static ZoneId ZONE_ID_CTT = ZoneId.of(ZoneId.SHORT_IDS.get("CTT")); + + /** + * 获取中国标准时间的当前时间戳(毫秒) + */ + public static long zonedCurrentTimeMillis() { + ZonedDateTime now = ZonedDateTime.now(ZONE_ID_CTT); + return now.toEpochSecond() * 1000 + now.getNano() / 1_000_000; + } + + /** + * 获取中国标准时间的当前时间戳(秒) + */ + public static long zonedCurrentTimeSecs() { + return ZonedDateTime.now(ZONE_ID_CTT).toEpochSecond(); + } +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatNumberUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatNumberUtil.java new file mode 100644 index 0000000..969cf00 --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatNumberUtil.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; + +/** + * @author mjz + * @date 2023/12/2 + */ +public class OrLiveChatNumberUtil extends NumberUtil { + + public static long parseLong(Object object){ + return NumberUtil.parseLong(StrUtil.toStringOrNull(object)); + } + +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatReflectUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatReflectUtil.java new file mode 100644 index 0000000..a4d8a5d --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatReflectUtil.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.util.ReflectUtil; + +import java.lang.reflect.Method; + +/** + * @author mjz + * @date 2023/8/28 + */ +public class OrLiveChatReflectUtil extends ReflectUtil { + + public static Method getGetterMethod(Class objectClass, String key) { + Method method; + if (key.startsWith("is")) { + method = ReflectUtil.getMethodByNameIgnoreCase(objectClass, key); + if (method == null) { + ReflectUtil.getMethodByNameIgnoreCase(objectClass, "get" + key); + } + } else { + method = ReflectUtil.getMethodByNameIgnoreCase(objectClass, "get" + key); + } + return method; + } + +} diff --git a/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatUrlUtil.java b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatUrlUtil.java new file mode 100644 index 0000000..1c27f1a --- /dev/null +++ b/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatUrlUtil.java @@ -0,0 +1,81 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.URLUtil; + +import java.util.function.Function; + +/** + * @author mjz + * @date 2024/3/25 + */ +public class OrLiveChatUrlUtil extends URLUtil { + + /** + * 匹配地址Scheme,${scheme}://xxxxxxxxx + */ + private static final String PATTERN_URI_SCHEME = "([a-zA-Z]+):\\/\\/"; + /** + * 匹配地址Port,scheme://xxxxxxxxx:${port}/123 + */ + private static final String PATTERN_URI_PORT = "[a-zA-Z]+:\\/\\/.+:([0-9]+)"; + + public static String getScheme(String location) { + return ReUtil.getGroup1(PATTERN_URI_SCHEME, location); + } + + public static int getPort(String location, Function defaultPortSupplier) { + int port = -1; + int i = NumberUtil.parseInt(ReUtil.getGroup1(PATTERN_URI_PORT, location)); + if (i > 0) { + port = i; + } else { + if (defaultPortSupplier != null) { + port = defaultPortSupplier.apply(location); + } + } + return port; + } + + public static int getPort(String location) { + return getPort(location, null); + } + + public static int getWebSocketUriPort(String location) { + return getPort(location, (string) -> { + String scheme = getScheme(location); + if ("wss".equalsIgnoreCase(scheme)) { + return 443; + } else if ("ws".equalsIgnoreCase(scheme)) { + return 80; + } else { + return -1; + } + }); + } +} diff --git a/live-chat-client-commons/pom.xml b/live-chat-client-commons/pom.xml new file mode 100644 index 0000000..beacfcd --- /dev/null +++ b/live-chat-client-commons/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-client + 0.7.0 + + pom + + live-chat-client-commons + ordinaryroad-live-chat-client-commons + + + live-chat-client-commons-base + live-chat-client-commons-util + live-chat-client-commons-client + + diff --git a/live-chat-client-examples/.gitignore b/live-chat-client-examples/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/live-chat-client-examples/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/live-chat-client-examples/.mvn/wrapper/maven-wrapper.jar b/live-chat-client-examples/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..cb28b0e Binary files /dev/null and b/live-chat-client-examples/.mvn/wrapper/maven-wrapper.jar differ diff --git a/live-chat-client-examples/.mvn/wrapper/maven-wrapper.properties b/live-chat-client-examples/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..e66aa14 --- /dev/null +++ b/live-chat-client-examples/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,26 @@ +# +# MIT License +# +# Copyright (c) 2023 OrdinaryRoad +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/live-chat-client-examples/client-example/.gitignore b/live-chat-client-examples/client-example/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/live-chat-client-examples/client-example/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/live-chat-client-examples/client-example/README.md b/live-chat-client-examples/client-example/README.md new file mode 100644 index 0000000..fc34319 --- /dev/null +++ b/live-chat-client-examples/client-example/README.md @@ -0,0 +1,66 @@ +# client-example + +## 1 配置 + +```yaml +spring: + application: + name: ordinaryroad-live-chat-client-example +tech: + ordinaryroad: + live: + chat: + client: + example: + client: + config: + bilibili: + # TODO 直播间id + roomId: 7777 + # TODO 浏览器Cookie + cookie: ${bilibiliCookie:} + douyu: + # TODO 直播间id + roomId: 74751 + # TODO 浏览器Cookie + cookie: ${douyuCookie:} +``` + +## 2 LiveChatClientController + +> 连接 +> http://localhost:8080/client/connect?platform=bilibili +> http://localhost:8080/client/connect?platform=douyu + +> 断开链接 +> http://localhost:8080/client/disconnect/false?platform=bilibili +> http://localhost:8080/client/disconnect/false?platform=douyu +> +> 断开链接(取消此次的自动重连) +> http://localhost:8080/client/disconnect/true?platform=bilibili +> http://localhost:8080/client/disconnect/true?platform=douyu + +> 修改房间id +> http://localhost:8080/client/roomId/{roomId}?platform=bilibili +> http://localhost:8080/client/roomId/{roomId}?platform=douyu + +> 禁用自动重新连接 +> http://localhost:8080/client/autoReconnect/false?platform=bilibili +> http://localhost:8080/client/autoReconnect/false?platform=douyu +> +> 启用自动重新连接 +> http://localhost:8080/client/autoReconnect/true?platform=bilibili +> http://localhost:8080/client/autoReconnect/true?platform=douyu + +> 更新cookie(清空) +> http://localhost:8080/client/cookie?cookie=&platform=bilibili +> http://localhost:8080/client/cookie?cookie=&platform=douyu + +> 发送弹幕“666666“+一位随机数 +> http://localhost:8080/client/sendDanmu/666666?platform=douyu +> http://localhost:8080/client/sendDanmu/666666?platform=bilibili + +## 支持同时监听多个直播间 + +> http://localhost:8080/client/multiply/newClientAndStart/7777?platform=bilibili +> http://localhost:8080/client/multiply/newClientAndStart/6?platform=bilibili diff --git a/live-chat-client-examples/client-example/pom.xml b/live-chat-client-examples/client-example/pom.xml new file mode 100644 index 0000000..1df4291 --- /dev/null +++ b/live-chat-client-examples/client-example/pom.xml @@ -0,0 +1,107 @@ + + + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.1.2 + + + jar + tech.ordinaryroad + live-chat-client-example-client + 0.7.0 + live-chat-client-example-client + live-chat-client-example-client + + + 17 + + + + + tech.ordinaryroad + live-chat-client-bilibili + + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-douyu + + 0.7.0 + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + + + ordinaryroad-bilibili-live-chat-example-client + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/LiveChatExampleApplication.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/LiveChatExampleApplication.java new file mode 100644 index 0000000..83bee78 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/LiveChatExampleApplication.java @@ -0,0 +1,59 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client; + +import jakarta.annotation.PreDestroy; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.util.StopWatch; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.client.DouyuLiveChatClient; + +@Slf4j +@SpringBootApplication +public class LiveChatExampleApplication { + + @Resource + private BilibiliLiveChatClient bilibiliLiveChatClient; + @Resource + private DouyuLiveChatClient douyuLiveChatClient; + + public static void main(String[] args) { + StopWatch stopWatch = new StopWatch(); + stopWatch.start("run"); + SpringApplication.run(LiveChatExampleApplication.class, args); + stopWatch.stop(); + log.info("run end! {}", stopWatch.prettyPrint()); + } + + @PreDestroy + public void preDestroy() { + douyuLiveChatClient.destroy(); + bilibiliLiveChatClient.destroy(); + } + +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/BilibiliConnectionListener.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/BilibiliConnectionListener.java new file mode 100644 index 0000000..49349a0 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/BilibiliConnectionListener.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.config; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliConnectionListener; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliConnectionHandler; + +/** + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@Service +public class BilibiliConnectionListener implements IBilibiliConnectionListener { + + @Override + public void onConnected(BilibiliConnectionHandler connectionHandler) { + log.info("bilibili {} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(BilibiliConnectionHandler connectionHandler) { + log.info("bilibili {} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(BilibiliConnectionHandler connectionHandler) { + log.info("bilibili {} onDisconnected", connectionHandler.getRoomId()); + } +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/BilibiliMsgListener.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/BilibiliMsgListener.java new file mode 100644 index 0000000..09c7b22 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/BilibiliMsgListener.java @@ -0,0 +1,112 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.config; + +import com.fasterxml.jackson.databind.JsonNode; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@Service +public class BilibiliMsgListener implements IBilibiliMsgListener { + + @Override + public void onDanmuMsg(BilibiliBinaryFrameHandler binaryFrameHandler, DanmuMsgMsg msg) { + IBilibiliMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + log.info("{} 收到弹幕 {} {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SendGiftMsg msg) { + IBilibiliMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + log.info("{} 收到礼物 {} {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getData().getAction(), msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onSuperChatMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SuperChatMessageMsg msg) { + IBilibiliMsgListener.super.onSuperChatMsg(binaryFrameHandler, msg); + log.info("{} 收到醒目留言 {}({}):{}", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onEnterRoomMsg(InteractWordMsg msg) { + log.info("{} {}({}) 进入直播间", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onLikeMsg(BilibiliBinaryFrameHandler binaryFrameHandler, LikeInfoV3ClickMsg msg) { + IBilibiliMsgListener.super.onLikeMsg(binaryFrameHandler, msg); + log.info("{} 收到点赞 [{}] {}({})x{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getClickCount()); + } + + @Override + public void onLiveStatusMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliLiveStatusChangeMsg msg) { + IBilibiliMsgListener.super.onLiveStatusMsg(binaryFrameHandler, msg); + log.info("{} 状态变化 {}", binaryFrameHandler.getRoomId(), msg.getLiveStatusAction()); + } + + @Override + public void onRoomStatsMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliRoomStatsMsg msg) { + IBilibiliMsgListener.super.onRoomStatsMsg(binaryFrameHandler, msg); + log.info("{} 统计信息 累计点赞数: {}, 当前观看人数: {}, 累计观看人数: {}", binaryFrameHandler.getRoomId(), msg.getLikedCount(), msg.getWatchingCount(), msg.getWatchedCount()); + } + + @Override + public void onEntryEffect(BilibiliBinaryFrameHandler binaryFrameHandler, MessageMsg msg) { + JsonNode data = msg.getData(); + String copyWriting = data.get("copy_writing").asText(); + log.info("入场效果 {}", copyWriting); + } + + @Override + public void onMsg(IMsg msg) { + log.debug("收到{}消息 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + log.debug("收到CMD消息{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + log.info("收到其他CMD消息 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.info("收到未知CMD消息 {}", cmdString); + } +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/DouyuConnectionListener.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/DouyuConnectionListener.java new file mode 100644 index 0000000..2af72c4 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/DouyuConnectionListener.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.config; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +/** + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@Service +public class DouyuConnectionListener implements IDouyuConnectionListener { + + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + log.info("douyu {} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + log.info("douyu {} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + log.info("douyu {} onDisconnected", connectionHandler.getRoomId()); + } +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/DouyuMsgListener.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/DouyuMsgListener.java new file mode 100644 index 0000000..eb48260 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/DouyuMsgListener.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.config; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Service; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; + +/** + * @author mjz + * @date 2023/9/3 + */ +@Slf4j +@Primary +@Service +public class DouyuMsgListener implements IDouyuMsgListener { + + @Override + public void onDanmuMsg(DouyuBinaryFrameHandler binaryFrameHandler, ChatmsgMsg msg) { + IDouyuMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + + log.info("{} 收到弹幕 {}({}):{}", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(DouyuBinaryFrameHandler binaryFrameHandler, DgbMsg msg) { + IDouyuMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + + log.info("{} 收到礼物 {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), "赠送", "`礼物名未知`", msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/LiveChatClientConfiguration.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/LiveChatClientConfiguration.java new file mode 100644 index 0000000..e5832d7 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/LiveChatClientConfiguration.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Component; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliConnectionListener; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.client.DouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; + +/** + * @author mjz + * @date 2023/8/21 + */ +@Component +public class LiveChatClientConfiguration { + + private final LiveChatClientConfigurations configurations; + private final IBilibiliMsgListener bilibiliSendSmsReplyMsgListener; + private final IBilibiliConnectionListener bilibiliConnectionListener; + private final IDouyuMsgListener douyuCmdMsgListener; + private final IDouyuConnectionListener douyuConnectionListener; + + public LiveChatClientConfiguration(LiveChatClientConfigurations configurations, IBilibiliMsgListener bilibiliSendSmsReplyMsgListener, IBilibiliConnectionListener bilibiliConnectionListener, IDouyuMsgListener douyuCmdMsgListener, IDouyuConnectionListener douyuConnectionListener) { + this.configurations = configurations; + this.bilibiliSendSmsReplyMsgListener = bilibiliSendSmsReplyMsgListener; + this.bilibiliConnectionListener = bilibiliConnectionListener; + this.douyuCmdMsgListener = douyuCmdMsgListener; + this.douyuConnectionListener = douyuConnectionListener; + } + + @Bean + public BilibiliLiveChatClient bilibiliLiveChatClient() { + return new BilibiliLiveChatClient(configurations.getBilibili(), bilibiliSendSmsReplyMsgListener, bilibiliConnectionListener); + } + + @Bean + public DouyuLiveChatClient douyuLiveChatClient() { + return new DouyuLiveChatClient(configurations.getDouyu(), douyuCmdMsgListener, douyuConnectionListener); + } + +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/LiveChatClientConfigurations.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/LiveChatClientConfigurations.java new file mode 100644 index 0000000..8c3ed87 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/config/LiveChatClientConfigurations.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import tech.ordinaryroad.live.chat.client.bilibili.config.BilibiliLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; + +/** + * @author mjz + * @date 2023/8/21 + */ +@Data +@Configuration +@ConfigurationProperties(prefix = "tech.ordinaryroad.live.chat.client.example.client.config") +public class LiveChatClientConfigurations { + + private BilibiliLiveChatClientConfig bilibili; + + private DouyuLiveChatClientConfig douyu; + +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/controller/LiveChatClientController.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/controller/LiveChatClientController.java new file mode 100644 index 0000000..5cbaa56 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/controller/LiveChatClientController.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.controller; + +import cn.hutool.core.util.RandomUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.Map; + +/** + * @author mjz + * @date 2023/8/21 + */ +@RestController +@RequestMapping("client") +public class LiveChatClientController { + + @Autowired + Map clientMap; + + @GetMapping("connect") + public void connect(@RequestParam String platform) { + getClient(platform).connect(); + } + + @GetMapping("autoReconnect/{autoReconnect}") + public Boolean autoReconnect(@RequestParam String platform, @PathVariable Boolean autoReconnect) { + getClient(platform).getConfig().setAutoReconnect(autoReconnect); + return getClient(platform).getConfig().isAutoReconnect(); + } + + @GetMapping("roomId/{roomId}") + public Object roomId(@RequestParam String platform, @PathVariable String roomId) { + getClient(platform).getConfig().setRoomId(roomId); + return getClient(platform).getConfig().getRoomId(); + } + + @GetMapping("disconnect/{cancelReconnect}") + public void disconnect(@RequestParam String platform, @PathVariable Boolean cancelReconnect) { + getClient(platform).disconnect(cancelReconnect); + } + + @GetMapping("cookie") + public String cookie(@RequestParam String platform, @RequestParam String cookie) { + getClient(platform).getConfig().setCookie(cookie); + return getClient(platform).getConfig().getCookie(); + } + + @GetMapping("sendDanmu/{danmu}") + public void sendDanmu(@RequestParam String platform, @PathVariable String danmu) { + getClient(platform).sendDanmu(danmu + RandomUtil.randomNumbers(1)); + } + + private Client getClient(String platform) { + String key = platform + "LiveChatClient"; + if (!clientMap.containsKey(key)) { + throw new BaseException("暂不支持 " + platform); + } + return (Client) clientMap.get(key); + } +} diff --git a/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/controller/MultiplyLiveChatClientController.java b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/controller/MultiplyLiveChatClientController.java new file mode 100644 index 0000000..0555ab0 --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/java/tech/ordinaryroad/live/chat/client/example/client/controller/MultiplyLiveChatClientController.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client.controller; + +import org.springframework.web.bind.annotation.*; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.bilibili.config.BilibiliLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliConnectionListener; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.client.config.BaseLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.client.DouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +/** + * @author mjz + * @date 2023/8/21 + */ +@RestController +@RequestMapping("client/multiply") +public class MultiplyLiveChatClientController { + + private final IBilibiliMsgListener bilibiliSendSmsReplyMsgListener; + private final IBilibiliConnectionListener bilibiliConnectionListener; + private final IDouyuMsgListener douyuCmdMsgListener; + private final IDouyuConnectionListener douyuConnectionListener; + + public MultiplyLiveChatClientController(IBilibiliMsgListener bilibiliSendSmsReplyMsgListener, IBilibiliConnectionListener bilibiliConnectionListener, IDouyuMsgListener douyuCmdMsgListener, IDouyuConnectionListener douyuConnectionListener) { + this.bilibiliSendSmsReplyMsgListener = bilibiliSendSmsReplyMsgListener; + this.bilibiliConnectionListener = bilibiliConnectionListener; + this.douyuCmdMsgListener = douyuCmdMsgListener; + this.douyuConnectionListener = douyuConnectionListener; + } + + @GetMapping("newClientAndStart/{roomId}") + public void newClientAndStart(@PathVariable Long roomId, @RequestParam String platform) { + BaseLiveChatClientConfig config; + BaseNettyClient client; + switch (platform) { + case "bilibili" -> { + config = BilibiliLiveChatClientConfig.builder() + .roomId(roomId) + .build(); + client = new BilibiliLiveChatClient((BilibiliLiveChatClientConfig) config, bilibiliSendSmsReplyMsgListener, bilibiliConnectionListener); + } + case "douyu" -> { + config = DouyuLiveChatClientConfig.builder() + .roomId(roomId) + .build(); + client = new DouyuLiveChatClient((DouyuLiveChatClientConfig) config, douyuCmdMsgListener, douyuConnectionListener); + } + default -> throw new BaseException("暂不支持 " + platform); + } + client.connect(); + } + +} diff --git a/live-chat-client-examples/client-example/src/main/resources/application.yaml b/live-chat-client-examples/client-example/src/main/resources/application.yaml new file mode 100644 index 0000000..c7e1bdc --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/resources/application.yaml @@ -0,0 +1,25 @@ +spring: + application: + name: ordinaryroad-live-chat-client-example +tech: + ordinaryroad: + live: + chat: + client: + example: + client: + config: + bilibili: + # TODO 直播间id + roomId: 7777 + # TODO 浏览器Cookie + cookie: ${bilibiliCookie:} + douyu: + # TODO 直播间id + roomId: 677287189658 + # TODO 浏览器Cookie + cookie: ttwid=1%7CU6YHr6wKj_WHHXYfelzk5jc7uAg-yN0k2k4yTm1Uo-s%7C1704965821%7Cf48a7874351c69357f4f5f531416c9ad43385f9059fe7c57a5bbb9732b5f5add; store-region-src=uid; live_use_vvc=%22false%22; passport_csrf_token=8be74ec699ab18095dca4f5702e616f9; passport_csrf_token_default=8be74ec699ab18095dca4f5702e616f9; bd_ticket_guard_client_web_domain=2; _bd_ticket_crypt_doamin=2; __security_server_data_status=1; my_rd=2; publish_badge_show_info=%220%2C0%2C0%2C1715773185377%22; FORCE_LOGIN=%7B%22videoConsumedRemainSeconds%22%3A180%2C%22isForcePopClose%22%3A1%7D; download_guide=%221%2F20240515%2F0%22; passport_assist_user=CkEma-J4PbyZ1PsaO0NgtDV0ix8i-emYs6GcjWo70u_js74uDfkcJzWmX6_pf8IejeDrxwQKx5c3qvkuJYJNyh1VjRpKCjyG_uz40OGnwyMQSr_17Q7C7X8G0cYytq9DeL3TUkJwWeunNj8R9ck_SepwNiMgRx9rAQK9Cd5K_Go7yLYQ1K_RDRiJr9ZUIAEiAQNJd57Z; n_mh=s34j-wHGI19PgpjFqspU_k-mXtBS4e7ZeyryxDpKius; sso_uid_tt=d149325629b212c69053783cf715e14e; sso_uid_tt_ss=d149325629b212c69053783cf715e14e; toutiao_sso_user=04e6c7f0eb254990c6b679b709573d97; toutiao_sso_user_ss=04e6c7f0eb254990c6b679b709573d97; sid_ucp_sso_v1=1.0.0-KDc4Njk5MjE4MWIyMjcwZDdiN2FjZDk5NzExNzk3YjFiOWE1ZWExMjQKHwiY4dD5hvStAhD3xZKyBhjvMSAMMP3rm_AFOAZA9AcaAmxxIiAwNGU2YzdmMGViMjU0OTkwYzZiNjc5YjcwOTU3M2Q5Nw; ssid_ucp_sso_v1=1.0.0-KDc4Njk5MjE4MWIyMjcwZDdiN2FjZDk5NzExNzk3YjFiOWE1ZWExMjQKHwiY4dD5hvStAhD3xZKyBhjvMSAMMP3rm_AFOAZA9AcaAmxxIiAwNGU2YzdmMGViMjU0OTkwYzZiNjc5YjcwOTU3M2Q5Nw; passport_auth_status=f3f2fbe505be6e05bcbc18118e5eb692%2C; passport_auth_status_ss=f3f2fbe505be6e05bcbc18118e5eb692%2C; uid_tt=f196860dd05b61a58a1ec04451d11f72; uid_tt_ss=f196860dd05b61a58a1ec04451d11f72; sid_tt=577db87703b1ef657e9d82c129fc8687; sessionid=577db87703b1ef657e9d82c129fc8687; sessionid_ss=577db87703b1ef657e9d82c129fc8687; LOGIN_STATUS=1; _bd_ticket_crypt_cookie=43cd30edba27e0961256c5e3f51149e1; sid_guard=577db87703b1ef657e9d82c129fc8687%7C1715774207%7C5183995%7CSun%2C+14-Jul-2024+11%3A56%3A42+GMT; sid_ucp_v1=1.0.0-KGM3MjhlNGJkMDk4ZWU0NzA4ZGYyMjBjZGE4MzE1NzIzZDBhOTkwOGEKGwiY4dD5hvStAhD_xZKyBhjvMSAMOAZA9AdIBBoCbGYiIDU3N2RiODc3MDNiMWVmNjU3ZTlkODJjMTI5ZmM4Njg3; ssid_ucp_v1=1.0.0-KGM3MjhlNGJkMDk4ZWU0NzA4ZGYyMjBjZGE4MzE1NzIzZDBhOTkwOGEKGwiY4dD5hvStAhD_xZKyBhjvMSAMOAZA9AdIBBoCbGYiIDU3N2RiODc3MDNiMWVmNjU3ZTlkODJjMTI5ZmM4Njg3; stream_recommend_feed_params=%22%7B%5C%22cookie_enabled%5C%22%3Atrue%2C%5C%22screen_width%5C%22%3A1920%2C%5C%22screen_height%5C%22%3A1080%2C%5C%22browser_online%5C%22%3Atrue%2C%5C%22cpu_core_num%5C%22%3A12%2C%5C%22device_memory%5C%22%3A8%2C%5C%22downlink%5C%22%3A10%2C%5C%22effective_type%5C%22%3A%5C%224g%5C%22%2C%5C%22round_trip_time%5C%22%3A50%7D%22; strategyABtestKey=%221715821889.956%22; volume_info=%7B%22isUserMute%22%3Afalse%2C%22isMute%22%3Atrue%2C%22volume%22%3A0.5%7D; store-region=cn-bj; stream_player_status_params=%22%7B%5C%22is_auto_play%5C%22%3A0%2C%5C%22is_full_screen%5C%22%3A0%2C%5C%22is_full_webscreen%5C%22%3A0%2C%5C%22is_mute%5C%22%3A1%2C%5C%22is_speed%5C%22%3A1%2C%5C%22is_visible%5C%22%3A0%7D%22; SEARCH_RESULT_LIST_TYPE=%22single%22; FOLLOW_NUMBER_YELLOW_POINT_INFO=%22MS4wLjABAAAAvEwT2-7B6l8pKDXdn2oF3JI55tETWwC-ggL0L3riB2EOQFSap64K-5-mWT9lAyD3%2F1715875200000%2F0%2F1715821982371%2F0%22; __live_version__=%221.1.2.203%22; webcast_leading_last_show_time=1715822008405; webcast_leading_total_show_times=1; webcast_local_quality=ld; WallpaperGuide=%7B%22showTime%22%3A1715773828584%2C%22closeTime%22%3A0%2C%22showCount%22%3A1%2C%22cursor1%22%3A13%2C%22cursor2%22%3A0%7D; FOLLOW_LIVE_POINT_INFO=%22MS4wLjABAAAAvEwT2-7B6l8pKDXdn2oF3JI55tETWwC-ggL0L3riB2EOQFSap64K-5-mWT9lAyD3%2F1715875200000%2F0%2F1715822900477%2F0%22; home_can_add_dy_2_desktop=%221%22; live_can_add_dy_2_desktop=%221%22; bd_ticket_guard_client_data=eyJiZC10aWNrZXQtZ3VhcmQtdmVyc2lvbiI6MiwiYmQtdGlja2V0LWd1YXJkLWl0ZXJhdGlvbi12ZXJzaW9uIjoxLCJiZC10aWNrZXQtZ3VhcmQtcmVlLXB1YmxpYy1rZXkiOiJCR1NCbXBuQWhMRFg3TERDUVZqZnRDSHJXa1FTNzZNR1ZPcDI4YXB1WmhTd3B0YnArM1NKRCt1b2lZTFFacENDS2JaMEZkaFZUcEtyei9sU0ZzNTlWNUk9IiwiYmQtdGlja2V0LWd1YXJkLXdlYi12ZXJzaW9uIjoxfQ%3D%3D; IsDouyinActive=true; msToken=yRZOjt7h73cFZdfaGdddWjEjrAEKTp4KEmrFjW5VeqT3w95j-VBGeRAyOB5-Q-FjgzxeKIcOAoijkUZyblUWQXy4FBa-qz5EGaPBkqkP5K8pQoD1XnSfHR7SAl25; odin_tt=3133a2f9dc840f7ec09761bc22dc716bc7d5a8d9bb38a22da5e6bf68dbf31083aaf8e600348378dbb8dffcb76e049e71d7f525881f288e6d6ea493398a9defda +logging: + level: + tech.ordinaryroad: INFO + io.netty: INFO \ No newline at end of file diff --git a/live-chat-client-examples/client-example/src/main/resources/banner.txt b/live-chat-client-examples/client-example/src/main/resources/banner.txt new file mode 100644 index 0000000..8afbd2c --- /dev/null +++ b/live-chat-client-examples/client-example/src/main/resources/banner.txt @@ -0,0 +1,10 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} + ____ _ _ _____ _ + / __ \ | (_) | __ \ | | + | | | |_ __ __| |_ _ __ __ _ _ __ _ _| |__) |___ __ _ __| | + | | | | '__/ _` | | '_ \ / _` | '__| | | | _ // _ \ / _` |/ _` | + | |__| | | | (_| | | | | | (_| | | | |_| | | \ \ (_) | (_| | (_| | + \____/|_| \__,_|_|_| |_|\__,_|_| \__, |_| \_\___/ \__,_|\__,_| + __/ | + |___/ \ No newline at end of file diff --git a/live-chat-client-examples/client-example/src/test/java/tech/ordinaryroad/live/chat/client/example/client/LiveChatExampleApplicationTests.java b/live-chat-client-examples/client-example/src/test/java/tech/ordinaryroad/live/chat/client/example/client/LiveChatExampleApplicationTests.java new file mode 100644 index 0000000..40169d5 --- /dev/null +++ b/live-chat-client-examples/client-example/src/test/java/tech/ordinaryroad/live/chat/client/example/client/LiveChatExampleApplicationTests.java @@ -0,0 +1,37 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.client; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class LiveChatExampleApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/live-chat-client-examples/codec-example/pom.xml b/live-chat-client-examples/codec-example/pom.xml new file mode 100644 index 0000000..4608bb6 --- /dev/null +++ b/live-chat-client-examples/codec-example/pom.xml @@ -0,0 +1,86 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-client-examples + 0.7.0 + + jar + + live-chat-client-example-codec + live-chat-client-example-codec + live-chat-client-example-codec + + + 8 + 8 + UTF-8 + 1.18.28 + 3.11.0 + 1.3.14 + 5.10.2 + + + + + org.java-websocket + Java-WebSocket + 1.5.6 + + + + tech.ordinaryroad + live-chat-client-websocket + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-codec-bilibili + 0.7.0 + + + + org.projectlombok + lombok + ${lombok.version} + + + + ch.qos.logback + logback-classic + ${logback-classic.version} + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + + + ordinaryroad-bilibili-live-chat-example-handler + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${maven.compiler.source} + ${maven.compiler.target} + ${project.build.sourceEncoding} + + + org.projectlombok + lombok + ${lombok.version} + + + + + + + diff --git a/live-chat-client-examples/codec-example/src/main/java/tech/ordinaryroad/live/chat/client/example/codec/BilibiliCodecExample.java b/live-chat-client-examples/codec-example/src/main/java/tech/ordinaryroad/live/chat/client/example/codec/BilibiliCodecExample.java new file mode 100644 index 0000000..9867a7f --- /dev/null +++ b/live-chat-client-examples/codec-example/src/main/java/tech/ordinaryroad/live/chat/client/example/codec/BilibiliCodecExample.java @@ -0,0 +1,112 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.codec; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.UserAuthenticationMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.factory.BilibiliMsgFactory; +import tech.ordinaryroad.live.chat.client.codec.bilibili.util.BilibiliCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.IBaseConnectionHandler; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.websocket.listener.IWebSocketMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.msg.WebSocketMsg; +import tech.ordinaryroad.live.chat.client.websocket.netty.handler.WebSocketBinaryFrameHandler; + +import java.util.List; + +/** + * Hello world! + */ +@Slf4j +public class BilibiliCodecExample { + static WebSocketLiveChatClient webSocketLiveChatClient; + static long roomId = 7777; + static ProtoverEnum protoverEnum = ProtoverEnum.NORMAL_BROTLI; + static BilibiliApis.RoomInitResult roomInitResult = BilibiliApis.roomInit(roomId, null); + + public static void main(String[] args) throws Exception { + webSocketLiveChatClient = new WebSocketLiveChatClient( + WebSocketLiveChatClientConfig.builder() + .websocketUri("wss://broadcastlv.chat.bilibili.com:443/sub") + .roomId(roomId) + .build(), + new IBaseConnectionHandler() { + @Override + public void sendHeartbeat(Channel channel) { + HeartbeatMsg heartbeat = BilibiliMsgFactory.getInstance(roomId).createHeartbeat(protoverEnum); + ByteBuf encode = BilibiliCodecUtil.encode(heartbeat); +// channel.writeAndFlush(new BinaryWebSocketFrame(encode)).addListener((ChannelFutureListener) future -> { +// if (future.isSuccess()) { +// log.info("心跳包发送成功"); +// } else { +// log.error("心跳包发送失败", future.cause()); +// } +// }); + // 只有连接成功后才可以发送心跳包,因此可以使用WebSocketLiveChatClient.send方法 + webSocketLiveChatClient.send(new BinaryWebSocketFrame(encode), () -> log.info("心跳包发送成功"), (e) -> log.error("心跳包发送失败", e)); + } + + @Override + public void sendAuthRequest(Channel channel) { + UserAuthenticationMsg auth = BilibiliMsgFactory.getInstance(roomId).createAuth(protoverEnum, roomInitResult); + ByteBuf encode = BilibiliCodecUtil.encode(auth); + channel.writeAndFlush(new BinaryWebSocketFrame(encode)).addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + log.info("认证包发送成功"); + } else { + log.error("认证包发送失败", future.cause()); + } + }); + } + }); + + webSocketLiveChatClient.addMsgListener(new IWebSocketMsgListener() { + @Override + public void onMsg(WebSocketBinaryFrameHandler webSocketBinaryFrameHandler, IMsg msg) { + log.debug("{} onMsg {}", webSocketBinaryFrameHandler.getRoomId(), msg); + + List decode = BilibiliCodecUtil.decode(((WebSocketMsg) msg).content()); + for (IBilibiliMsg iBilibiliMsg : decode) { + log.info("{} 收到{}消息 {}", webSocketBinaryFrameHandler.getRoomId(), iBilibiliMsg.getClass().getSimpleName(), iBilibiliMsg); + } + } + }); + webSocketLiveChatClient.connect(); + + while (true) { + System.in.read(); + } + } +} diff --git a/live-chat-client-examples/codec-example/src/main/java/tech/ordinaryroad/live/chat/client/example/codec/BilibiliCodecExampleJavaWebSocketClient.java b/live-chat-client-examples/codec-example/src/main/java/tech/ordinaryroad/live/chat/client/example/codec/BilibiliCodecExampleJavaWebSocketClient.java new file mode 100644 index 0000000..fcdaad5 --- /dev/null +++ b/live-chat-client-examples/codec-example/src/main/java/tech/ordinaryroad/live/chat/client/example/codec/BilibiliCodecExampleJavaWebSocketClient.java @@ -0,0 +1,110 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.codec; + +import cn.hutool.core.thread.ThreadUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.buffer.Unpooled; +import lombok.extern.slf4j.Slf4j; +import org.java_websocket.client.WebSocketClient; +import org.java_websocket.handshake.ServerHandshake; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.UserAuthenticationMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.factory.BilibiliMsgFactory; +import tech.ordinaryroad.live.chat.client.codec.bilibili.util.BilibiliCodecUtil; + +import java.net.URI; +import java.nio.ByteBuffer; +import java.util.List; +import java.util.concurrent.TimeUnit; + +/** + * Hello world! + */ +@Slf4j +public class BilibiliCodecExampleJavaWebSocketClient { + static long roomId = 7777; + static ProtoverEnum protoverEnum = ProtoverEnum.NORMAL_BROTLI; + static BilibiliApis.RoomInitResult roomInitResult = BilibiliApis.roomInit(roomId, null); + + static WebSocketClient webSocketClient; + + public static void main(String[] args) throws Exception { + webSocketClient = new WebSocketClient(URI.create("wss://broadcastlv.chat.bilibili.com/sub")) { + @Override + public void onOpen(ServerHandshake handshakedata) { + log.info("onOpen {}", handshakedata); + + UserAuthenticationMsg auth = BilibiliMsgFactory.getInstance(roomId).createAuth(protoverEnum, roomInitResult); + ByteBuf encodeAuth = BilibiliCodecUtil.encode(auth, Unpooled.buffer()); + send(encodeAuth.array()); + log.info("认证包发送成功"); + + ThreadUtil.execAsync(() -> { + while (true) { + HeartbeatMsg heartbeat = BilibiliMsgFactory.getInstance(roomId).createHeartbeat(protoverEnum); + ByteBuf encodeHeartbeat = BilibiliCodecUtil.encode(heartbeat, Unpooled.buffer()); + webSocketClient.send(encodeHeartbeat.array()); + log.info("心跳包发送成功"); + ThreadUtil.sleep(TimeUnit.SECONDS.toMillis(25)); + } + }); + } + + @Override + public void onMessage(ByteBuffer bytes) { + List msgList = BilibiliCodecUtil.decode(ByteBufAllocator.DEFAULT.buffer().writeBytes(bytes)); + for (IBilibiliMsg iBilibiliMsg : msgList) { + log.info("{} 收到{}消息 {}", roomId, iBilibiliMsg.getClass().getSimpleName(), iBilibiliMsg); + } + } + + @Override + public void onMessage(String message) { + log.info("{} 收到消息 {}", roomId, message); + } + + @Override + public void onClose(int code, String reason, boolean remote) { + log.info("onClose {} {} {}", code, reason, remote); + } + + @Override + public void onError(Exception ex) { + log.error("onError", ex); + } + }; + + webSocketClient.connect(); + + while (true) { + System.in.read(); + } + } +} diff --git a/live-chat-client-examples/handler-example/pom.xml b/live-chat-client-examples/handler-example/pom.xml new file mode 100644 index 0000000..ea35b2d --- /dev/null +++ b/live-chat-client-examples/handler-example/pom.xml @@ -0,0 +1,63 @@ + + 4.0.0 + jar + tech.ordinaryroad + live-chat-client-example-handler + 0.7.0 + live-chat-client-example-handler + live-chat-client-example-handler + + + 8 + 8 + UTF-8 + 1.18.28 + 3.11.0 + + + + + tech.ordinaryroad + live-chat-client-bilibili + + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-douyu + + 0.7.0 + + + + org.projectlombok + lombok + ${lombok.version} + + + + + ordinaryroad-bilibili-live-chat-example-handler + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${maven.compiler.source} + ${maven.compiler.target} + ${project.build.sourceEncoding} + + + org.projectlombok + lombok + ${lombok.version} + + + + + + + diff --git a/live-chat-client-examples/handler-example/src/main/java/tech/ordinaryroad/live/chat/client/example/handler/BilibiliHandlerModeExample.java b/live-chat-client-examples/handler-example/src/main/java/tech/ordinaryroad/live/chat/client/example/handler/BilibiliHandlerModeExample.java new file mode 100644 index 0000000..bb57408 --- /dev/null +++ b/live-chat-client-examples/handler-example/src/main/java/tech/ordinaryroad/live/chat/client/example/handler/BilibiliHandlerModeExample.java @@ -0,0 +1,262 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.example.handler; + + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Pair; +import com.fasterxml.jackson.databind.JsonNode; +import io.netty.bootstrap.Bootstrap; +import io.netty.channel.*; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.HttpClientCodec; +import io.netty.handler.codec.http.HttpObjectAggregator; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslContextBuilder; +import io.netty.handler.stream.ChunkedWriteHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliCodecHandler; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliConnectionHandler; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +import java.net.URI; +import java.util.concurrent.TimeUnit; + + +/** + * @author mjz + * @date 2023/1/7 + */ +@Slf4j +public class BilibiliHandlerModeExample { + + static Channel channel; + // TODO 修改房间ID + static long roomId = 7777; + // TODO 设置浏览器Cookie + static String cookie = System.getenv("cookie"); + // TODO 修改版本 + static ProtoverEnum protover = ProtoverEnum.NORMAL_BROTLI; + static BilibiliApis.RoomInitResult roomInitResult = BilibiliApis.roomInit(roomId, cookie); + + public static void main(String[] args) { + log.error("cookie: {}", cookie); + + Bootstrap bootstrap = new Bootstrap(); + EventLoopGroup workerGroup = new NioEventLoopGroup(); + BilibiliConnectionHandler connectionHandler = null; + IBaseConnectionListener connectionListener = new IBaseConnectionListener() { + + @Override + public void onConnected(BilibiliConnectionHandler connectionHandler) { + log.error("{} 连接成功", roomId); + } + + @Override + public void onDisconnected(BilibiliConnectionHandler connectionHandler) { + log.error("连接断开,5s后将重新连接"); + workerGroup.schedule(() -> { + bootstrap.connect().addListener((ChannelFutureListener) connectFuture -> { + if (connectFuture.isSuccess()) { + log.debug("连接建立成功!"); + channel = connectFuture.channel(); + // 监听是否握手成功 + connectionHandler.getHandshakePromise().addListener((ChannelFutureListener) handshakeFuture -> { + // 5s内认证 + connectionHandler.sendAuthRequest(channel); + }); + } else { + log.error("连接建立失败", connectFuture.cause()); + this.onConnectFailed(connectionHandler); + } + }); + }, 5, TimeUnit.SECONDS); + } + + @Override + public void onConnectFailed(BilibiliConnectionHandler connectionHandler) { + onDisconnected(connectionHandler); + } + }; + + try { + URI websocketURI = new URI("wss://broadcastlv.chat.bilibili.com:443/sub"); + + connectionHandler = new BilibiliConnectionHandler( + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(websocketURI) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(new DefaultHttpHeaders()) + .build() + ), + roomInitResult, roomId, protover, connectionListener, cookie + ); + IBilibiliMsgListener msgListener = new IBilibiliMsgListener() { + @Override + public void onDanmuMsg(BilibiliBinaryFrameHandler binaryFrameHandler, DanmuMsgMsg msg) { + IBilibiliMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + log.info("{} 收到弹幕 {} {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SendGiftMsg msg) { + IBilibiliMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + log.info("{} 收到礼物 {} {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getData().getAction(), msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onSuperChatMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SuperChatMessageMsg msg) { + IBilibiliMsgListener.super.onSuperChatMsg(binaryFrameHandler, msg); + log.info("{} 收到醒目留言 {}({}):{}", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onEnterRoomMsg(BilibiliBinaryFrameHandler binaryFrameHandler, InteractWordMsg msg) { + log.info("{} {}({}) 进入直播间", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onLikeMsg(BilibiliBinaryFrameHandler binaryFrameHandler, LikeInfoV3ClickMsg msg) { + IBilibiliMsgListener.super.onLikeMsg(binaryFrameHandler, msg); + log.info("{} 收到点赞 [{}] {}({})x{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getClickCount()); + } + + @Override + public void onLiveStatusMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliLiveStatusChangeMsg msg) { + IBilibiliMsgListener.super.onLiveStatusMsg(binaryFrameHandler, msg); + log.error("{} 状态变化 {}", binaryFrameHandler.getRoomId(), msg.getLiveStatusAction()); + } + + @Override + public void onRoomStatsMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliRoomStatsMsg msg) { + IBilibiliMsgListener.super.onRoomStatsMsg(binaryFrameHandler, msg); + log.info("{} 统计信息 累计点赞数: {}, 当前观看人数: {}, 累计观看人数: {}", binaryFrameHandler.getRoomId(), msg.getLikedCount(), msg.getWatchingCount(), msg.getWatchedCount()); + } + + @Override + public void onEntryEffect(MessageMsg msg) { + JsonNode data = msg.getData(); + String copyWriting = data.get("copy_writing").asText(); + log.info("入场效果 {}", copyWriting); + } + + @Override + public void onMsg(IMsg msg) { + // log.debug("收到{}消息 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + log.debug("收到CMD消息{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + log.debug("收到其他CMD消息 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("收到未知CMD消息 {}", cmdString); + } + }; + BilibiliBinaryFrameHandler bilibiliHandler = new BilibiliBinaryFrameHandler(CollUtil.newArrayList(msgListener), roomId, Pair.of(roomInitResult.getRoomPlayInfoResult().getRoom_id(), roomInitResult.getRoomPlayInfoResult().getShort_id())); + + //进行握手 + log.info("握手开始"); +// SslContext sslCtx = SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build(); + SslContext sslCtx = SslContextBuilder.forClient().build(); + + BilibiliConnectionHandler finalConnectionHandler = connectionHandler; + bootstrap.group(workerGroup) + // 创建Channel + .channel(NioSocketChannel.class) + .remoteAddress(websocketURI.getHost(), websocketURI.getPort()) + .option(ChannelOption.TCP_NODELAY, true) + .option(ChannelOption.SO_KEEPALIVE, true) + // Channel配置 + .handler(new ChannelInitializer() { + @Override + protected void initChannel(SocketChannel ch) { + // 责任链 + ChannelPipeline pipeline = ch.pipeline(); + + //放到第一位 addFirst 支持wss链接服务端 + pipeline.addFirst(sslCtx.newHandler(ch.alloc(), websocketURI.getHost(), websocketURI.getPort())); + + // 添加一个http的编解码器 + pipeline.addLast(new HttpClientCodec()); + // 添加一个用于支持大数据流的支持 + pipeline.addLast(new ChunkedWriteHandler()); + // 添加一个聚合器,这个聚合器主要是将HttpMessage聚合成FullHttpRequest/Response + pipeline.addLast(new HttpObjectAggregator(1024 * 64)); +// pipeline.addLast(WebSocketClientCompressionHandler.INSTANCE); + // 添加一个WebSocket协议处理器 + pipeline.addLast(finalConnectionHandler.getWebSocketProtocolHandler().get()); + // pipeline.addLast(WebSocketClientCompressionHandler.INSTANCE); + + // 连接处理器 + pipeline.addLast(finalConnectionHandler); + pipeline.addLast(new BilibiliCodecHandler()); + pipeline.addLast(bilibiliHandler); + } + }); + + channel = bootstrap.connect().sync().channel(); + // 阻塞等待是否握手成功 + connectionHandler.getHandshakePromise().sync(); + log.error("连接成功,10s后将断开连接,模拟自动重连"); + workerGroup.schedule(() -> { + channel.close(); + }, 10, TimeUnit.SECONDS); + // 5s内认证 + connectionHandler.sendAuthRequest(channel); + + channel.closeFuture().sync(); + } catch (Exception e) { + e.printStackTrace(); + connectionListener.onConnectFailed(connectionHandler); +// throw new RuntimeException(e); + } + } + +} \ No newline at end of file diff --git a/live-chat-client-examples/mvnw b/live-chat-client-examples/mvnw new file mode 100644 index 0000000..c7ad0c1 --- /dev/null +++ b/live-chat-client-examples/mvnw @@ -0,0 +1,313 @@ +#!/bin/sh +# +# MIT License +# +# Copyright (c) 2023 OrdinaryRoad +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.2.0 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "$(uname)" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=$(java-config --jre-home) + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=$(cygpath --unix "$JAVA_HOME") + [ -n "$CLASSPATH" ] && + CLASSPATH=$(cygpath --path --unix "$CLASSPATH") +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && + JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="$(which javac)" + if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=$(which readlink) + if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then + if $darwin ; then + javaHome="$(dirname "\"$javaExecutable\"")" + javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" + else + javaExecutable="$(readlink -f "\"$javaExecutable\"")" + fi + javaHome="$(dirname "\"$javaExecutable\"")" + javaHome=$(expr "$javaHome" : '\(.*\)/bin') + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=$(cd "$wdir/.." || exit 1; pwd) + fi + # end of workaround + done + printf '%s' "$(cd "$basedir" || exit 1; pwd)" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + # Remove \r in case we run on Windows within Git Bash + # and check out the repository with auto CRLF management + # enabled. Otherwise, we may read lines that are delimited with + # \r\n and produce $'-Xarg\r' rather than -Xarg due to word + # splitting rules. + tr -s '\r\n' ' ' < "$1" + fi +} + +log() { + if [ "$MVNW_VERBOSE" = true ]; then + printf '%s\n' "$1" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname "$0")") +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +log "$MAVEN_PROJECTBASEDIR" + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" +if [ -r "$wrapperJarPath" ]; then + log "Found $wrapperJarPath" +else + log "Couldn't find $wrapperJarPath, downloading it ..." + + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + fi + while IFS="=" read -r key value; do + # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) + safeValue=$(echo "$value" | tr -d '\r') + case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; + esac + done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" + log "Downloading from: $wrapperUrl" + + if $cygwin; then + wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") + fi + + if command -v wget > /dev/null; then + log "Found wget ... using wget" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + log "Found curl ... using curl" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + fi + else + log "Falling back to using Java to download" + javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=$(cygpath --path --windows "$javaSource") + javaClass=$(cygpath --path --windows "$javaClass") + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + log " - Compiling MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + log " - Running MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +# If specified, validate the SHA-256 sum of the Maven wrapper jar file +wrapperSha256Sum="" +while IFS="=" read -r key value; do + case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; + esac +done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" +if [ -n "$wrapperSha256Sum" ]; then + wrapperSha256Result=false + if command -v sha256sum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + elif command -v shasum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." + echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." + exit 1 + fi + if [ $wrapperSha256Result = false ]; then + echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 + echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 + echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 + exit 1 + fi +fi + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") + [ -n "$CLASSPATH" ] && + CLASSPATH=$(cygpath --path --windows "$CLASSPATH") + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +# shellcheck disable=SC2086 # safe args +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/live-chat-client-examples/mvnw.cmd b/live-chat-client-examples/mvnw.cmd new file mode 100644 index 0000000..95ba6f5 --- /dev/null +++ b/live-chat-client-examples/mvnw.cmd @@ -0,0 +1,205 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.2.0 +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %WRAPPER_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file +SET WRAPPER_SHA_256_SUM="" +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B +) +IF NOT %WRAPPER_SHA_256_SUM%=="" ( + powershell -Command "&{"^ + "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ + "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ + " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ + " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ + " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ + " exit 1;"^ + "}"^ + "}" + if ERRORLEVEL 1 goto error +) + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/live-chat-client-examples/pom.xml b/live-chat-client-examples/pom.xml new file mode 100644 index 0000000..dedbc05 --- /dev/null +++ b/live-chat-client-examples/pom.xml @@ -0,0 +1,41 @@ + + + + + 4.0.0 + tech.ordinaryroad + live-chat-client-examples + 0.7.0 + pom + live-chat-client-examples + live-chat-client-examples + + + client-example + handler-example + codec-example + + diff --git a/live-chat-client-servers/live-chat-client-servers-netty-client/pom.xml b/live-chat-client-servers/live-chat-client-servers-netty-client/pom.xml new file mode 100644 index 0000000..f87a008 --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty-client/pom.xml @@ -0,0 +1,53 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-client-servers + 0.7.0 + + jar + + live-chat-client-servers-netty-client + live-chat-client-servers-netty + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-commons-client + + + + tech.ordinaryroad + live-chat-client-servers-netty + + + diff --git a/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/base/BaseNettyClient.java b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/base/BaseNettyClient.java new file mode 100644 index 0000000..47dbda3 --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/base/BaseNettyClient.java @@ -0,0 +1,360 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.base; + +import cn.hutool.core.util.StrUtil; +import io.netty.bootstrap.Bootstrap; +import io.netty.channel.*; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.codec.http.HttpClientCodec; +import io.netty.handler.codec.http.HttpObjectAggregator; +import io.netty.handler.proxy.Socks5ProxyHandler; +import io.netty.handler.ssl.SslContextBuilder; +import io.netty.handler.ssl.SslHandler; +import io.netty.handler.stream.ChunkedWriteHandler; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.BaseLiveChatClient; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatUrlUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseConnectionHandler; + +import java.net.InetSocketAddress; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Slf4j +public abstract class BaseNettyClient + , + Msg extends IMsg, + MsgListener extends IBaseMsgListener, + ConnectionHandler extends BaseConnectionHandler, + BinaryFrameHandler extends BaseBinaryFrameHandler + > + extends BaseLiveChatClient + implements IBaseConnectionListener { + + @Getter + private final EventLoopGroup workerGroup; + @Getter + private final Bootstrap bootstrap = new Bootstrap(); + private ConnectionHandler connectionHandler; + private IBaseConnectionListener connectionListener; + private Channel channel; + @Getter + private URI websocketUri; + protected IBaseConnectionListener clientConnectionListener = this; + /** + * 控制弹幕发送频率 + */ + private volatile long lastSendDanmuTimeInMillis; + + /** + * 初始化Channel,添加自己的Handler + */ + protected void initChannel(SocketChannel channel) { + // ignore + } + + public abstract ConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener); + + protected BaseNettyClient(Config config, EventLoopGroup workerGroup, IBaseConnectionListener connectionListener) { + super(config); + this.workerGroup = workerGroup; + this.connectionListener = connectionListener; + } + + @Override + public void onConnected(ConnectionHandler connectionHandler) { + this.setStatus(ClientStatusEnums.CONNECTED); + if (this.connectionListener != null) { + this.connectionListener.onConnected(connectionHandler); + } + } + + @Override + public void onConnectFailed(ConnectionHandler connectionHandler) { + this.setStatus(ClientStatusEnums.CONNECT_FAILED); + if (this.connectionListener != null) { + this.connectionListener.onConnectFailed(connectionHandler); + } + } + + @Override + public void onDisconnected(ConnectionHandler connectionHandler) { + this.setStatus(ClientStatusEnums.DISCONNECTED); + tryReconnect(); + if (this.connectionListener != null) { + this.connectionListener.onDisconnected(connectionHandler); + } + } + + @Override + public void init() { + if (checkStatus(ClientStatusEnums.INITIALIZED)) { + return; + } + + this.connectionHandler = this.initConnectionHandler(this); + this.bootstrap.group(this.workerGroup) + // 创建Channel + .channel(NioSocketChannel.class) + .option(ChannelOption.TCP_NODELAY, true) + .option(ChannelOption.SO_KEEPALIVE, true); + + this.setStatus(ClientStatusEnums.INITIALIZED); + } + + @Override + public void connect(Runnable success, Consumer failed) { + if (this.cancelReconnect) { + this.cancelReconnect = false; + } + if (!checkStatus(ClientStatusEnums.INITIALIZED)) { + return; + } + if (getStatus() == ClientStatusEnums.CONNECTED) { + return; + } + if (getStatus() != ClientStatusEnums.RECONNECTING) { + this.setStatus(ClientStatusEnums.CONNECTING); + } + + String webSocketUriString = getWebSocketUriString(); + int port = OrLiveChatUrlUtil.getWebSocketUriPort(webSocketUriString); + try { + this.websocketUri = new URI(webSocketUriString); + } catch (URISyntaxException e) { + log.error("WebSocket地址解析失败 " + webSocketUriString, e); + failed.accept(e); + return; + } + + this.bootstrap.handler(new ChannelInitializer() { + @Override + protected void initChannel(SocketChannel ch) throws Exception { + // 责任链 + ChannelPipeline pipeline = ch.pipeline(); + + // Socks5代理 + String socks5ProxyHost = getConfig().getSocks5ProxyHost(); + if (StrUtil.isNotBlank(socks5ProxyHost)) { + int socks5ProxyPort = getConfig().getSocks5ProxyPort(); + pipeline.addFirst(new Socks5ProxyHandler(new InetSocketAddress(socks5ProxyHost, socks5ProxyPort), getConfig().getSocks5ProxyUsername(), getConfig().getSocks5ProxyPassword())); + if (log.isDebugEnabled()) { + log.debug("已启用Socks5代理"); + } + } + + if (pipeline.get(SslHandler.class) != null) { + pipeline.remove(SslHandler.class); + } + if ("wss".equalsIgnoreCase(OrLiveChatUrlUtil.getScheme(getWebSocketUriString()))) { + pipeline.addLast(SslContextBuilder.forClient() + .build() + .newHandler(ch.alloc(), BaseNettyClient.this.websocketUri.getHost(), port)); + } + + // 添加一个http的编解码器 + pipeline.addLast(new HttpClientCodec()); + // 添加一个用于支持大数据流的支持 + pipeline.addLast(new ChunkedWriteHandler()); + // 添加一个聚合器,这个聚合器主要是将HttpMessage聚合成FullHttpRequest/Response + pipeline.addLast(new HttpObjectAggregator(BaseNettyClient.this.getConfig().getAggregatorMaxContentLength())); + + // 添加一个WebSocket协议处理器 + pipeline.addLast(BaseNettyClient.this.connectionHandler.getWebSocketProtocolHandler().get()); + + // 连接处理器 + pipeline.addLast(BaseNettyClient.this.connectionHandler); + + BaseNettyClient.this.initChannel(ch); + } + }) + .connect(this.websocketUri.getHost(), port).addListener((ChannelFutureListener) connectFuture -> { + if (connectFuture.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("连接建立成功!"); + } + this.channel = connectFuture.channel(); + // 监听是否握手成功 + this.connectionHandler.getHandshakePromise().addListener((ChannelFutureListener) handshakeFuture -> { + if (handshakeFuture.isSuccess()) { + try { + connectionHandler.sendAuthRequest(channel); + if (success != null) { + channel.eventLoop().execute(success); + } + } catch (Exception e) { + log.error("认证包发送失败,断开连接", e); + this.disconnect(); + } + } + }); + } else { + log.error("连接建立失败", connectFuture.cause()); + this.onConnectFailed(this.connectionHandler); + if (failed != null) { + failed.accept(connectFuture.cause()); + } + } + }); + } + + @Override + public void disconnect() { + if (this.channel == null) { + return; + } + this.channel.close(); + } + + @Override + protected void tryReconnect() { + if (this.cancelReconnect) { + this.cancelReconnect = false; + return; + } + if (!getConfig().isAutoReconnect()) { + return; + } + if (log.isWarnEnabled()) { + Object roomId = getConfig().getRoomId(); + log.warn("{}s后将重新连接 {}", getConfig().getReconnectDelay(), roomId == null ? getConfig().getWebsocketUri() : roomId); + } + workerGroup.schedule(() -> { + this.setStatus(ClientStatusEnums.RECONNECTING); + this.connect(); + }, getConfig().getReconnectDelay(), TimeUnit.SECONDS); + } + + @Override + public void send(Object msg, Runnable success, Consumer failed) { + if (getStatus() != ClientStatusEnums.CONNECTED) { + return; + } + + ChannelFuture future = this.channel.writeAndFlush(msg); + if (success != null || failed != null) { + future.addListener((ChannelFutureListener) channelFuture -> { + if (channelFuture.isSuccess()) { + if (success != null) { + channelFuture.channel().eventLoop().execute(success); + } + } else { + if (failed != null) { + channelFuture.channel().eventLoop().execute(() -> failed.accept(channelFuture.cause())); + } + } + }); + } + } + + @Override + public void destroy() { + // 销毁时不需要重连 + this.cancelReconnect = true; + workerGroup.shutdownGracefully().addListener(future -> { + if (future.isSuccess()) { + this.setStatus(ClientStatusEnums.DESTROYED); + // 设置完 DESTROYED 后再删除监听器 + super.destroy(); + } else { + throw new BaseException("client销毁失败", future.cause()); + } + }); + } + + @Override + protected String getWebSocketUriString() { + return getConfig().getWebsocketUri(); + } + + @Override + protected void setStatus(ClientStatusEnums status) { + if (log.isDebugEnabled()) { + if (getStatus() != status) { + log.debug("{} 状态变化 {} => {}\n", getClass().getSimpleName(), getStatus(), status); + } + } + super.setStatus(status); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer failed) { + throw new BaseException("暂未支持该功能"); + } + + @Override + public void clickLike(int count, Runnable success, Consumer failed) { + throw new BaseException("暂未支持该功能"); + } + + /** + * 发送弹幕前判断是否可以发送 + * + * @param checkConnected 是否检查Client连接状态 + */ + protected boolean checkCanSendDanmu(boolean checkConnected) { + if (checkConnected && getStatus() != ClientStatusEnums.CONNECTED) { + throw new BaseException("连接未建立,无法发送弹幕"); + } + if (System.currentTimeMillis() - this.lastSendDanmuTimeInMillis <= getConfig().getMinSendDanmuPeriod()) { + if (log.isWarnEnabled()) { + log.warn("发送弹幕频率过快,忽略该次发送"); + } + return false; + } + return true; + } + + protected boolean checkCanSendDanmu() { + return checkCanSendDanmu(true); + } + + /** + * 发送弹幕后调用该方法 + */ + protected void finishSendDanmu() { + this.lastSendDanmuTimeInMillis = System.currentTimeMillis(); + if (log.isDebugEnabled()) { + log.debug("弹幕发送完成"); + } + } +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/config/BaseNettyClientConfig.java b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/config/BaseNettyClientConfig.java new file mode 100644 index 0000000..c0ebf52 --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/config/BaseNettyClientConfig.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.config; + +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpObjectAggregator; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.commons.client.config.BaseLiveChatClientConfig; + +import java.net.URI; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public abstract class BaseNettyClientConfig extends BaseLiveChatClientConfig { + + /** + * 聚合器允许的最大消息体长度,默认 64*1024 byte + * + * @see HttpObjectAggregator#HttpObjectAggregator(int) + */ + @Builder.Default + private int aggregatorMaxContentLength = 64 * 1024; + + /** + * WebSocketClientHandshaker最大消息体长度,默认 64*1024 byte + * + * @see WebSocketClientHandshakerFactory#newHandshaker(URI, WebSocketVersion, String, boolean, HttpHeaders, int) + */ + @Builder.Default + private int maxFramePayloadLength = 64 * 1024; +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientBinaryFrameHandler.java b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientBinaryFrameHandler.java new file mode 100644 index 0000000..278ce3f --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientBinaryFrameHandler.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.handler; + +import lombok.Getter; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseBinaryFrameHandler; + +import java.util.List; + +/** + * BaseClientBinaryFrameHandler + * + * @author mjz + * @date 2023/8/30 + */ +public abstract class BaseNettyClientBinaryFrameHandler< + Client extends BaseNettyClient, + BinaryFrameHandler extends BaseBinaryFrameHandler, + CmdEnum extends Enum, + Msg extends IMsg, + MsgListener extends IBaseMsgListener> + extends BaseBinaryFrameHandler { + + @Getter + protected final Client client; + + public BaseNettyClientBinaryFrameHandler(List msgListeners, Client client, long roomId) { + super(msgListeners, roomId); + this.client = client; + } + + public BaseNettyClientBinaryFrameHandler(List msgListeners, Client client) { + super(msgListeners, client.getConfig().getRoomId()); + this.client = client; + } + + public BaseNettyClientBinaryFrameHandler(List msgListeners, long roomId) { + super(msgListeners, roomId); + this.client = null; + } +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientChannelInitializer.java b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientChannelInitializer.java new file mode 100644 index 0000000..e5ee138 --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientChannelInitializer.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.handler; + +import io.netty.channel.ChannelInitializer; +import io.netty.channel.socket.SocketChannel; +import lombok.Getter; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +/** + * @author mjz + * @date 2024/3/22 + */ +public abstract class BaseNettyClientChannelInitializer> extends ChannelInitializer { + + @Getter + protected final CLIENT client; + + public BaseNettyClientChannelInitializer(CLIENT client) { + this.client = client; + } +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientConnectionHandler.java b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientConnectionHandler.java new file mode 100644 index 0000000..615889c --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientConnectionHandler.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.handler; + +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import lombok.Getter; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseConnectionHandler; + +import java.util.function.Supplier; + +/** + * BaseClientConnectionHandler + * + * @author mjz + * @date 2023/8/27 + */ +public abstract class BaseNettyClientConnectionHandler< + Client extends BaseNettyClient, + ConnectionHandler extends BaseConnectionHandler> + extends BaseConnectionHandler { + + @Getter + protected final Client client; + + public BaseNettyClientConnectionHandler(Supplier webSocketClientProtocolHandler, Client client, IBaseConnectionListener listener) { + super(webSocketClientProtocolHandler, listener); + this.client = client; + } + + public BaseNettyClientConnectionHandler(Supplier webSocketClientProtocolHandler, Client client) { + this(webSocketClientProtocolHandler, client, null); + } + + public BaseNettyClientConnectionHandler(Supplier webSocketClientProtocolHandler, IBaseConnectionListener listener) { + super(webSocketClientProtocolHandler, listener); + this.client = null; + } + + public BaseNettyClientConnectionHandler(Supplier webSocketClientProtocolHandler, long roomId) { + super(webSocketClientProtocolHandler, null); + this.client = null; + } + + @Override + public long getHeartbeatPeriod() { + if (client == null) { + return BaseNettyClientConfig.DEFAULT_HEARTBEAT_PERIOD; + } else { + return client.getConfig().getHeartbeatPeriod(); + } + } + + @Override + public long getHeartbeatInitialDelay() { + if (client == null) { + return BaseNettyClientConfig.DEFAULT_HEARTBEAT_INITIAL_DELAY; + } else { + return client.getConfig().getHeartbeatInitialDelay(); + } + } +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BinaryWebSocketFrameToMessageCodec.java b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BinaryWebSocketFrameToMessageCodec.java new file mode 100644 index 0000000..7950a49 --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BinaryWebSocketFrameToMessageCodec.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.handler; + +import io.netty.handler.codec.MessageToMessageCodec; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * BinaryWebSocketFrameToMessageCodec + * + * @author mjz + * @date 2024/3/22 + */ +public abstract class BinaryWebSocketFrameToMessageCodec extends MessageToMessageCodec { +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty/pom.xml b/live-chat-client-servers/live-chat-client-servers-netty/pom.xml new file mode 100644 index 0000000..3c03db1 --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty/pom.xml @@ -0,0 +1,58 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-client-servers + 0.7.0 + + jar + + live-chat-client-servers-netty + live-chat-client-servers-netty + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-commons-base + + + + io.netty + netty-all + + + + ch.qos.logback + logback-classic + + + diff --git a/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/frame/base/BaseBinaryWebSocketFrame.java b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/frame/base/BaseBinaryWebSocketFrame.java new file mode 100644 index 0000000..984960a --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/frame/base/BaseBinaryWebSocketFrame.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.frame.base; + +import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; + +/** + * @author mjz + * @date 2023/1/5 + */ +public abstract class BaseBinaryWebSocketFrame extends BinaryWebSocketFrame { + + public BaseBinaryWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseBinaryFrameHandler.java b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseBinaryFrameHandler.java new file mode 100644 index 0000000..895100d --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseBinaryFrameHandler.java @@ -0,0 +1,142 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.handler.base; + +import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +import java.util.List; +import java.util.function.Consumer; + + +/** + * 消息处理器 + * + * @author mjz + * @date 2023/1/4 + */ +@Slf4j +public abstract class BaseBinaryFrameHandler< + T extends BaseBinaryFrameHandler, + CmdEnum extends Enum, + Msg extends IMsg, + MsgListener extends IBaseMsgListener + > extends SimpleChannelInboundHandler + implements IBaseMsgListener { + + @Getter + private final Object roomId; + protected final List msgListeners; + + public BaseBinaryFrameHandler(List msgListeners, Object roomId) { + this.msgListeners = msgListeners; + this.roomId = roomId; + if (this.msgListeners == null || this.msgListeners.isEmpty()) { + if (log.isDebugEnabled()) { + log.debug("listener not set"); + } + } + } + + @SuppressWarnings("unchecked") + @Override + protected void channelRead0(ChannelHandlerContext ctx, Msg msg) { + this.onMsg((T) BaseBinaryFrameHandler.this, msg); + if (msg instanceof ICmdMsg) { + ICmdMsg cmdMsg = (ICmdMsg) msg; + Enum cmdEnum = cmdMsg.getCmdEnum(); + if (cmdEnum == null) { + this.onUnknownCmd((T) BaseBinaryFrameHandler.this, cmdMsg.getCmd(), cmdMsg); + } else { + this.onCmdMsg((T) BaseBinaryFrameHandler.this, (CmdEnum) cmdEnum, (ICmdMsg) cmdMsg); + } + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + if (cause.getCause() instanceof UnrecognizedPropertyException) { + log.error("缺少字段:{}", cause.getMessage()); + } else { + super.exceptionCaught(ctx, cause); + } + } + + @Override + public void onMsg(T t, IMsg msg) { + IBaseMsgListener.super.onMsg(t, msg); + iteratorMsgListeners(msgListener -> msgListener.onMsg(t, msg)); + } + + /** + * 重写该方法,判断CMD,或者调用{@link IBaseMsgListener#onOtherCmdMsg(Object, Enum, ICmdMsg)} + * + * @param t BaseBinaryFrameHandler + * @param cmd CmdEnum + * @param cmdMsg BaseMsg + */ + @Override + public void onCmdMsg(T t, CmdEnum cmd, ICmdMsg cmdMsg) { + IBaseMsgListener.super.onCmdMsg(t, cmd, cmdMsg); + iteratorMsgListeners(msgListener -> msgListener.onCmdMsg(t, cmd, cmdMsg)); + } + + @Override + public void onUnknownCmd(T t, String cmdString, IMsg msg) { + IBaseMsgListener.super.onUnknownCmd(t, cmdString, msg); + iteratorMsgListeners(msgListener -> msgListener.onUnknownCmd(t, cmdString, msg)); + } + + @SuppressWarnings("ForLoopReplaceableByForEach") + public void iteratorMsgListeners(Consumer consumer) { + if (msgListeners.isEmpty()) { + return; + } + for (int i = 0; i < msgListeners.size(); i++) { + consumer.accept(msgListeners.get(i)); + } + } + + public String getRoomIdAsString() { + if (this.roomId == null) { + return ""; + } + return this.roomId.toString(); + } + + public long getRoomIdAsLong() { + String roomIdAsString = this.getRoomIdAsString(); + if (roomIdAsString.trim().isEmpty()) { + return 0L; + } + return Long.parseLong(roomIdAsString); + } +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseConnectionHandler.java b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseConnectionHandler.java new file mode 100644 index 0000000..fe45b39 --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseConnectionHandler.java @@ -0,0 +1,168 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.handler.base; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.channel.ChannelPromise; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.util.concurrent.ScheduledFuture; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; + +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; + + +/** + * 连接处理器 + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +public abstract class BaseConnectionHandler> + extends ChannelInboundHandlerAdapter + implements IBaseConnectionHandler { + + @Getter + private final Supplier webSocketProtocolHandler; + @Getter + private ChannelPromise handshakePromise; + private final IBaseConnectionListener listener; + /** + * 客户端发送心跳包 + */ + private ScheduledFuture scheduledFuture = null; + + public BaseConnectionHandler(Supplier webSocketProtocolHandler, IBaseConnectionListener listener) { + this.webSocketProtocolHandler = webSocketProtocolHandler; + this.listener = listener; + } + + public BaseConnectionHandler(Supplier webSocketProtocolHandler) { + this(webSocketProtocolHandler, null); + } + + @Override + public void handlerAdded(ChannelHandlerContext ctx) { + this.handshakePromise = ctx.newPromise(); + } + + @Override + public void channelActive(ChannelHandlerContext ctx) { + if (log.isDebugEnabled()) { + log.debug("channelActive"); + } + } + + @Override + public void channelInactive(ChannelHandlerContext ctx) { + if (log.isDebugEnabled()) { + log.debug("channelInactive"); + } + heartbeatCancel(); + if (this.listener != null) { + listener.onDisconnected((ConnectionHandler) BaseConnectionHandler.this); + } + } + + /** + * 开始发送心跳包 + */ + private void heartbeatStart(Channel channel) { + if (getHeartbeatPeriod() > 0) { + scheduledFuture = channel.eventLoop().scheduleAtFixedRate(() -> { + sendHeartbeat(channel); + }, getHeartbeatInitialDelay(), getHeartbeatPeriod(), TimeUnit.SECONDS); + } else { + scheduledFuture = channel.eventLoop().schedule(() -> { + sendHeartbeat(channel); + }, getHeartbeatInitialDelay(), TimeUnit.SECONDS); + } + } + + /** + * 取消发送心跳包 + */ + private void heartbeatCancel() { + if (null != scheduledFuture && !scheduledFuture.isCancelled()) { + scheduledFuture.cancel(true); + scheduledFuture = null; + } + } + + public abstract long getHeartbeatPeriod(); + + public abstract long getHeartbeatInitialDelay(); + + private void handshakeSuccessfully(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("握手完成!"); + } + this.handshakePromise.setSuccess(); + + heartbeatCancel(); + heartbeatStart(channel); + if (BaseConnectionHandler.this.listener != null) { + listener.onConnected((ConnectionHandler) BaseConnectionHandler.this); + } + } + + private void handshakeFailed(ChannelHandlerContext ctx, WebSocketClientProtocolHandler.ClientHandshakeStateEvent evt) { + log.error("握手失败! {}", evt); + this.handshakePromise.setFailure(new BaseException(evt.name())); + + if (listener != null) { + BaseConnectionHandler.this.listener.onConnectFailed((ConnectionHandler) BaseConnectionHandler.this); + } + } + + @Override + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { + if (log.isDebugEnabled()) { + log.debug("userEventTriggered {}", evt); + } + if (evt == WebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_COMPLETE) { + handshakeSuccessfully(ctx.channel()); + } else if (evt == WebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT) { + handshakeFailed(ctx, (WebSocketClientProtocolHandler.ClientHandshakeStateEvent) evt); + } else { + super.userEventTriggered(ctx, evt); + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { + log.error("exceptionCaught", cause); + if (!this.handshakePromise.isDone()) { + this.handshakePromise.setFailure(cause); + } + ctx.close(); + } +} diff --git a/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/IBaseConnectionHandler.java b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/IBaseConnectionHandler.java new file mode 100644 index 0000000..7f0428b --- /dev/null +++ b/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/IBaseConnectionHandler.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.handler.base; + +import io.netty.channel.Channel; + +/** + * @author mjz + * @date 2024/3/9 + */ +public interface IBaseConnectionHandler { + + /** + * 发送心跳包 + */ + default void sendHeartbeat(Channel channel) { + // ignore + } + + /** + * 发送认证包 + */ + default void sendAuthRequest(Channel channel) { + // ignore + } + +} diff --git a/live-chat-client-servers/pom.xml b/live-chat-client-servers/pom.xml new file mode 100644 index 0000000..532f867 --- /dev/null +++ b/live-chat-client-servers/pom.xml @@ -0,0 +1,46 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-client + 0.7.0 + + pom + + live-chat-client-servers + live-chat-client-servers + + + UTF-8 + + + + live-chat-client-servers-netty + live-chat-client-servers-netty-client + + diff --git a/live-chat-clients/live-chat-client-bilibili/pom.xml b/live-chat-clients/live-chat-client-bilibili/pom.xml new file mode 100644 index 0000000..8b8da29 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/pom.xml @@ -0,0 +1,60 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-clients + 0.7.0 + + jar + + live-chat-client-bilibili + live-chat-client-bilibili + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-codec-bilibili + + + + tech.ordinaryroad + live-chat-client-websocket + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClient.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClient.java new file mode 100644 index 0000000..a00fcc8 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClient.java @@ -0,0 +1,222 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.client; + +import cn.hutool.core.util.StrUtil; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.config.BilibiliLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliConnectionListener; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.listener.impl.BilibiliForwardMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliConnectionHandler; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliLiveChatClientChannelInitializer; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCollUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * B站直播间弹幕客户端 + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class BilibiliLiveChatClient extends BaseNettyClient< + BilibiliLiveChatClientConfig, + BilibiliCmdEnum, + IBilibiliMsg, + IBilibiliMsgListener, + BilibiliConnectionHandler, + BilibiliBinaryFrameHandler + > { + + @Getter + private BilibiliApis.RoomInitResult roomInitResult = new BilibiliApis.RoomInitResult(); + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, List msgListeners, IBilibiliConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 初始化 + this.init(); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 初始化 + this.init(); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + roomInitResult = BilibiliApis.roomInit(getConfig().getRoomId(), getConfig().getCookie()); + if (StrUtil.isNotBlank(getConfig().getForwardWebsocketUri())) { + BilibiliForwardMsgListener forwardMsgListener = new BilibiliForwardMsgListener(getConfig().getForwardWebsocketUri()); + addMsgListener(forwardMsgListener); + addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.DESTROYED) { + forwardMsgListener.destroyForwardClient(); + } + }); + } + super.init(); + } + + @Override + protected void initChannel(SocketChannel channel) { + channel.pipeline().addLast(new BilibiliLiveChatClientChannelInitializer(this)); + } + + @Override + public BilibiliConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + return new BilibiliConnectionHandler( + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(getWebsocketUri()) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(new DefaultHttpHeaders()) + .maxFramePayloadLength(getConfig().getMaxFramePayloadLength()) + .handshakeTimeoutMillis(getConfig().getHandshakeTimeoutMillis()) + .build() + ), + BilibiliLiveChatClient.this, clientConnectionListener + ); + } + + @Override + protected String getWebSocketUriString() { + String webSocketUriString = super.getWebSocketUriString(); + if (StrUtil.isNotBlank(webSocketUriString)) { + return webSocketUriString; + } + BilibiliApis.Host_list hostList = OrLiveChatCollUtil.getRandom(roomInitResult.getDanmuinfoResult().getHost_list()); + return StrUtil.format("wss://{}:{}/sub", hostList.getHost(), hostList.getWss_port()); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer failed) { + if (!checkCanSendDanmu(false)) { + return; + } + if (danmu instanceof String) { + String msg = (String) danmu; + try { + if (log.isDebugEnabled()) { + log.debug("{} bilibili发送弹幕 {}", getConfig().getRoomId(), danmu); + } + + boolean sendSuccess = false; + try { + BilibiliApis.sendMsg(msg, roomInitResult.getRoomPlayInfoResult().getRoom_id(), getConfig().getCookie()); + sendSuccess = true; + } catch (Exception e) { + log.error("bilibili弹幕发送失败", e); + if (failed != null) { + failed.accept(e); + } + } + if (!sendSuccess) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("bilibili弹幕发送成功 {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + } catch (Exception e) { + log.error("bilibili弹幕发送失败", e); + if (failed != null) { + failed.accept(e); + } + } + } else { + super.sendDanmu(danmu, success, failed); + } + } + + @Override + public void clickLike(int count, Runnable success, Consumer failed) { + if (count <= 0) { + throw new BaseException("点赞次数必须大于0"); + } + + boolean successfullyClicked = false; + try { + BilibiliApis.likeReportV3(roomInitResult.getRoomPlayInfoResult().getUid(), roomInitResult.getRoomPlayInfoResult().getRoom_id(), getConfig().getCookie()); + successfullyClicked = true; + } catch (Exception e) { + log.error("Bilibili为直播间点赞失败", e); + if (failed != null) { + failed.accept(e); + } + } + if (!successfullyClicked) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("Bilibili为直播间点赞成功"); + } + if (success != null) { + success.run(); + } + } +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/config/BilibiliLiveChatClientConfig.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/config/BilibiliLiveChatClientConfig.java new file mode 100644 index 0000000..a729799 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/config/BilibiliLiveChatClientConfig.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatNumberUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * B站直播间弹幕客户端配置 + * + * @author mjz + * @date 2023/8/21 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class BilibiliLiveChatClientConfig extends BaseNettyClientConfig { + + /** + * @see ProtoverEnum + */ + @Builder.Default + private ProtoverEnum protover = ProtoverEnum.NORMAL_BROTLI; + + @Override + public Long getRoomId() { + return OrLiveChatNumberUtil.parseLong(super.getRoomId()); + } + + public void setProtover(ProtoverEnum protover) { + ProtoverEnum oldValue = this.protover; + this.protover = protover; + super.propertyChangeSupport.firePropertyChange("protover", oldValue, protover); + } +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliConnectionListener.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliConnectionListener.java new file mode 100644 index 0000000..74248b1 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliConnectionListener.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.listener; + + +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliConnectionHandler; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; + +/** + * 连接回调 + * + * @author mjz + * @date 2023/8/21 + */ +public interface IBilibiliConnectionListener extends IBaseConnectionListener { +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliMsgListener.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliMsgListener.java new file mode 100644 index 0000000..a5da519 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliMsgListener.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.listener; + +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.commons.base.listener.*; + +/** + * @author mjz + * @date 2023/1/7 + */ +public interface IBilibiliMsgListener extends IBaseMsgListener, + IDanmuMsgListener, + IGiftMsgListener, + ISuperChatMsgListener, + IEnterRoomMsgListener, + ILikeMsgListener, + ILiveStatusChangeListener, + IRoomStatsMsgListener { + + /** + * 入场效果(高能用户) + * + * @param binaryFrameHandler BilibiliBinaryFrameHandler + * @param messageMsg SendSmsReplyMsg + */ + default void onEntryEffect(BilibiliBinaryFrameHandler binaryFrameHandler, MessageMsg messageMsg) { + this.onEntryEffect(messageMsg); + } + + default void onEntryEffect(MessageMsg messageMsg) { + // ignore + } +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/impl/BilibiliForwardMsgListener.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/impl/BilibiliForwardMsgListener.java new file mode 100644 index 0000000..5b0f5b4 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/impl/BilibiliForwardMsgListener.java @@ -0,0 +1,108 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.listener.impl; + +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; + +import java.nio.charset.StandardCharsets; + +/** + * @author mjz + * @date 2024/3/8 + * @since 0.3.0 + */ +public class BilibiliForwardMsgListener implements IBilibiliMsgListener { + + private final WebSocketLiveChatClient webSocketLiveChatClient; + + public BilibiliForwardMsgListener(String webSocketUri) { + if (StrUtil.isBlank(webSocketUri)) { + throw new BaseException("转发地址不能为空"); + } + webSocketLiveChatClient = new WebSocketLiveChatClient( + WebSocketLiveChatClientConfig.builder() + .websocketUri(webSocketUri) + .build() + ); + webSocketLiveChatClient.connect(); + } + + @Override + public void onDanmuMsg(DanmuMsgMsg msg) { + forward(msg); + } + + @Override + public void onGiftMsg(SendGiftMsg msg) { + forward(msg); + } + + @Override + public void onSuperChatMsg(SuperChatMessageMsg msg) { + forward(msg); + } + + @Override + public void onEnterRoomMsg(InteractWordMsg msg) { + forward(msg); + } + + @Override + public void onLikeMsg(LikeInfoV3ClickMsg msg) { + forward(msg); + } + + @Override + public void onEntryEffect(MessageMsg msg) { + forward(msg); + } + + @Override + public void onLiveStatusMsg(BilibiliLiveStatusChangeMsg msg) { + forward(msg); + } + + private void forward(IMsg msg) { + if (webSocketLiveChatClient == null) { + return; + } + ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer(); + byteBuf.writeCharSequence(msg.toString(), StandardCharsets.UTF_8); + webSocketLiveChatClient.send(new BinaryWebSocketFrame(byteBuf)); + } + + public void destroyForwardClient() { + webSocketLiveChatClient.destroy(); + } +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliBinaryFrameHandler.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliBinaryFrameHandler.java new file mode 100644 index 0000000..a46a3c7 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliBinaryFrameHandler.java @@ -0,0 +1,153 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.handler; + +import cn.hutool.core.lang.Pair; +import cn.hutool.core.util.StrUtil; +import io.netty.channel.ChannelHandler; +import lombok.Getter; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.List; + + +/** + * 消息处理器 + * + * @author mjz + * @date 2023/1/4 + */ +@Slf4j +@ChannelHandler.Sharable +public class BilibiliBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler { + + /** + * 房间号,短房间号 + */ + @Getter + private final Pair roomIdPair; + + public BilibiliBinaryFrameHandler(List msgListeners, BilibiliLiveChatClient client) { + super(msgListeners, client); + this.roomIdPair = Pair.of(client.getRoomInitResult().getRoomPlayInfoResult().getRoom_id(), client.getRoomInitResult().getRoomPlayInfoResult().getShort_id()); + } + + public BilibiliBinaryFrameHandler(List msgListeners, long roomId, Pair roomIdPair) { + super(msgListeners, roomId); + this.roomIdPair = roomIdPair; + } + + @SneakyThrows + @Override + public void onCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + MessageMsg messageMsg = (MessageMsg) cmdMsg; + switch (cmd) { + case DANMU_MSG: { + DanmuMsgMsg danmuMsgMsg = new DanmuMsgMsg(); + danmuMsgMsg.setProtover(messageMsg.getProtover()); + danmuMsgMsg.setInfo(messageMsg.getInfo()); + danmuMsgMsg.setDm_v2(StrUtil.toStringOrNull(messageMsg.getUnknownProperties().get("dm_v2"))); + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(BilibiliBinaryFrameHandler.this, danmuMsgMsg)); + break; + } + + case SEND_GIFT: { + SendGiftMsg sendGiftMsg = new SendGiftMsg(); + sendGiftMsg.setRoomId(getRoomIdAsLong()); + sendGiftMsg.setProtover(messageMsg.getProtover()); + SendGiftMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(messageMsg.getData(), SendGiftMsg.Data.class); + sendGiftMsg.setData(data); + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(BilibiliBinaryFrameHandler.this, sendGiftMsg)); + break; + } + + case SUPER_CHAT_MESSAGE: { + SuperChatMessageMsg superChatMessageMsg = new SuperChatMessageMsg(); + superChatMessageMsg.setProtover(messageMsg.getProtover()); + superChatMessageMsg.setRoomid(messageMsg.getRoomid()); + SuperChatMessageMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(messageMsg.getData(), SuperChatMessageMsg.Data.class); + superChatMessageMsg.setData(data); + iteratorMsgListeners(msgListener -> msgListener.onSuperChatMsg(BilibiliBinaryFrameHandler.this, superChatMessageMsg)); + break; + } + + case INTERACT_WORD: { + InteractWordMsg interactWordMsg = new InteractWordMsg(); + interactWordMsg.setProtover(messageMsg.getProtover()); + InteractWordMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(messageMsg.getData(), InteractWordMsg.Data.class); + interactWordMsg.setData(data); + iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(BilibiliBinaryFrameHandler.this, interactWordMsg)); + break; + } + + case ENTRY_EFFECT: { + iteratorMsgListeners(msgListener -> msgListener.onEntryEffect(BilibiliBinaryFrameHandler.this, messageMsg)); + break; + } + + case ONLINE_RANK_COUNT: + case WATCHED_CHANGE: + case LIKE_INFO_V3_UPDATE: { + BilibiliRoomStatsMsg bilibiliRoomStatsMsg = BaseBilibiliMsg.OBJECT_MAPPER.convertValue(messageMsg, BilibiliRoomStatsMsg.class); + iteratorMsgListeners(msgListener -> msgListener.onRoomStatsMsg(BilibiliBinaryFrameHandler.this, bilibiliRoomStatsMsg)); + break; + } + + case LIKE_INFO_V3_CLICK: { + LikeInfoV3ClickMsg likeInfoV3ClickMsg = new LikeInfoV3ClickMsg(); + likeInfoV3ClickMsg.setProtover(messageMsg.getProtover()); + LikeInfoV3ClickMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(messageMsg.getData(), LikeInfoV3ClickMsg.Data.class); + likeInfoV3ClickMsg.setData(data); + iteratorMsgListeners(msgListener -> msgListener.onLikeMsg(BilibiliBinaryFrameHandler.this, likeInfoV3ClickMsg)); + break; + } + + case LIVE: + case STOP_LIVE_ROOM_LIST: { + BilibiliLiveStatusChangeMsg bilibiliLiveStatusChangeMsg = BaseBilibiliMsg.OBJECT_MAPPER.convertValue(messageMsg, BilibiliLiveStatusChangeMsg.class); + bilibiliLiveStatusChangeMsg.setRoomIdPair(getRoomIdPair()); + iteratorMsgListeners(msgListener -> msgListener.onLiveStatusMsg(BilibiliBinaryFrameHandler.this, bilibiliLiveStatusChangeMsg)); + break; + } + + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(BilibiliBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliCodecHandler.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliCodecHandler.java new file mode 100644 index 0000000..d4bece7 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliCodecHandler.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.handler; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.codec.bilibili.util.BilibiliCodecUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BinaryWebSocketFrameToMessageCodec; + +import java.util.List; + +/** + * B站编解码Handler + * + * @author mjz + * @date 2024/3/22 + */ +public class BilibiliCodecHandler extends BinaryWebSocketFrameToMessageCodec { + @Override + protected void encode(ChannelHandlerContext ctx, IBilibiliMsg msg, List out) throws Exception { + out.add(new BinaryWebSocketFrame(BilibiliCodecUtil.encode(msg, ctx.alloc().buffer()))); + } + + @Override + protected void decode(ChannelHandlerContext ctx, BinaryWebSocketFrame msg, List out) throws Exception { + out.addAll(BilibiliCodecUtil.decode(msg.content())); + } +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliConnectionHandler.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliConnectionHandler.java new file mode 100644 index 0000000..57ece57 --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliConnectionHandler.java @@ -0,0 +1,153 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.factory.BilibiliMsgFactory; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + +import java.util.function.Supplier; + + +/** + * 连接处理器 + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@ChannelHandler.Sharable +public class BilibiliConnectionHandler extends BaseNettyClientConnectionHandler { + + /** + * 以ClientConfig为主 + */ + private final long roomId; + /** + * 以ClientConfig为主 + */ + private final ProtoverEnum protover; + /** + * 以ClientConfig为主 + */ + private String cookie; + + /** + * 发送认证包需要 + * 以ClientConfig为主 + */ + private final BilibiliApis.RoomInitResult roomInitResult; + + public BilibiliConnectionHandler(Supplier webSocketProtocolHandler, BilibiliLiveChatClient client, IBaseConnectionListener listener) { + super(webSocketProtocolHandler, client, listener); + this.roomInitResult = client.getRoomInitResult(); + this.roomId = client.getConfig().getRoomId(); + this.protover = client.getConfig().getProtover(); + this.cookie = client.getConfig().getCookie(); + } + + public BilibiliConnectionHandler(Supplier webSocketProtocolHandler, BilibiliLiveChatClient client) { + this(webSocketProtocolHandler, client, null); + } + + public BilibiliConnectionHandler(Supplier webSocketProtocolHandler, BilibiliApis.RoomInitResult roomInitResult, long roomId, ProtoverEnum protover, IBaseConnectionListener listener, String cookie) { + super(webSocketProtocolHandler, listener); + this.roomInitResult = roomInitResult; + this.roomId = roomId; + this.protover = protover; + this.cookie = cookie; + } + + public BilibiliConnectionHandler(Supplier webSocketProtocolHandler, BilibiliApis.RoomInitResult roomInitResult, long roomId, ProtoverEnum protover, IBaseConnectionListener listener) { + this(webSocketProtocolHandler, roomInitResult, roomId, protover, listener, null); + } + + public BilibiliConnectionHandler(Supplier webSocketProtocolHandler, BilibiliApis.RoomInitResult roomInitResult, long roomId, ProtoverEnum protover, String cookie) { + this(webSocketProtocolHandler, roomInitResult, roomId, protover, null, cookie); + } + + public BilibiliConnectionHandler(Supplier webSocketProtocolHandler, BilibiliApis.RoomInitResult roomInitResult, long roomId, ProtoverEnum protover) { + this(webSocketProtocolHandler, roomInitResult, roomId, protover, null, null); + } + + @Override + public void sendHeartbeat(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("发送心跳包"); + } + channel.writeAndFlush(getWebSocketFrameFactory(getRoomId()).createHeartbeat(getProtover())) + .addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("心跳包发送完成"); + } + } else { + log.error("心跳包发送失败", future.cause()); + } + }); + } + + private static BilibiliMsgFactory getWebSocketFrameFactory(long roomId) { + return BilibiliMsgFactory.getInstance(roomId); + } + + @Override + public void sendAuthRequest(Channel channel) { + // 5s内认证 + if (log.isDebugEnabled()) { + log.debug("发送认证包"); + } + channel.writeAndFlush(getWebSocketFrameFactory(getRoomId()).createAuth(getProtover(), roomInitResult)) + .addListener(future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("认证包发送完成"); + } + } else { + log.error("认证包发送失败", future.cause()); + } + }); + } + + public long getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private ProtoverEnum getProtover() { + return client != null ? client.getConfig().getProtover() : protover; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliLiveChatClientChannelInitializer.java b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliLiveChatClientChannelInitializer.java new file mode 100644 index 0000000..fa50cca --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliLiveChatClientChannelInitializer.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.handler; + +import io.netty.channel.ChannelPipeline; +import io.netty.channel.socket.SocketChannel; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientChannelInitializer; + +/** + * @author mjz + * @date 2024/3/22 + */ +public class BilibiliLiveChatClientChannelInitializer extends BaseNettyClientChannelInitializer { + + public BilibiliLiveChatClientChannelInitializer(BilibiliLiveChatClient client) { + super(client); + } + + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + // 添加一个编解码器 + pipeline.addLast(new BilibiliCodecHandler()); + // 添加一个消息处理器 + pipeline.addLast(new BilibiliBinaryFrameHandler(client.getMsgListeners(), client)); + } +} diff --git a/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClientTest.java b/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClientTest.java new file mode 100644 index 0000000..531c6fe --- /dev/null +++ b/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClientTest.java @@ -0,0 +1,195 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.client; + +import com.fasterxml.jackson.databind.JsonNode; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.bilibili.config.BilibiliLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.codec.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.constant.BilibiliLiveStatusEnum; +import tech.ordinaryroad.live.chat.client.codec.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; + +import java.io.IOException; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Slf4j +class BilibiliLiveChatClientTest { + + static Object lock = new Object(); + BilibiliLiveChatClient client; + + @Test + void example() throws InterruptedException { + String cookie = System.getenv("cookie"); + log.error("cookie: {}", cookie); + BilibiliLiveChatClientConfig config = BilibiliLiveChatClientConfig.builder() + // TODO 浏览器Cookie + .cookie(cookie) + .roomId(7777) + .build(); + + client = new BilibiliLiveChatClient(config, new IBilibiliMsgListener() { + @Override + public void onDanmuMsg(BilibiliBinaryFrameHandler binaryFrameHandler, DanmuMsgMsg msg) { + IBilibiliMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + log.info("{} 收到弹幕 {} {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SendGiftMsg msg) { + IBilibiliMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + log.info("{} 收到礼物 {} {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getData().getAction(), msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onSuperChatMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SuperChatMessageMsg msg) { + IBilibiliMsgListener.super.onSuperChatMsg(binaryFrameHandler, msg); + log.info("{} 收到醒目留言 {}({}):{}", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onEnterRoomMsg(InteractWordMsg msg) { + log.info("{} {}({}) 进入直播间", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onLikeMsg(BilibiliBinaryFrameHandler binaryFrameHandler, LikeInfoV3ClickMsg msg) { + IBilibiliMsgListener.super.onLikeMsg(binaryFrameHandler, msg); + log.info("{} 收到点赞 [{}] {}({})x{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getClickCount()); + } + + @Override + public void onLiveStatusMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliLiveStatusChangeMsg msg) { + IBilibiliMsgListener.super.onLiveStatusMsg(binaryFrameHandler, msg); + log.error("{} 状态变化 {}", binaryFrameHandler.getRoomId(), msg.getLiveStatusAction()); + } + + @Override + public void onRoomStatsMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliRoomStatsMsg msg) { + IBilibiliMsgListener.super.onRoomStatsMsg(binaryFrameHandler, msg); + log.info("{} 统计信息 累计点赞数: {}, 当前观看人数: {}, 累计观看人数: {}", binaryFrameHandler.getRoomId(), msg.getLikedCount(), msg.getWatchingCount(), msg.getWatchedCount()); + } + + @Override + public void onEntryEffect(BilibiliBinaryFrameHandler binaryFrameHandler, MessageMsg msg) { + JsonNode data = msg.getData(); + String copyWriting = data.get("copy_writing").asText(); + log.info("入场效果 {}", copyWriting); + } + + @Override + public void onMsg(IMsg msg) { + // log.debug("收到{}消息 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + log.debug("收到CMD消息{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(BilibiliCmdEnum cmd, ICmdMsg cmdMsg) { + log.debug("收到其他CMD消息 {}", cmd); + if (!((MessageMsg) cmdMsg).getUnknownProperties().isEmpty()) { + int size = ((MessageMsg) cmdMsg).getUnknownProperties().size(); + } + switch (cmd) { + case GUARD_BUY: { + // 有人上舰 + MessageMsg messageMsg = (MessageMsg) cmdMsg; + break; + } + case SUPER_CHAT_MESSAGE_DELETE: { + // 删除醒目留言 + MessageMsg messageMsg = (MessageMsg) cmdMsg; + break; + } + } + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("收到未知CMD消息 {}", cmdString); + } + }); + client.connect(); + + client.addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.CONNECTED) { + if (oldStatus == ClientStatusEnums.CONNECTING) { + // 0 未开播,1 直播中,2 投稿视频 + log.error("开播状态: {}", client.getRoomInitResult().getRoomPlayInfoResult().getLive_status()); +// ThreadUtil.execAsync(() -> { +// ThreadUtil.sleep(5000); +// client.clickLike(5, () -> { +// log.warn("为主播点赞成功"); +// }); +// }); + } else if (oldStatus == ClientStatusEnums.RECONNECTING) { + BilibiliApis.RoomPlayInfoResult roomPlayInfo = BilibiliApis.getRoomPlayInfo(client.getConfig().getRoomId(), client.getConfig().getCookie()); + BilibiliLiveStatusEnum liveStatus = roomPlayInfo.getLive_status(); + log.error("重连后的开播状态: {}", liveStatus); + } + } + }); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void liveStatusChangeTest() throws IOException { + BilibiliLiveChatClient bilibiliLiveChatClient = new BilibiliLiveChatClient(BilibiliLiveChatClientConfig.builder() + .roomId(8159061) + .build()); + bilibiliLiveChatClient.addMsgListener(new IBilibiliMsgListener() { + @Override + public void onLiveStatusMsg(BilibiliBinaryFrameHandler binaryFrameHandler, BilibiliLiveStatusChangeMsg msg) { + IBilibiliMsgListener.super.onLiveStatusMsg(binaryFrameHandler, msg); + log.error("{} 状态变化 {} data: {}", binaryFrameHandler.getRoomId(), msg.getLiveStatusAction(), msg.getData()); + } + }); + bilibiliLiveChatClient.connect(); + + while (true) { + System.in.read(); + } + } + +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-douyin/pom.xml b/live-chat-clients/live-chat-client-douyin/pom.xml new file mode 100644 index 0000000..b3fe074 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-clients + 0.7.0 + + jar + + live-chat-client-douyin + live-chat-client-douyin + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-codec-douyin + + + + tech.ordinaryroad + live-chat-client-websocket + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClient.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClient.java new file mode 100644 index 0000000..cd72f35 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClient.java @@ -0,0 +1,253 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.client; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.GlobalHeaders; +import cn.hutool.http.Header; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyin.api.DouyinApis; +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCollUtil; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatHttpUtil; +import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinConnectionListener; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.douyin.listener.impl.DouyinForwardMsgListener; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinConnectionHandler; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinLiveChatClientChannelInitializer; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +public class DouyinLiveChatClient extends BaseNettyClient< + DouyinLiveChatClientConfig, + DouyinCmdEnum, + IDouyinMsg, + IDouyinMsgListener, + DouyinConnectionHandler, + DouyinBinaryFrameHandler> { + + @Getter + private DouyinApis.RoomInitResult roomInitResult = new DouyinApis.RoomInitResult(); + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, List msgListeners, IDouyinConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 初始化 + this.init(); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener, IDouyinConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 初始化 + this.init(); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener, IDouyinConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + roomInitResult = DouyinApis.roomInit(getConfig().getRoomId(), getConfig().getCookie()); + if (StrUtil.isNotBlank(getConfig().getForwardWebsocketUri())) { + DouyinForwardMsgListener forwardMsgListener = new DouyinForwardMsgListener(getConfig().getForwardWebsocketUri()); + addMsgListener(forwardMsgListener); + addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.DESTROYED) { + forwardMsgListener.destroyForwardClient(); + } + }); + } + super.init(); + } + + @Override + public DouyinConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + DefaultHttpHeaders headers = new DefaultHttpHeaders(); + headers.add(Header.COOKIE.name(), DouyinApis.KEY_COOKIE_TTWID + "=" + roomInitResult.getTtwid()); + headers.add(Header.USER_AGENT.name(), GlobalHeaders.INSTANCE.header(Header.USER_AGENT)); + return new DouyinConnectionHandler( + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(getWebsocketUri()) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(headers) + .maxFramePayloadLength(getConfig().getMaxFramePayloadLength()) + .handshakeTimeoutMillis(getConfig().getHandshakeTimeoutMillis()) + .build() + ), + DouyinLiveChatClient.this, clientConnectionListener + ); + } + + @Override + protected void initChannel(SocketChannel channel) { + channel.pipeline().addLast(new DouyinLiveChatClientChannelInitializer(this)); + } + + @Override + protected String getWebSocketUriString() { + String webSocketUriString = super.getWebSocketUriString(); + if (StrUtil.isBlank(webSocketUriString)) { + webSocketUriString = OrLiveChatCollUtil.getRandom(DouyinLiveChatClientConfig.WEB_SOCKET_URIS); + } + + long realRoomId = roomInitResult.getRealRoomId(); + String userUniqueId = roomInitResult.getUserUniqueId(); + + Map queryParams = new HashMap<>(); + queryParams.put("app_name", "douyin_web"); + queryParams.put("version_code", getConfig().getVersionCode()); + queryParams.put("webcast_sdk_version", getConfig().getWebcastSdkVersion()); + queryParams.put("update_version_code", getConfig().getUpdateVersionCode()); + queryParams.put("compress", "gzip"); + queryParams.put("device_platform", "web"); + queryParams.put("cookie_enabled", "true"); + queryParams.put("screen_width", "1280"); + queryParams.put("screen_height", "800"); + queryParams.put("browser_language", "zh-CN"); + queryParams.put("browser_platform", "MacIntel"); + queryParams.put("browser_name", "Mozilla"); + queryParams.put("browser_version", "5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/116.0.0.0%20Safari/537.36"); + queryParams.put("browser_online", "true"); + queryParams.put("tz_name", "Asia/Shanghai"); + queryParams.put("host", "https://live.douyin.com"); + queryParams.put("im_path", "/webcast/im/fetch/"); + queryParams.put("endpoint", "live_pc"); + queryParams.put("identity", "audience"); + + queryParams.put("support_wrds", "1"); + queryParams.put("heartbeatDuration ", "0"); + queryParams.put("live_id", "1"); + queryParams.put("did_rule", "3"); + queryParams.put("aid", "6383"); + + queryParams.put("room_id", Long.toString(realRoomId)); + queryParams.put("user_unique_id", userUniqueId); + // TODO 生成signature + queryParams.put("signature", "00000000"); + queryParams.put("cursor", "t-" + System.currentTimeMillis() + "_r-1_d-1_u-1_h-1"); + queryParams.put("internal_ext", "internal_src:dim|" + + "wss_push_room_id:" + realRoomId + "|" + + "wss_push_did:" + userUniqueId + "|" + + "dim_log_id:" + DateUtil.format(new Date(), "yyyy-MM-dd") + RandomUtil.randomNumbers(6) + RandomUtil.randomString("0123456789ABCDEF", 20) + "|" + + "first_req_ms:" + System.currentTimeMillis() + "|" + + "fetch_time:" + System.currentTimeMillis() + "|" + + "seq:1|" + + "wss_info:0-" + System.currentTimeMillis() + "-0-0|" + + "wrds_kvs:WebcastRoomStatsMessage-" + System.nanoTime() + "_WebcastRoomRankMessage-" + System.nanoTime() + "_LotteryInfoSyncData-" + System.nanoTime() + "_WebcastActivityEmojiGroupsMessage-" + System.nanoTime()); + return webSocketUriString + "?" + OrLiveChatHttpUtil.toParams(queryParams); + } + + public void sendDanmu(Object danmu, Runnable success, Consumer failed) { +// if (!checkCanSendDanmu()) { +// return; +// } + if (danmu instanceof String) { + String msg = (String) danmu; + try { + if (log.isDebugEnabled()) { + log.debug("{} 抖音发送弹幕 {}", getConfig().getRoomId(), danmu); + } + + boolean sendSuccess = false; + try { + DouyinApis.sendComment(getConfig().getCookie(), + getConfig().getRoomId(), + roomInitResult.getRealRoomId(), + roomInitResult.getAid(), + DouyinApis.SendCommentRequest.builder() +// .liveStreamId(roomInitResult.getLiveStreamId()) + .content(msg) + .build() + ); + sendSuccess = true; + } catch (Exception e) { + log.error("抖音弹幕发送失败", e); + if (failed != null) { + failed.accept(e); + } + } + if (!sendSuccess) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("抖音弹幕发送成功 {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + } catch (Exception e) { + log.error("抖音弹幕发送失败", e); + if (failed != null) { + failed.accept(e); + } + } + } else { + super.sendDanmu(danmu, success, failed); + } + } + +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/config/DouyinLiveChatClientConfig.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/config/DouyinLiveChatClientConfig.java new file mode 100644 index 0000000..c637017 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/config/DouyinLiveChatClientConfig.java @@ -0,0 +1,102 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.config; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +import java.util.List; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class DouyinLiveChatClientConfig extends BaseNettyClientConfig { + + public static final List WEB_SOCKET_URIS = CollUtil.newArrayList("wss://webcast5-ws-web-lq.douyin.com/webcast/im/push/v2/", "wss://webcast5-ws-web-lf.douyin.com/webcast/im/push/v2/", "wss://webcast5-ws-web-hl.douyin.com/webcast/im/push/v2/"); + + @Builder.Default + private long heartbeatInitialDelay = 5; + + @Builder.Default + private long heartbeatPeriod = 10; + + @Builder.Default + private int aggregatorMaxContentLength = 64 * 1024 * 1024; + + @Builder.Default + private int maxFramePayloadLength = 64 * 1024 * 1024; + + private String versionCode = "180800"; + + private String webcastSdkVersion = "1.0.12"; + + private String updateVersionCode = "1.0.12"; + + /** + * 示例 + * wss://webcast5-ws-web-lf.douyin.com/webcast/im/push/v2/ + * ?app_name=douyin_web + * &version_code=180800 + * &webcast_sdk_version=1.0.12 + * &update_version_code=1.0.12 + * &compress=gzip + * &device_platform=web + * &cookie_enabled=true + * &screen_width=1512 + * &screen_height=982 + * &browser_language=zh-CN + * &browser_platform=MacIntel + * &browser_name=Mozilla + * &browser_version=5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/118.0.0.0%20Safari/537.36 + * &browser_online=true + * &tz_name=Asia/Shanghai + * &cursor=u-1_h-1_t-1704202376885_r-1_d-1 + * &internal_ext=internal_src:dim|wss_push_room_id:7319486720022301449|wss_push_did:7319492411867170356|dim_log_id:20240102213256AAA5B735ADBE992BEF6A|first_req_ms:1704202376757|fetch_time:1704202376885|seq:1|wss_info:0-1704202376885-0-0|wrds_kvs:WebcastActivityEmojiGroupsMessage-1704200830782138545_WebcastRoomRankMessage-1704202270876589607_WebcastRoomStatsMessage-1704202372842388781 + * &host=https://live.douyin.com + * &aid=6383 + * &live_id=1 + * &did_rule=3 + * &endpoint=live_pc + * &support_wrds=1 + * &user_unique_id=7319492411867170356 + * &im_path=/webcast/im/fetch/ + * &identity=audience + * &need_persist_msg_count=15 + * &room_id=7319486720022301449 + * &heartbeatDuration=0 + * &signature=Wk407jV1/WbnoIGk + */ + +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinConnectionListener.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinConnectionListener.java new file mode 100644 index 0000000..9be4cea --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinConnectionListener.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinConnectionHandler; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinConnectionListener extends IBaseConnectionListener { +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinMsgListener.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinMsgListener.java new file mode 100644 index 0000000..cd0c844 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinMsgListener.java @@ -0,0 +1,43 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.listener; + +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.*; +import tech.ordinaryroad.live.chat.client.commons.base.listener.*; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinMsgListener extends IBaseMsgListener, + IDanmuMsgListener, + IGiftMsgListener, + IEnterRoomMsgListener, + ILikeMsgListener, + ILiveStatusChangeListener, + IRoomStatsMsgListener { +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/impl/DouyinForwardMsgListener.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/impl/DouyinForwardMsgListener.java new file mode 100644 index 0000000..4d93442 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/impl/DouyinForwardMsgListener.java @@ -0,0 +1,98 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.listener.impl; + +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.*; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; + +import java.nio.charset.StandardCharsets; + +/** + * @author mjz + * @date 2024/3/8 + * @since 0.3.0 + */ +public class DouyinForwardMsgListener implements IDouyinMsgListener { + + private final WebSocketLiveChatClient webSocketLiveChatClient; + + public DouyinForwardMsgListener(String webSocketUri) { + if (StrUtil.isBlank(webSocketUri)) { + throw new BaseException("转发地址不能为空"); + } + webSocketLiveChatClient = new WebSocketLiveChatClient( + WebSocketLiveChatClientConfig.builder() + .websocketUri(webSocketUri) + .build() + ); + webSocketLiveChatClient.connect(); + } + + @Override + public void onDanmuMsg(DouyinDanmuMsg msg) { + forward(msg); + } + + @Override + public void onGiftMsg(DouyinGiftMsg msg) { + forward(msg); + } + + @Override + public void onEnterRoomMsg(DouyinEnterRoomMsg msg) { + forward(msg); + } + + @Override + public void onLikeMsg(DouyinLikeMsg msg) { + forward(msg); + } + + @Override + public void onLiveStatusMsg(DouyinControlMsg msg) { + forward(msg); + } + + private void forward(IMsg msg) { + if (webSocketLiveChatClient == null) { + return; + } + ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer(); + byteBuf.writeCharSequence(msg.toString(), StandardCharsets.UTF_8); + webSocketLiveChatClient.send(new BinaryWebSocketFrame(byteBuf)); + } + + public void destroyForwardClient() { + webSocketLiveChatClient.destroy(); + } +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinBinaryFrameHandler.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinBinaryFrameHandler.java new file mode 100644 index 0000000..f222daa --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinBinaryFrameHandler.java @@ -0,0 +1,172 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.netty.handler; + +import cn.hutool.core.util.NumberUtil; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyin.api.DouyinApis; +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.*; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.*; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.io.IOException; +import java.util.List; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyinBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler { + + private ChannelHandlerContext channelHandlerContext; + + public DouyinBinaryFrameHandler(List iDouyinMsgListeners, DouyinLiveChatClient client) { + super(iDouyinMsgListeners, client); + } + + public DouyinBinaryFrameHandler(List iDouyinMsgListeners, long roomId) { + super(iDouyinMsgListeners, roomId); + } + + @Override + public void handlerAdded(ChannelHandlerContext ctx) throws Exception { + super.handlerAdded(ctx); + channelHandlerContext = ctx; + } + + @Override + public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { + super.handlerRemoved(ctx); + channelHandlerContext = null; + } + + @Override + public void onCmdMsg(DouyinCmdEnum cmd, ICmdMsg cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + ByteString payload = ((DouyinCmdMsg) cmdMsg).getMsg().getPayload(); + switch (cmd) { + case WebcastChatMessage: { + try { + DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg douyinWebcastChatMessageMsg = DouyinWebcastChatMessageMsgOuterClass.DouyinWebcastChatMessageMsg.parseFrom(payload); + DouyinDanmuMsg msg = new DouyinDanmuMsg(douyinWebcastChatMessageMsg); + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(DouyinBinaryFrameHandler.this, msg)); + } catch (IOException e) { + throw new BaseException(e); + } + break; + } + case WebcastGiftMessage: { + try { + DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg douyinWebcastGiftMessageMsg = DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg.parseFrom(payload); + DouyinGiftMsg msg = new DouyinGiftMsg(douyinWebcastGiftMessageMsg); + // 计算礼物个数 + DouyinApis.calculateGiftCount(msg); + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(DouyinBinaryFrameHandler.this, msg)); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + case WebcastMemberMessage: { + try { + DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg douyinWebcastMemberMessageMsg = DouyinWebcastMemberMessageMsgOuterClass.DouyinWebcastMemberMessageMsg.parseFrom(payload); + DouyinEnterRoomMsg msg = new DouyinEnterRoomMsg(douyinWebcastMemberMessageMsg); + iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(DouyinBinaryFrameHandler.this, msg)); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + case WebcastLikeMessage: { + try { + DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg douyinWebcastLikeMessageMsg = DouyinWebcastLikeMessageMsgOuterClass.DouyinWebcastLikeMessageMsg.parseFrom(payload); + DouyinLikeMsg msg = new DouyinLikeMsg(douyinWebcastLikeMessageMsg); + + DouyinRoomStatsMsg douyinRoomStatsMsg = new DouyinRoomStatsMsg(); + douyinRoomStatsMsg.setLikedCount(NumberUtil.toStr(douyinWebcastLikeMessageMsg.getTotal())); + + iteratorMsgListeners(msgListener -> { + msgListener.onLikeMsg(DouyinBinaryFrameHandler.this, msg); + msgListener.onRoomStatsMsg(DouyinBinaryFrameHandler.this, douyinRoomStatsMsg); + }); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + + case WebcastControlMessage: { + try { + DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg douyinWebcastControlMessageMsg = DouyinWebcastControlMessageMsgOuterClass.DouyinWebcastControlMessageMsg.parseFrom(payload); + DouyinControlMsg msg = new DouyinControlMsg(douyinWebcastControlMessageMsg); + iteratorMsgListeners(msgListener -> msgListener.onLiveStatusMsg(DouyinBinaryFrameHandler.this, msg)); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + + case WebcastSocialMessage: { + try { + DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg douyinWebcastSocialMessageMsg = DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg.parseFrom(payload); + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(DouyinBinaryFrameHandler.this, DouyinCmdEnum.WebcastSocialMessage, new DouyinSocialMsg(douyinWebcastSocialMessageMsg))); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + + case WebcastRoomStatsMessage: { + try { + DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg douyinWebcastRoomStatsMessageMsg = DouyinWebcastRoomStatsMessageMsgOuterClass.DouyinWebcastRoomStatsMessageMsg.parseFrom(payload); + DouyinRoomStatsMsg douyinRoomStatsMsg = new DouyinRoomStatsMsg(); + douyinRoomStatsMsg.setMsg(douyinWebcastRoomStatsMessageMsg); + iteratorMsgListeners(msgListener -> msgListener.onRoomStatsMsg(DouyinBinaryFrameHandler.this, douyinRoomStatsMsg)); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(DouyinBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinCodecHandler.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinCodecHandler.java new file mode 100644 index 0000000..6db41d7 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinCodecHandler.java @@ -0,0 +1,113 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.netty.handler; + +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.ZipUtil; +import com.google.protobuf.ByteString; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinPayloadTypeEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.DouyinCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.DouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameMsgOuterClass; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebsocketFrameOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BinaryWebSocketFrameToMessageCodec; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author mjz + * @date 2024/3/22 + */ +@Slf4j +public class DouyinCodecHandler extends BinaryWebSocketFrameToMessageCodec { + @Override + protected void encode(ChannelHandlerContext ctx, IDouyinMsg msg, List out) throws Exception { + if (msg instanceof DouyinMsg) { + out.add(new BinaryWebSocketFrame(ctx.alloc().buffer().writeBytes(((DouyinMsg) msg).getMsg().toByteArray()))); + } else { + throw new BaseException("暂不支持" + msg.getClass()); + } + } + + @Override + protected void decode(ChannelHandlerContext ctx, BinaryWebSocketFrame msg, List out) throws Exception { + DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame douyinWebsocketFrame = DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.parseFrom(msg.content().nioBuffer()); + + byte[] bytes; + String compressType = MapUtil.getStr(douyinWebsocketFrame.getHeadersListMap(), "compress_type"); + // 无压缩 + if (StrUtil.isBlank(compressType) || "none".equals(compressType)) { + bytes = douyinWebsocketFrame.getPayload().toByteArray(); + } + // gzip + else if ("gzip".equalsIgnoreCase(compressType)) { + ByteString payload = douyinWebsocketFrame.getPayload(); + bytes = ZipUtil.unGzip(payload.newInput()); + } + // 暂不支持 + else { + if (log.isWarnEnabled()) { + log.warn("暂不支持的压缩方式: {}", compressType); + } + return; + } + + String payloadType = douyinWebsocketFrame.getPayloadType(); + DouyinPayloadTypeEnum payloadTypeEnum = DouyinPayloadTypeEnum.getByCode(payloadType); + if (payloadTypeEnum == null) { + if (log.isDebugEnabled()) { + log.debug("暂不支持的payloadType: {}", payloadType); + } + return; + } + + switch (payloadTypeEnum) { + case MSG: { + DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg douyinWebsocketFrameMsg = DouyinWebsocketFrameMsgOuterClass.DouyinWebsocketFrameMsg.parseFrom(bytes); + // ACK + if (douyinWebsocketFrameMsg.getNeedAck()) { + DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame ack = DouyinWebsocketFrameOuterClass.DouyinWebsocketFrame.newBuilder() + .setLogId(douyinWebsocketFrame.getLogId()) + .setPayloadType(DouyinPayloadTypeEnum.ACK.getCode()) + .setPayload(douyinWebsocketFrameMsg.getInternalExtBytes()) + .build(); + ctx.writeAndFlush(ack); + } + out.addAll(douyinWebsocketFrameMsg.getMessagesListList().stream().map(DouyinCmdMsg::new).collect(Collectors.toList())); + return; + } + default: { + // ignore + } + } + } +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinConnectionHandler.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinConnectionHandler.java new file mode 100644 index 0000000..d539652 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinConnectionHandler.java @@ -0,0 +1,114 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + +import java.util.function.Supplier; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyinConnectionHandler extends BaseNettyClientConnectionHandler { + + /** + * 心跳包 + */ + private static final byte[] HEARTBEAT_BYTES = {58, 2, 104, 98}; + /** + * 以ClientConfig为主 + */ + private final Object roomId; + /** + * 以ClientConfig为主 + */ + private String cookie; + + public DouyinConnectionHandler(Supplier webSocketProtocolHandler, DouyinLiveChatClient client, IBaseConnectionListener listener) { + super(webSocketProtocolHandler, client, listener); + this.roomId = client.getConfig().getRoomId(); + this.cookie = client.getConfig().getCookie(); + } + + public DouyinConnectionHandler(Supplier webSocketProtocolHandler, DouyinLiveChatClient client) { + this(webSocketProtocolHandler, client, null); + } + + public DouyinConnectionHandler(Supplier webSocketProtocolHandler, long roomId, IBaseConnectionListener listener, String cookie) { + super(webSocketProtocolHandler, listener); + this.roomId = roomId; + this.cookie = cookie; + } + + public DouyinConnectionHandler(Supplier webSocketProtocolHandler, long roomId, IBaseConnectionListener listener) { + this(webSocketProtocolHandler, roomId, listener, null); + } + + public DouyinConnectionHandler(Supplier webSocketProtocolHandler, long roomId, String cookie) { + this(webSocketProtocolHandler, roomId, null, cookie); + } + + public DouyinConnectionHandler(Supplier webSocketProtocolHandler, long roomId) { + this(webSocketProtocolHandler, roomId, null, null); + } + + @Override + public void sendHeartbeat(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("发送心跳包"); + } + // douyin_websocket_frame.newBuilder().setPayloadType("hb").build().toByteArray() + // Base64.decode("OgJoYg=="); + channel.writeAndFlush(new BinaryWebSocketFrame(channel.alloc().buffer().writeBytes(HEARTBEAT_BYTES))) + .addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("心跳包发送完成"); + } + } else { + log.error("心跳包发送失败", future.cause()); + } + }); + } + + public Object getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } +} diff --git a/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinLiveChatClientChannelInitializer.java b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinLiveChatClientChannelInitializer.java new file mode 100644 index 0000000..d54279e --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinLiveChatClientChannelInitializer.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.netty.handler; + +import io.netty.channel.ChannelPipeline; +import io.netty.channel.socket.SocketChannel; +import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientChannelInitializer; + +/** + * @author mjz + * @date 2024/3/22 + */ +public class DouyinLiveChatClientChannelInitializer extends BaseNettyClientChannelInitializer { + + public DouyinLiveChatClientChannelInitializer(DouyinLiveChatClient client) { + super(client); + } + + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + // 添加一个编解码器 + pipeline.addLast(new DouyinCodecHandler()); + // 添加一个消息处理器 + pipeline.addLast(new DouyinBinaryFrameHandler(client.getMsgListeners(), client)); + } +} diff --git a/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClientTest.java b/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClientTest.java new file mode 100644 index 0000000..7ddac04 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClientTest.java @@ -0,0 +1,202 @@ +package tech.ordinaryroad.live.chat.client.douyin.client; + +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.json.JSONObject; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.UnknownFieldSet; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import org.junit.platform.commons.util.StringUtils; +import tech.ordinaryroad.live.chat.client.codec.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyin.msg.*; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinCmdMsgOuterClass; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastGiftMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DouyinWebcastSocialMessageMsgOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler; + +import java.util.Map; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +class DouyinLiveChatClientTest { + + static Object lock = new Object(); + DouyinLiveChatClient client; + + @Test + void example() throws InterruptedException { +// String cookie = System.getenv("cookie"); + String cookie ="ttwid=1%7CU6YHr6wKj_WHHXYfelzk5jc7uAg-yN0k2k4yTm1Uo-s%7C1704965821%7Cf48a7874351c69357f4f5f531416c9ad43385f9059fe7c57a5bbb9732b5f5add; store-region-src=uid; live_use_vvc=%22false%22; xgplayer_user_id=657157399276; passport_csrf_token=8be74ec699ab18095dca4f5702e616f9; passport_csrf_token_default=8be74ec699ab18095dca4f5702e616f9; bd_ticket_guard_client_web_domain=2; _bd_ticket_crypt_doamin=2; __security_server_data_status=1; my_rd=2; publish_badge_show_info=%220%2C0%2C0%2C1715773185377%22; FORCE_LOGIN=%7B%22videoConsumedRemainSeconds%22%3A180%2C%22isForcePopClose%22%3A1%7D; SEARCH_RESULT_LIST_TYPE=%22single%22; LOGIN_STATUS=1; store-region=cn-sx; __live_version__=%221.1.2.250%22; FOLLOW_RED_POINT_INFO=%221%22; volume_info=%7B%22isUserMute%22%3Atrue%2C%22isMute%22%3Atrue%2C%22volume%22%3A0.056%7D; download_guide=%223%2F20240521%2F0%22; strategyABtestKey=%221716342956.58%22; csrf_session_id=c0e8a5e872a6f46fc9f680d648d0506c; has_avx2=null; device_web_cpu_core=12; device_web_memory_size=8; webcast_leading_last_show_time=1716342967261; webcast_leading_total_show_times=1; webcast_local_quality=ld; pwa2=%220%7C0%7C3%7C1%22; passport_assist_user=Cjy-XOyHP7UxqDjMY8EgqDg7y2ZTQwU-2n9VwZmWY7NOzNfIE7h_mGo82Qvin4tjMegXNQANqLuGpjIPSjwaSgo8UMXwBgvpWS-UfZRncpUt1NP79vbsJy0575r3PH_q0PCdKEODEZIUEYLsFsltD9oMKEm6uBgmi8CgQ2P3EP_60Q0Yia_WVCABIgEDzHu1Lw%3D%3D; n_mh=Bj7_B8aFG8fIBbINj1-kLTnQ9S9DDEx44d6T3t5Xhl8; sso_uid_tt=4e9a67ef7a1f34439805b9545a64c499; sso_uid_tt_ss=4e9a67ef7a1f34439805b9545a64c499; toutiao_sso_user=82307b656b07f2e1a4cf91e5d8da0006; toutiao_sso_user_ss=82307b656b07f2e1a4cf91e5d8da0006; sid_ucp_sso_v1=1.0.0-KDc3NzM2ZTJjZjVmNTUxNmIxOGQ2YTcwYzQzYzU4ZDY3ODE5MTdlNWQKHQjNzOCXhAIQx9e2sgYY7zEgDDCKwIzOBTgGQPQHGgJscSIgODIzMDdiNjU2YjA3ZjJlMWE0Y2Y5MWU1ZDhkYTAwMDY; ssid_ucp_sso_v1=1.0.0-KDc3NzM2ZTJjZjVmNTUxNmIxOGQ2YTcwYzQzYzU4ZDY3ODE5MTdlNWQKHQjNzOCXhAIQx9e2sgYY7zEgDDCKwIzOBTgGQPQHGgJscSIgODIzMDdiNjU2YjA3ZjJlMWE0Y2Y5MWU1ZDhkYTAwMDY; passport_auth_status=eb9c3dbcb1c9737616664cadf1d8a790%2Cfba0b2a35313b10a9e2e6c5d8f4d0f5f; passport_auth_status_ss=eb9c3dbcb1c9737616664cadf1d8a790%2Cfba0b2a35313b10a9e2e6c5d8f4d0f5f; uid_tt=4c60bce2af32bb3fc83bce53bdd3e567; uid_tt_ss=4c60bce2af32bb3fc83bce53bdd3e567; sid_tt=a9af6fcd917a75ddd5d8bdb6d8c44496; sessionid=a9af6fcd917a75ddd5d8bdb6d8c44496; sessionid_ss=a9af6fcd917a75ddd5d8bdb6d8c44496; _bd_ticket_crypt_cookie=b745f8fd1c572267484fbfe58b89c925; sid_guard=a9af6fcd917a75ddd5d8bdb6d8c44496%7C1716366286%7C5183996%7CSun%2C+21-Jul-2024+08%3A24%3A42+GMT; sid_ucp_v1=1.0.0-KDFmMzRhNjk3NDg4OGMyNGQxZTk3ZmNhZjcwNmYzN2JlZDNkMjJkNmYKGQjNzOCXhAIQzte2sgYY7zEgDDgGQPQHSAQaAmhsIiBhOWFmNmZjZDkxN2E3NWRkZDVkOGJkYjZkOGM0NDQ5Ng; ssid_ucp_v1=1.0.0-KDFmMzRhNjk3NDg4OGMyNGQxZTk3ZmNhZjcwNmYzN2JlZDNkMjJkNmYKGQjNzOCXhAIQzte2sgYY7zEgDDgGQPQHSAQaAmhsIiBhOWFmNmZjZDkxN2E3NWRkZDVkOGJkYjZkOGM0NDQ5Ng; __ac_signature=_02B4Z6wo00f01GnsMRQAAIDBY8rqvlBzsRhpzDWAAHw-eb; FOLLOW_LIVE_POINT_INFO=%22MS4wLjABAAAAfAS7FbtmU-rQ7alBP_D6bJBIWX27xHGXI0bVcHoisis%2F1716393600000%2F0%2F0%2F1716370567576%22; stream_player_status_params=%22%7B%5C%22is_auto_play%5C%22%3A0%2C%5C%22is_full_screen%5C%22%3A0%2C%5C%22is_full_webscreen%5C%22%3A0%2C%5C%22is_mute%5C%22%3A1%2C%5C%22is_speed%5C%22%3A1%2C%5C%22is_visible%5C%22%3A1%7D%22; WallpaperGuide=%7B%22showTime%22%3A1716188223721%2C%22closeTime%22%3A0%2C%22showCount%22%3A2%2C%22cursor1%22%3A87%2C%22cursor2%22%3A0%2C%22hoverTime%22%3A1716352032390%7D; __ac_nonce=0664dbd4e00c752141901; stream_recommend_feed_params=%22%7B%5C%22cookie_enabled%5C%22%3Atrue%2C%5C%22screen_width%5C%22%3A1920%2C%5C%22screen_height%5C%22%3A1080%2C%5C%22browser_online%5C%22%3Atrue%2C%5C%22cpu_core_num%5C%22%3A12%2C%5C%22device_memory%5C%22%3A8%2C%5C%22downlink%5C%22%3A10%2C%5C%22effective_type%5C%22%3A%5C%224g%5C%22%2C%5C%22round_trip_time%5C%22%3A150%7D%22; FOLLOW_NUMBER_YELLOW_POINT_INFO=%22MS4wLjABAAAAfAS7FbtmU-rQ7alBP_D6bJBIWX27xHGXI0bVcHoisis%2F1716393600000%2F1716369970156%2F0%2F1716372013022%22; FRIEND_NUMBER_RED_POINT_INFO=%22MS4wLjABAAAAfAS7FbtmU-rQ7alBP_D6bJBIWX27xHGXI0bVcHoisis%2F1716393600000%2F1716370815219%2F0%2F0%22; passport_fe_beating_status=true; home_can_add_dy_2_desktop=%221%22; xg_device_score=7.740503633714868; live_can_add_dy_2_desktop=%221%22; IsDouyinActive=true; bd_ticket_guard_client_data=eyJiZC10aWNrZXQtZ3VhcmQtdmVyc2lvbiI6MiwiYmQtdGlja2V0LWd1YXJkLWl0ZXJhdGlvbi12ZXJzaW9uIjoxLCJiZC10aWNrZXQtZ3VhcmQtcmVlLXB1YmxpYy1rZXkiOiJCR1NCbXBuQWhMRFg3TERDUVZqZnRDSHJXa1FTNzZNR1ZPcDI4YXB1WmhTd3B0YnArM1NKRCt1b2lZTFFacENDS2JaMEZkaFZUcEtyei9sU0ZzNTlWNUk9IiwiYmQtdGlja2V0LWd1YXJkLXdlYi12ZXJzaW9uIjoxfQ%3D%3D; odin_tt=5cb1890563132950efc6a30651b7131a6421e8423d05672245eecc5f5c052cd9122f6a6314b1a40c1ac0bb1eeb70a9df50bcfee6bde0eee4a5e5dbc2b6516455; msToken=0x6ze9kt9qdjqmsf_mqiXzhZKT4cP3vD1AxZuFg6AQJy6LhFHm5R_Fzq_KtFkuAX9iDg2OJypnqfKSuv95TG7T1oGzcaHkGXLJLG7WAqAg2rQdM9DXA="; + log.error("cookie: {}", cookie); + DouyinLiveChatClientConfig config = DouyinLiveChatClientConfig.builder() + // .forwardWebsocketUri("ws://127.0.0.1:8080/websocket") + + // TODO 浏览器Cookie + .cookie(cookie) + .roomId("380874233822") + .build(); + + client = new DouyinLiveChatClient(config, new IDouyinMsgListener() { + @Override + public void onMsg(IMsg msg) { + // log.debug("收到{}消息 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(DouyinCmdEnum cmd, ICmdMsg cmdMsg) { + // log.debug("收到CMD消息{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(DouyinCmdEnum cmd, ICmdMsg cmdMsg) { + log.debug("收到其他CMD消息 {}", cmd); + switch (cmd) { + case WebcastSocialMessage: { + DouyinSocialMsg douyinSocialMsg = (DouyinSocialMsg) cmdMsg; + DouyinWebcastSocialMessageMsgOuterClass.DouyinWebcastSocialMessageMsg msg = douyinSocialMsg.getMsg(); + switch ((int) msg.getAction()) { + case 1: + // 关注 + break; + case 3: + // 分享 + break; + default: + } + break; + } + default: { + // ignore + } + } + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("收到未知CMD消息 {}", cmdString); + DouyinCmdMsgOuterClass.DouyinCmdMsg douyin_cmd_msg = ((DouyinCmdMsg) msg).getMsg(); + ByteString payload = douyin_cmd_msg.getPayload(); + try { + UnknownFieldSet unknownFieldSet = UnknownFieldSet.parseFrom(payload); + Map map = unknownFieldSet.asMap(); + } catch (InvalidProtocolBufferException e) { + throw new RuntimeException(e); + } + } + + @Override + public void onDanmuMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinDanmuMsg msg) { + Map jsonObjectMap = client.getRoomInitResult().getJsonObjectMap(); + log.info("{} 收到弹幕 {} {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); +// JSONObject jsonObject = jsonObjectMap.get(msg.getContent()); +// if(jsonObject!=null){ +// String baidu = jsonObject.getStr("百度回复"); +// if(StringUtils.isNotBlank(baidu)){ +// client.sendDanmu(baidu, () -> { +// log.warn("弹幕发送成功"); +// }); +// } +// try { +// Thread.sleep(2000); +// } catch (InterruptedException e) { +// throw new RuntimeException(e); +// } +// String doubao = jsonObject.getStr("豆包回复"); +// if(StringUtils.isNotBlank(doubao)){ +// client.sendDanmu(doubao, () -> { +// log.warn("弹幕发送成功"); +// }); +// } + try { + Thread.sleep(4000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } +// String jianyi = jsonObject.getStr("回答建议"); +// if(StringUtils.isNotBlank(jianyi)){ + client.sendDanmu("腿好看", () -> { + log.warn("弹幕发送成功"); + }); +// } +// } + } + + @Override + public void onGiftMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinGiftMsg msg) { + DouyinWebcastGiftMessageMsgOuterClass.DouyinWebcastGiftMessageMsg douyinWebcastGiftMessageMsg = msg.getMsg(); + + boolean combo = douyinWebcastGiftMessageMsg.getGift().getCombo(); + + long msgId = douyinWebcastGiftMessageMsg.getCommon().getMsgId(); + long comboCount = douyinWebcastGiftMessageMsg.getComboCount(); + long groupId = douyinWebcastGiftMessageMsg.getGroupId(); + long groupCount = douyinWebcastGiftMessageMsg.getGroupCount(); + long totalCount = douyinWebcastGiftMessageMsg.getTotalCount(); + String traceId = douyinWebcastGiftMessageMsg.getTraceId(); + long repeatCount = douyinWebcastGiftMessageMsg.getRepeatCount(); + if (msg.getGiftCount() > 0) { + log.info("{} 收到礼物 {} {}({}) {} {}({})x{}({}) msgId:{}, groupId:{}, groupCount:{}, comboCount:{}, totalCount:{}, repeatCount:{}, traceId:{}, combo:{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "赠送", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice(), msgId, groupId, groupCount, comboCount, totalCount, repeatCount, traceId, combo); + } + } + + @Override + public void onLikeMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinLikeMsg msg) { + log.info("{} 收到点赞 [{}] {}({})x{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getClickCount()); + } + + @Override + public void onEnterRoomMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinEnterRoomMsg msg) { + log.info("{} {}({}) 进入直播间", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onLiveStatusMsg(DouyinBinaryFrameHandler douyinBinaryFrameHandler, DouyinControlMsg douyinControlMsg) { + log.error("状态变化: {}", douyinControlMsg.getMsg().getStatus()); + } + + @Override + public void onRoomStatsMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinRoomStatsMsg msg) { + IDouyinMsgListener.super.onRoomStatsMsg(binaryFrameHandler, msg); + log.info("{} 统计信息 累计点赞数: {}, 当前观看人数: {}, 累计观看人数: {}", binaryFrameHandler.getRoomId(), msg.getLikedCount(), msg.getWatchingCount(), msg.getWatchedCount()); + } + }); + +// client.addStatusChangeListener((evt, oldStatus, newStatus) -> { +// if (newStatus == ClientStatusEnums.CONNECTED) { +// // 连接成功10秒后发送弹幕 +// ThreadUtil.execAsync(() -> { +// ThreadUtil.sleep(10000); +// client.sendDanmu("我是智能机器人1", () -> { +// log.warn("弹幕发送成功"); +//// client.clickLike(13, () -> { +//// log.warn("为直播间点赞成功"); +//// }); +// }); +// }); +// } +// }); + client.connect(); + + // ThreadUtil.execAsync(() -> { +// ThreadUtil.sleep(5000); +// client.disconnect(); +// }); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-douyu/README.md b/live-chat-clients/live-chat-client-douyu/README.md new file mode 100644 index 0000000..0b71bda --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/README.md @@ -0,0 +1,52 @@ +### 序列化 + +#### 序列化基本数据类型 + +1. escape(key) +2. escape(value) +3. key@=value/ + +#### 序列化Map + +1. escape(key) +2. value for each + 1. escape(key) + 2. escape(value) + 3. escape(key@=value/) +3. escape(value) +4. key@=value/ + +### 反序列化 + +#### 反序列化基本数据类型 + +1. spilt("/"): + type@=chatmsg + +2. split("@="): + 1. key: unescape(key) = el + 2. unescape(value).endsWith("/") = false + 2.1 value = chatmsg + +#### 反序列化Map + +1. spilt("/"): + el@=eid@AA=1@ASetp@AA=1@ASsc@AA=1@AS + +2. split("@="): + 1. key: unescape = el + 2. unescape(value).endsWith("/") = true + eid@A=1/etp@A=1/sc@A=1/ + 1. split("/") + eid@A=1 + etp@A=1 + sc@A=1 + 2. unescape: + eid@=1 + etp@=1 + sc@=1 + 3. for each + 1. split("@=") + 2. unescape(key) + 3. unescape(value) + 4. value: map \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-douyu/pom.xml b/live-chat-clients/live-chat-client-douyu/pom.xml new file mode 100644 index 0000000..a445ca8 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/pom.xml @@ -0,0 +1,65 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-clients + 0.7.0 + + jar + + live-chat-client-douyu + live-chat-client-douyu + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-codec-douyu + + + + tech.ordinaryroad + live-chat-client-websocket + + + + ch.qos.logback + logback-classic + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuDanmuLiveChatClient.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuDanmuLiveChatClient.java new file mode 100644 index 0000000..acb6ab1 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuDanmuLiveChatClient.java @@ -0,0 +1,131 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.LoginresMsg; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuChannelInitializer; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.util.List; + +/** + * 直播间弹幕客户端{@link DouyuClientModeEnum#DANMU} + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class DouyuDanmuLiveChatClient extends BaseDouyuLiveChatClient implements IDouyuMsgListener { + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, List msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.DANMU, config, msgListeners, connectionListener, workerGroup); + addMsgListener(DouyuDanmuLiveChatClient.this); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.DANMU, config, msgListener, connectionListener, workerGroup); + addMsgListener(DouyuDanmuLiveChatClient.this); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(config, msgListener, null); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config) { + this(config, null); + } + + @Override + public DouyuConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + return new DouyuConnectionHandler(DouyuClientModeEnum.DANMU, + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(getWebsocketUri()) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(new DefaultHttpHeaders()) + .maxFramePayloadLength(getConfig().getMaxFramePayloadLength()) + .handshakeTimeoutMillis(getConfig().getHandshakeTimeoutMillis()) + .build() + ), + DouyuDanmuLiveChatClient.this, clientConnectionListener + ); + } + + @Override + protected void initChannel(SocketChannel channel) { + channel.pipeline().addLast(new DouyuChannelInitializer<>(this)); + } + + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + if (msg instanceof LoginresMsg) { + // 1 type@=joingroup/rid@=4615502/gid@=1/ + send(new BinaryWebSocketFrame(getMsgFactory(getConfig().getRoomId()).createJoingroup()), () -> { + // 2 type@=mrkl/ + send(new BinaryWebSocketFrame(getMsgFactory(getConfig().getRoomId()).createHeartbeat()), () -> { + // 3 type@=sub/mt@=dayrk/ + send(new BinaryWebSocketFrame(getMsgFactory(getConfig().getRoomId()).createSub())); + }); + }); + } + } + + @Override + public boolean removeMsgListener(IDouyuMsgListener msgListener) { + if (msgListener == DouyuDanmuLiveChatClient.this) { + return false; + } + return super.removeMsgListener(msgListener); + } + + @Override + public void removeAllMsgListeners() { + super.removeAllMsgListeners(); + addMsgListener(DouyuDanmuLiveChatClient.this); + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClient.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClient.java new file mode 100644 index 0000000..5b900c6 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClient.java @@ -0,0 +1,244 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.MsgrepeaterproxylistMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.dto.GiftListInfo; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.commons.util.OrJacksonUtil; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.impl.DouyuForwardMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 直播间弹幕客户端 + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class DouyuLiveChatClient extends DouyuWsLiveChatClient implements IDouyuMsgListener { + private final DouyuWsLiveChatClient proxyClient = this; + private DouyuDanmuLiveChatClient danmuClient = null; + private DouyuConnectionHandler connectionHandler; + /** + * 统一管理Ws、Danmu的连接状态 + */ + private final IDouyuConnectionListener connectionListener; + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, List msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, msgListeners, null, workerGroup); + this.connectionListener = connectionListener; + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, msgListener, null, workerGroup); + this.connectionListener = connectionListener; + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(config, msgListener, null); + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + if (StrUtil.isNotBlank(getConfig().getForwardWebsocketUri())) { + DouyuForwardMsgListener forwardMsgListener = new DouyuForwardMsgListener(getConfig().getForwardWebsocketUri()); + addMsgListener(forwardMsgListener); + addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.DESTROYED) { + forwardMsgListener.destroyForwardClient(); + } + }); + } + super.init(); + + // 初始化房间礼物列表 + Map map = new HashMap<>(); + DouyuApis.getGiftList(getConfig().getRoomId()) + .get("giftList") + .forEach(jsonNode -> { + try { + GiftListInfo giftListInfo = OrJacksonUtil.getInstance().readValue(jsonNode.toString(), GiftListInfo.class); + map.put(String.valueOf(giftListInfo.getId()), giftListInfo); + } catch (Exception e) { + if (log.isDebugEnabled()) { + log.debug("获取房间礼物列表异常", e); + } + // ignore + } + }); + DouyuApis.roomGiftMap.put(String.valueOf(DouyuApis.getRealRoomId(getConfig().getRoomId())), map); + } + + @Override + public DouyuConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + this.connectionHandler = super.initConnectionHandler(super.clientConnectionListener); + return connectionHandler; + } + + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + super.onMsg(binaryFrameHandler, msg); + if (msg instanceof MsgrepeaterproxylistMsg) { + MsgrepeaterproxylistMsg msgrepeaterproxylistMsg = (MsgrepeaterproxylistMsg) msg; + List> list = msgrepeaterproxylistMsg.getList(); + if (list.isEmpty()) { + log.error("弹幕服务器列表为空"); + if (connectionListener != null) { + connectionListener.onConnectFailed(connectionHandler); + } + disconnect(); + } else { + // 初始化danmuClient + int randomIndex = RandomUtil.randomInt(0, list.size()); + Map randomMap = list.get(randomIndex); + DouyuLiveChatClientConfig danmuClientConfig = BeanUtil.toBean(getConfig(), DouyuLiveChatClientConfig.class, CopyOptions.create().ignoreNullValue()); + danmuClientConfig.setWebsocketUri(String.format("wss://%s:%s/", randomMap.get("ip"), randomMap.get("port"))); + destroyDanmuClient(); + this.danmuClient = new DouyuDanmuLiveChatClient(danmuClientConfig, new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onMsg(binaryFrameHandler, msg)); + } + + @Override + public void onDanmuMsg(DouyuBinaryFrameHandler binaryFrameHandler, ChatmsgMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(binaryFrameHandler, msg)); + } + + @Override + public void onGiftMsg(DouyuBinaryFrameHandler binaryFrameHandler, DgbMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(binaryFrameHandler, msg)); + } + + @Override + public void onEnterRoomMsg(DouyuBinaryFrameHandler binaryFrameHandler, UenterMsg uenterMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(binaryFrameHandler, uenterMsg)); + } + + @Override + public void onCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, ICmdMsg cmdMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onCmdMsg(binaryFrameHandler, cmd, cmdMsg)); + } + + @Override + public void onOtherCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, ICmdMsg cmdMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(binaryFrameHandler, cmd, cmdMsg)); + } + + @Override + public void onUnknownCmd(DouyuBinaryFrameHandler binaryFrameHandler, String cmdString, IMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onUnknownCmd(binaryFrameHandler, cmdString, msg)); + } + }, new IDouyuConnectionListener() { + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + if (connectionListener != null) { + connectionListener.onConnected(connectionHandler); + } + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + if (connectionListener != null) { + connectionListener.onConnectFailed(connectionHandler); + } + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + if (connectionListener != null) { + connectionListener.onDisconnected(connectionHandler); + } + } + }); + this.danmuClient.addStatusChangeListener((evt, oldStatus, newStatus) -> { + switch (newStatus) { + case CONNECTED: + case RECONNECTING: + case CONNECT_FAILED: + case DISCONNECTED: { + super.setStatus(newStatus); + break; + } + default: { + // ignore + } + } + + }); + this.danmuClient.connect(); + } + } + } + + @Override + protected void setStatus(ClientStatusEnums status) { + if (status == ClientStatusEnums.CONNECTED) { + return; + } + // 只要不是连接成功就直接销毁DanmuClient + destroyDanmuClient(); + super.setStatus(status); + } + + private void destroyDanmuClient() { + if (danmuClient != null) { + danmuClient.destroy(); + danmuClient = null; + } + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuWsLiveChatClient.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuWsLiveChatClient.java new file mode 100644 index 0000000..dee6146 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuWsLiveChatClient.java @@ -0,0 +1,130 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.LoginresMsg; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuChannelInitializer; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.util.List; + +/** + * 直播间弹幕客户端{@link DouyuClientModeEnum#WS} + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class DouyuWsLiveChatClient extends BaseDouyuLiveChatClient implements IDouyuMsgListener { + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, List msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.WS, config, msgListeners, connectionListener, workerGroup); + addMsgListener(DouyuWsLiveChatClient.this); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.WS, config, msgListener, connectionListener, workerGroup); + addMsgListener(DouyuWsLiveChatClient.this); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(config, msgListener, null); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config) { + this(config, null); + } + + @Override + protected String getWebSocketUriString() { + return DouyuApis.getRandomWssUri(getConfig().getRoomId()); + } + + @Override + public DouyuConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + return new DouyuConnectionHandler(DouyuClientModeEnum.WS, + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(getWebsocketUri()) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(new DefaultHttpHeaders()) + .maxFramePayloadLength(getConfig().getMaxFramePayloadLength()) + .handshakeTimeoutMillis(getConfig().getHandshakeTimeoutMillis()) + .build() + ), + DouyuWsLiveChatClient.this, clientConnectionListener + ); + } + + @Override + protected void initChannel(SocketChannel channel) { + channel.pipeline().addLast(new DouyuChannelInitializer<>(this)); + } + + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + if (msg instanceof LoginresMsg) { + send(new BinaryWebSocketFrame(getMsgFactory(getConfig().getRoomId()).createKeeplive(getConfig().getCookie()))); + } + } + + @Override + public boolean removeMsgListener(IDouyuMsgListener msgListener) { + if (msgListener == DouyuWsLiveChatClient.this) { + return false; + } + return super.removeMsgListener(msgListener); + } + + @Override + public void removeAllMsgListeners() { + super.removeAllMsgListeners(); + addMsgListener(DouyuWsLiveChatClient.this); + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/base/BaseDouyuLiveChatClient.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/base/BaseDouyuLiveChatClient.java new file mode 100644 index 0000000..ac4e39d --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/base/BaseDouyuLiveChatClient.java @@ -0,0 +1,140 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client.base; + +import cn.hutool.core.collection.CollUtil; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.IDouyuMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.factory.DouyuMsgFactory; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/9/15 + */ +@Slf4j +public abstract class BaseDouyuLiveChatClient extends BaseNettyClient< + DouyuLiveChatClientConfig, + DouyuCmdEnum, + IDouyuMsg, + IDouyuMsgListener, + DouyuConnectionHandler, + DouyuBinaryFrameHandler + > { + + private final DouyuClientModeEnum mode; + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, List msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + this.mode = mode; + addMsgListeners(msgListeners); + + // 初始化 + this.init(); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + this.mode = mode; + addMsgListener(msgListener); + + // 初始化 + this.init(); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(mode, config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(mode, config, msgListener, null, new NioEventLoopGroup()); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config) { + this(mode, config, CollUtil.newArrayList(), null, new NioEventLoopGroup()); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer failed) { + if (!checkCanSendDanmu()) { + return; + } + if (mode == DouyuClientModeEnum.WS && danmu instanceof String) { + String msg = (String) danmu; + if (log.isDebugEnabled()) { + log.debug("{} douyu发送弹幕 {}", getConfig().getRoomId(), danmu); + } + + WebSocketFrame webSocketFrame = null; + try { + webSocketFrame = new BinaryWebSocketFrame(getMsgFactory(getConfig().getRoomId()).createDanmu(msg, getConfig().getCookie())); + } catch (Exception e) { + log.error("douyu弹幕包创建失败", e); + if (failed != null) { + failed.accept(e); + } + } + if (webSocketFrame == null) { + return; + } + + send(webSocketFrame, () -> { + if (log.isDebugEnabled()) { + log.debug("douyu弹幕发送成功 {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + }, throwable -> { + log.error("douyu弹幕发送失败", throwable); + if (failed != null) { + failed.accept(throwable); + } + }); + } else { + super.sendDanmu(danmu); + } + } + + protected static DouyuMsgFactory getMsgFactory(long roomId) { + return DouyuMsgFactory.getInstance(roomId); + } + +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/config/DouyuLiveChatClientConfig.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/config/DouyuLiveChatClientConfig.java new file mode 100644 index 0000000..685cd8d --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/config/DouyuLiveChatClientConfig.java @@ -0,0 +1,69 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatNumberUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * Douyu直播间弹幕客户端配置 + * + * @author mjz + * @date 2023/8/21 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class DouyuLiveChatClientConfig extends BaseNettyClientConfig { + + @Builder.Default + private String ver = "20220825"; + + @Builder.Default + private String aver = "218101901"; + + @Override + public Long getRoomId() { + return OrLiveChatNumberUtil.parseLong(super.getRoomId()); + } + + public void setVer(String ver) { + String oldValue = this.ver; + this.ver = ver; + super.propertyChangeSupport.firePropertyChange("ver", oldValue, ver); + } + + public void setAver(String aver) { + String oldValue = this.aver; + this.aver = aver; + super.propertyChangeSupport.firePropertyChange("aver", oldValue, aver); + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuConnectionListener.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuConnectionListener.java new file mode 100644 index 0000000..cc3d33d --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuConnectionListener.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +/** + * 连接回调 + * + * @author mjz + * @date 2023/8/21 + */ +public interface IDouyuConnectionListener extends IBaseConnectionListener { +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuMsgListener.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuMsgListener.java new file mode 100644 index 0000000..b97f8b4 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuMsgListener.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.listener; + +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IDanmuMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IEnterRoomMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IGiftMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; + +/** + * @author mjz + * @date 2023/1/7 + */ +public interface IDouyuMsgListener extends IBaseMsgListener, + IDanmuMsgListener, + IGiftMsgListener, + IEnterRoomMsgListener { +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/impl/DouyuForwardMsgListener.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/impl/DouyuForwardMsgListener.java new file mode 100644 index 0000000..357623f --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/impl/DouyuForwardMsgListener.java @@ -0,0 +1,90 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.listener.impl; + +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; + +import java.nio.charset.StandardCharsets; + +/** + * @author mjz + * @date 2024/3/8 + * @since 0.3.0 + */ +public class DouyuForwardMsgListener implements IDouyuMsgListener { + + private final WebSocketLiveChatClient webSocketLiveChatClient; + + public DouyuForwardMsgListener(String webSocketUri) { + if (StrUtil.isBlank(webSocketUri)) { + throw new BaseException("转发地址不能为空"); + } + webSocketLiveChatClient = new WebSocketLiveChatClient( + WebSocketLiveChatClientConfig.builder() + .websocketUri(webSocketUri) + .build() + ); + webSocketLiveChatClient.connect(); + } + + @Override + public void onDanmuMsg(ChatmsgMsg msg) { + forward(msg); + } + + @Override + public void onGiftMsg(DgbMsg msg) { + forward(msg); + } + + @Override + public void onEnterRoomMsg(UenterMsg msg) { + forward(msg); + } + + private void forward(IMsg msg) { + if (webSocketLiveChatClient == null) { + return; + } + ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer(); + byteBuf.writeCharSequence(msg.toString(), StandardCharsets.UTF_8); + webSocketLiveChatClient.send(new BinaryWebSocketFrame(byteBuf)); + } + + public void destroyForwardClient() { + webSocketLiveChatClient.destroy(); + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuBinaryFrameHandler.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuBinaryFrameHandler.java new file mode 100644 index 0000000..790b326 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuBinaryFrameHandler.java @@ -0,0 +1,91 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.handler; + +import io.netty.channel.ChannelHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.IDouyuMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.List; + + +/** + * 消息处理器 + * + * @author mjz + * @date 2023/1/4 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyuBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler { + + public DouyuBinaryFrameHandler(List msgListeners, BaseDouyuLiveChatClient client) { + super(msgListeners, client); + } + + public DouyuBinaryFrameHandler(List msgListeners, long roomId) { + super(msgListeners, roomId); + } + + @Override + public void onCmdMsg(DouyuCmdEnum cmd, ICmdMsg cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + switch (cmd) { + case chatmsg: { + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(DouyuBinaryFrameHandler.this, (ChatmsgMsg) cmdMsg)); + break; + } + case dgb: { + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(DouyuBinaryFrameHandler.this, (DgbMsg) cmdMsg)); + break; + } + case uenter: { + iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(DouyuBinaryFrameHandler.this, (UenterMsg) cmdMsg)); + break; + } + default: { + if (!(cmdMsg instanceof DouyuCmdMsg)) { + if (log.isDebugEnabled()) { + log.debug("非DouyuCmdMsg {}", cmdMsg.getClass()); + } + return; + } + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(DouyuBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuChannelInitializer.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuChannelInitializer.java new file mode 100644 index 0000000..c4b1090 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuChannelInitializer.java @@ -0,0 +1,55 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.handler; + +import io.netty.channel.ChannelPipeline; +import io.netty.channel.socket.SocketChannel; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientChannelInitializer; + +import java.util.List; + +/** + * @author mjz + * @date 2024/3/22 + */ +public class DouyuChannelInitializer extends BaseNettyClientChannelInitializer { + + public DouyuChannelInitializer(CLIENT client) { + super(client); + } + + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + // 添加一个编解码器 + pipeline.addLast(new DouyuCodecHandler()); + // 添加一个消息处理器 + List msgListeners = client.getMsgListeners(); + System.out.println(msgListeners); + pipeline.addLast(new DouyuBinaryFrameHandler(client.getMsgListeners(), client)); + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuCodecHandler.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuCodecHandler.java new file mode 100644 index 0000000..8b1612b --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuCodecHandler.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.handler; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.base.IDouyuMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.util.DouyuCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BinaryWebSocketFrameToMessageCodec; + +import java.util.List; + +/** + * @author mjz + * @date 2024/3/22 + */ +public class DouyuCodecHandler extends BinaryWebSocketFrameToMessageCodec { + @Override + protected void encode(ChannelHandlerContext ctx, IDouyuMsg msg, List out) throws Exception { + throw new BaseException("应该使用DouyuWebSocketFrameFactory创建BinaryWebSocketFrame"); + } + + @Override + protected void decode(ChannelHandlerContext ctx, BinaryWebSocketFrame msg, List out) throws Exception { + List decode = DouyuCodecUtil.decode(msg.content()); + out.addAll(decode); + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuConnectionHandler.java b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuConnectionHandler.java new file mode 100644 index 0000000..b53a0be --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuConnectionHandler.java @@ -0,0 +1,165 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.factory.DouyuMsgFactory; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + +import java.util.function.Supplier; + + +/** + * 连接处理器 + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyuConnectionHandler extends BaseNettyClientConnectionHandler { + + @Getter + private final DouyuClientModeEnum mode; + /** + * 以ClientConfig为主 + */ + private final long roomId; + /** + * 以ClientConfig为主 + */ + private final String ver; + /** + * 以ClientConfig为主 + */ + private final String aver; + /** + * 以ClientConfig为主 + */ + private String cookie; + + public DouyuConnectionHandler(DouyuClientModeEnum mode, Supplier webSocketProtocolHandler, BaseDouyuLiveChatClient client, IBaseConnectionListener listener) { + super(webSocketProtocolHandler, client, listener); + this.mode = mode; + this.roomId = client.getConfig().getRoomId(); + this.ver = client.getConfig().getVer(); + this.aver = client.getConfig().getAver(); + this.cookie = client.getConfig().getCookie(); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, Supplier webSocketProtocolHandler, BaseDouyuLiveChatClient client) { + this(mode, webSocketProtocolHandler, client, null); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, Supplier webSocketProtocolHandler, long roomId, String ver, String aver, IBaseConnectionListener listener, String cookie) { + super(webSocketProtocolHandler, listener); + this.mode = mode; + this.roomId = roomId; + this.ver = ver; + this.aver = aver; + this.cookie = cookie; + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, Supplier webSocketProtocolHandler, long roomId, String ver, String aver, IBaseConnectionListener listener) { + this(mode, webSocketProtocolHandler, roomId, ver, aver, listener, null); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, Supplier webSocketProtocolHandler, long roomId, String ver, String aver, String cookie) { + this(mode, webSocketProtocolHandler, roomId, ver, aver, null, cookie); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, Supplier webSocketProtocolHandler, long roomId, String ver, String aver) { + this(mode, webSocketProtocolHandler, roomId, ver, aver, null, null); + } + + @Override + public void sendHeartbeat(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("发送心跳包"); + } + WebSocketFrame webSocketFrame; + if (mode == DouyuClientModeEnum.DANMU) { + webSocketFrame = new BinaryWebSocketFrame(getMsgFactory(getRoomId()).createHeartbeat()); + } else { + webSocketFrame = new BinaryWebSocketFrame(getMsgFactory(getRoomId()).createKeeplive(getCookie())); + } + channel.writeAndFlush(webSocketFrame).addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("心跳包发送完成"); + } + } else { + log.error("心跳包发送失败", future.cause()); + } + }); + } + + @Override + public void sendAuthRequest(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("发送认证包"); + } + channel.writeAndFlush(new BinaryWebSocketFrame(getMsgFactory(getRoomId()).createAuth(mode, getVer(), getAver(), getCookie()))) + .addListener(future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("认证包发送完成"); + } + } else { + log.error("认证包发送失败", future.cause()); + } + }); + } + + private DouyuMsgFactory getMsgFactory(long roomId) { + return DouyuMsgFactory.getInstance(roomId); + } + + public long getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private String getVer() { + return client != null ? client.getConfig().getVer() : ver; + } + + private String getAver() { + return client != null ? client.getConfig().getAver() : aver; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } +} diff --git a/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClientTest.java b/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClientTest.java new file mode 100644 index 0000000..144c6a2 --- /dev/null +++ b/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClientTest.java @@ -0,0 +1,379 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.RandomUtil; +import io.netty.channel.nio.NioEventLoopGroup; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.codec.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.codec.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Slf4j +class DouyuLiveChatClientTest implements IDouyuConnectionListener, IDouyuMsgListener { + + static Object lock = new Object(); + DouyuLiveChatClient client; + + @Test + void example() throws InterruptedException { + String cookie = "ttwid=1%7CU6YHr6wKj_WHHXYfelzk5jc7uAg-yN0k2k4yTm1Uo-s%7C1704965821%7Cf48a7874351c69357f4f5f531416c9ad43385f9059fe7c57a5bbb9732b5f5add; store-region-src=uid; live_use_vvc=%22false%22; xgplayer_user_id=657157399276; passport_csrf_token=8be74ec699ab18095dca4f5702e616f9; passport_csrf_token_default=8be74ec699ab18095dca4f5702e616f9; bd_ticket_guard_client_web_domain=2; _bd_ticket_crypt_doamin=2; __security_server_data_status=1; my_rd=2; publish_badge_show_info=%220%2C0%2C0%2C1715773185377%22; FORCE_LOGIN=%7B%22videoConsumedRemainSeconds%22%3A180%2C%22isForcePopClose%22%3A1%7D; strategyABtestKey=%221715821889.956%22; store-region=cn-bj; csrf_session_id=c0e8a5e872a6f46fc9f680d648d0506c; stream_player_status_params=%22%7B%5C%22is_auto_play%5C%22%3A0%2C%5C%22is_full_screen%5C%22%3A0%2C%5C%22is_full_webscreen%5C%22%3A0%2C%5C%22is_mute%5C%22%3A1%2C%5C%22is_speed%5C%22%3A1%2C%5C%22is_visible%5C%22%3A0%7D%22; SEARCH_RESULT_LIST_TYPE=%22single%22; __live_version__=%221.1.2.203%22; has_avx2=null; device_web_cpu_core=12; device_web_memory_size=8; webcast_leading_last_show_time=1715822008405; webcast_leading_total_show_times=1; webcast_local_quality=ld; __ac_nonce=066458bba00b63700528c; __ac_signature=_02B4Z6wo00f01S9DfowAAIDAJWWlJx8hwJUvY3oAAC2Y7f; FOLLOW_LIVE_POINT_INFO=%22MS4wLjABAAAAvEwT2-7B6l8pKDXdn2oF3JI55tETWwC-ggL0L3riB2EOQFSap64K-5-mWT9lAyD3%2F1715875200000%2F0%2F0%2F1715834445002%22; stream_recommend_feed_params=%22%7B%5C%22cookie_enabled%5C%22%3Atrue%2C%5C%22screen_width%5C%22%3A1920%2C%5C%22screen_height%5C%22%3A1080%2C%5C%22browser_online%5C%22%3Atrue%2C%5C%22cpu_core_num%5C%22%3A12%2C%5C%22device_memory%5C%22%3A8%2C%5C%22downlink%5C%22%3A9.05%2C%5C%22effective_type%5C%22%3A%5C%224g%5C%22%2C%5C%22round_trip_time%5C%22%3A100%7D%22; FOLLOW_NUMBER_YELLOW_POINT_INFO=%22MS4wLjABAAAAvEwT2-7B6l8pKDXdn2oF3JI55tETWwC-ggL0L3riB2EOQFSap64K-5-mWT9lAyD3%2F1715875200000%2F0%2F0%2F1715835060476%22; home_can_add_dy_2_desktop=%221%22; volume_info=%7B%22isUserMute%22%3Afalse%2C%22isMute%22%3Afalse%2C%22volume%22%3A0.298%7D; pwa2=%220%7C0%7C1%7C0%22; WallpaperGuide=%7B%22showTime%22%3A1715773828584%2C%22closeTime%22%3A0%2C%22showCount%22%3A1%2C%22cursor1%22%3A19%2C%22cursor2%22%3A0%7D; LOGIN_STATUS=0; download_guide=%222%2F20240516%2F0%22; passport_assist_user=CjwjtEjeQtOp4Cv_wosZ7DtwEtUwHH_jeTuTFOAtl41NpaLgvp2vuqX2CWO8YRW4bl6ZpT1kW82jgLbqhEwaSgo8h_8os20HEgPmVLztaUEVY3DIXJl6lwetx9-JB8jtD-t7ahjgNTdRxNvpnIDNT25jXl2fvzM2MCy1iZRYENq10Q0Yia_WVCABIgEDb4YVGQ%3D%3D; n_mh=q7yfwiSq87rdYvSKcxHn_fwIoPyQ2pa_2oa26gtgGnE; sso_uid_tt=d83cddbc4b03a4e3071260ecfaa00567; sso_uid_tt_ss=d83cddbc4b03a4e3071260ecfaa00567; toutiao_sso_user=7e856d5dcbe9b55fbfea27ab9abfa141; toutiao_sso_user_ss=7e856d5dcbe9b55fbfea27ab9abfa141; sid_ucp_sso_v1=1.0.0-KDY5YTIyNTlkMTk5MGQ5ZDEyZGZmMjc1NGVlMWVjNDVkNWEwNGI0MjgKHQjAnsTM_AEQpJmWsgYY7zEgDDCioaDNBTgGQPQHGgJscSIgN2U4NTZkNWRjYmU5YjU1ZmJmZWEyN2FiOWFiZmExNDE; ssid_ucp_sso_v1=1.0.0-KDY5YTIyNTlkMTk5MGQ5ZDEyZGZmMjc1NGVlMWVjNDVkNWEwNGI0MjgKHQjAnsTM_AEQpJmWsgYY7zEgDDCioaDNBTgGQPQHGgJscSIgN2U4NTZkNWRjYmU5YjU1ZmJmZWEyN2FiOWFiZmExNDE; passport_auth_status=fba0b2a35313b10a9e2e6c5d8f4d0f5f%2Cf3f2fbe505be6e05bcbc18118e5eb692; passport_auth_status_ss=fba0b2a35313b10a9e2e6c5d8f4d0f5f%2Cf3f2fbe505be6e05bcbc18118e5eb692; uid_tt=fc7b8cb7c4319654ef8da389ae142402; uid_tt_ss=fc7b8cb7c4319654ef8da389ae142402; sid_tt=8001e5f3e7a8f1222572de448a3bcc44; sessionid=8001e5f3e7a8f1222572de448a3bcc44; sessionid_ss=8001e5f3e7a8f1222572de448a3bcc44; _bd_ticket_crypt_cookie=f2e36f6fdf947c3c48887c1df24b34a5; sid_guard=8001e5f3e7a8f1222572de448a3bcc44%7C1715834032%7C5183991%7CMon%2C+15-Jul-2024+04%3A33%3A43+GMT; sid_ucp_v1=1.0.0-KDc0MjFmYzUzMzM1ZThkNjhmY2U2MGRhZDMxNGRkM2NiM2ZiZTA1MzcKGQjAnsTM_AEQsJmWsgYY7zEgDDgGQPQHSAQaAmxxIiA4MDAxZTVmM2U3YThmMTIyMjU3MmRlNDQ4YTNiY2M0NA; ssid_ucp_v1=1.0.0-KDc0MjFmYzUzMzM1ZThkNjhmY2U2MGRhZDMxNGRkM2NiM2ZiZTA1MzcKGQjAnsTM_AEQsJmWsgYY7zEgDDgGQPQHSAQaAmxxIiA4MDAxZTVmM2U3YThmMTIyMjU3MmRlNDQ4YTNiY2M0NA; xg_device_score=6.62943996770508; live_can_add_dy_2_desktop=%221%22; bd_ticket_guard_client_data=eyJiZC10aWNrZXQtZ3VhcmQtdmVyc2lvbiI6MiwiYmQtdGlja2V0LWd1YXJkLWl0ZXJhdGlvbi12ZXJzaW9uIjoxLCJiZC10aWNrZXQtZ3VhcmQtcmVlLXB1YmxpYy1rZXkiOiJCR1NCbXBuQWhMRFg3TERDUVZqZnRDSHJXa1FTNzZNR1ZPcDI4YXB1WmhTd3B0YnArM1NKRCt1b2lZTFFacENDS2JaMEZkaFZUcEtyei9sU0ZzNTlWNUk9IiwiYmQtdGlja2V0LWd1YXJkLXdlYi12ZXJzaW9uIjoxfQ%3D%3D; passport_fe_beating_status=true; msToken=7d467z-CkPmndMX68KOftgLFntlzNNj5YSWxKVCVHo1kMx6Dbnw2A7KxEm1GXlLRGFgzeYr83bqPOnLLMK8gKPwXj0GUzGAHPpIhNx-DCLv1szemDk0Ox5gGLAT-; odin_tt=991a8e40a6c3cd731240e08ef0b3bc872ab70f6ba0175ea4cbe01489f1904c1a62c7d51b94e69d31368eb12c69b246efc3ccb505c1e35e8d7f8d6d485ae59386; IsDouyinActive=false"; + log.error("cookie: {}", cookie); + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + .cookie(cookie) + // TODO 修改房间id(支持短id) + .roomId("834079938152") + .build(); + + client = new DouyuLiveChatClient(config, new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + IDouyuMsgListener.super.onMsg(binaryFrameHandler, msg); + + log.debug("{} 收到{}消息 {}", binaryFrameHandler.getRoomId(), msg.getClass(), msg); + client.sendDanmu("我是智能机器人1", () -> { + log.warn("弹幕发送成功"); +// client.clickLike(13, () -> { +// log.warn("为直播间点赞成功"); +// }); + }); + } + + @Override + public void onDanmuMsg(DouyuBinaryFrameHandler binaryFrameHandler, ChatmsgMsg msg) { + IDouyuMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + + log.info("{} 收到弹幕 {} {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(DouyuBinaryFrameHandler binaryFrameHandler, DgbMsg msg) { + IDouyuMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + + log.info("{} 收到礼物 {} {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "赠送", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onEnterRoomMsg(UenterMsg msg) { + log.info("{} {}({}) 进入直播间", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, ICmdMsg cmdMsg) { + IDouyuMsgListener.super.onCmdMsg(binaryFrameHandler, cmd, cmdMsg); + + log.info("{} 收到CMD消息{} {}", binaryFrameHandler.getRoomId(), cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, ICmdMsg cmdMsg) { + IDouyuMsgListener.super.onOtherCmdMsg(binaryFrameHandler, cmd, cmdMsg); + + log.debug("{} 收到其他CMD消息 {}", binaryFrameHandler.getRoomId(), cmd); + } + + @Override + public void onUnknownCmd(DouyuBinaryFrameHandler binaryFrameHandler, String cmdString, IMsg msg) { + IDouyuMsgListener.super.onUnknownCmd(binaryFrameHandler, cmdString, msg); + + log.debug("{} 收到未知CMD消息 {}", binaryFrameHandler.getRoomId(), cmdString); + } + }, new IDouyuConnectionListener() { + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onDisconnected", connectionHandler.getRoomId()); + } + }); + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void multipyListeners() throws InterruptedException { + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 修改房间id(支持短id) + .roomId(74751) + .build(); + + client = new DouyuLiveChatClient(config, null, this); + client.addMsgListener(new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.info("listener 1 onMsg {}", msg); + } + }); + IDouyuMsgListener msgListener2 = new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.info("listener 2 onMsg {}", msg); + } + }; + client.addMsgListener(msgListener2); + AtomicBoolean removed = new AtomicBoolean(false); + client.addMsgListener(new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.info("listener 3 onMsg {}", msg); + if (!removed.get()) { + log.warn("remove listener 2 by listener 3"); + removed.set(client.removeMsgListener(msgListener2)); + } + } + }); + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void multiplyClient() throws InterruptedException { + DouyuLiveChatClientConfig config1 = DouyuLiveChatClientConfig.builder().roomId(890074).build(); + DouyuLiveChatClient client1 = new DouyuLiveChatClient(config1, DouyuLiveChatClientTest.this, DouyuLiveChatClientTest.this); + + DouyuLiveChatClientConfig config2 = DouyuLiveChatClientConfig.builder().roomId(718133).build(); + DouyuLiveChatClient client2 = new DouyuLiveChatClient(config2, DouyuLiveChatClientTest.this, DouyuLiveChatClientTest.this); + + client1.connect(() -> { + log.warn("client1 connect successfully, start connecting client2"); + client2.connect(() -> { + log.warn("client2 connect successfully"); + }); + }); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void sendDanmu() throws InterruptedException { + String cookie = System.getenv("cookie"); +// cookie = null; + log.error("cookie: {}", cookie); + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + .cookie(cookie) + // TODO 修改弹幕发送最短时间间隔,默认3s + .minSendDanmuPeriod(10 * 1000) + // TODO 修改房间id(支持短id) + .roomId(74751) + .build(); + DouyuWsLiveChatClient client = new DouyuWsLiveChatClient(config, new IDouyuMsgListener() { + @Override + public void onMsg(IMsg msg) { + IDouyuMsgListener.super.onMsg(msg); + +// log.debug("收到消息 {}", msg.getClass()); + } + + @Override + public void onCmdMsg(DouyuCmdEnum cmd, ICmdMsg cmdMsg) { + IDouyuMsgListener.super.onCmdMsg(cmd, cmdMsg); + + log.debug("收到CMD消息 {} {}", cmd, cmdMsg); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + IDouyuMsgListener.super.onUnknownCmd(cmdString, msg); + + log.debug("收到未知CMD消息 {} {}", cmdString, msg); + } + }, new IDouyuConnectionListener() { + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + log.error("{} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + log.error("{} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + log.error("{} onDisconnected", connectionHandler.getRoomId()); + } + }, new NioEventLoopGroup()); + client.connect(() -> { + String danmu = "666" + RandomUtil.randomNumbers(1); + log.error("连接成功,5s后发送弹幕{}", danmu); + client.getWorkerGroup().execute(() -> { + ThreadUtil.sleep(5000); + while (true) { + String s = RandomUtil.randomNumbers(2); + log.error("发送弹幕{}", danmu + s); + client.sendDanmu(danmu + s); + ThreadUtil.sleep(2000); + } + }); + }); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void createAuthFrameFailedAndDisconnect() throws InterruptedException { + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 修改房间id(支持短id) + .autoReconnect(false) + .cookie("12323232'123'213'2'13'2") + .roomId(22222) + .build(); + + client = new DouyuLiveChatClient(config, this, this); + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void autoReconnect() throws InterruptedException { + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 修改房间id(支持短id) + .autoReconnect(true) + .cookie("12323232'123'213'2'13'2") +// .websocketUri("wss://sa.asd.asd:12") + .roomId(22222) + .build(); + + client = new DouyuLiveChatClient(config, this, this); + client.addStatusChangeListener((evt, oldStatus, newStatus) -> log.error("{} => {}", oldStatus, newStatus)); + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void autoReconnectOnce() throws InterruptedException { + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 修改房间id(支持短id) + .autoReconnect(true) + // .cookie("12323232'123'213'2'13'2") +// .websocketUri("wss://sa.asd.asd:12") + .roomId(22222) + .build(); + + client = new DouyuLiveChatClient(config, this, this); + AtomicBoolean a = new AtomicBoolean(false); + client.addStatusChangeListener((evt, oldStatus, newStatus) -> { + log.error("{} => {}", oldStatus, newStatus); + if (!a.get()) { + if (newStatus == ClientStatusEnums.CONNECTED) { + ThreadUtil.execAsync(() -> { + ThreadUtil.sleep(10000); + client.disconnect(); + }); + a.set(true); + } + } + }); + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onDisconnected", connectionHandler.getRoomId()); + } + + @Override + public void onDanmuMsg(DouyuBinaryFrameHandler binaryFrameHandler, ChatmsgMsg msg) { + IDouyuMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + + log.info("{} 收到弹幕 {}({}):{}", binaryFrameHandler.getRoomId(), msg.getNn(), msg.getUid(), msg.getTxt()); + } +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-huya/pom.xml b/live-chat-clients/live-chat-client-huya/pom.xml new file mode 100644 index 0000000..0ca1822 --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/pom.xml @@ -0,0 +1,60 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-clients + 0.7.0 + + jar + + live-chat-client-huya + live-chat-client-huya + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-codec-huya + + + + tech.ordinaryroad + live-chat-client-websocket + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClient.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClient.java new file mode 100644 index 0000000..46d369a --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClient.java @@ -0,0 +1,177 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.client; + +import cn.hutool.core.util.StrUtil; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.WebSocketCommand; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.IHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.factory.HuyaMsgFactory; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.huya.config.HuyaLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaConnectionListener; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaMsgListener; +import tech.ordinaryroad.live.chat.client.huya.listener.impl.HuyaForwardMsgListener; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaConnectionHandler; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaLiveChatClientChannelInitializer; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * 虎牙直播间弹幕客户端 + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class HuyaLiveChatClient extends BaseNettyClient< + HuyaLiveChatClientConfig, + HuyaCmdEnum, + IHuyaMsg, + IHuyaMsgListener, + HuyaConnectionHandler, + HuyaBinaryFrameHandler> { + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, List msgListeners, IHuyaConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 初始化 + this.init(); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, IHuyaMsgListener msgListener, IHuyaConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 初始化 + this.init(); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, IHuyaMsgListener msgListener, IHuyaConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, IHuyaMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + if (StrUtil.isNotBlank(getConfig().getForwardWebsocketUri())) { + HuyaForwardMsgListener forwardMsgListener = new HuyaForwardMsgListener(getConfig().getForwardWebsocketUri()); + addMsgListener(forwardMsgListener); + addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.DESTROYED) { + forwardMsgListener.destroyForwardClient(); + } + }); + } + super.init(); + } + + @Override + public HuyaConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + return new HuyaConnectionHandler( + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(getWebsocketUri()) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(new DefaultHttpHeaders()) + .maxFramePayloadLength(getConfig().getMaxFramePayloadLength()) + .handshakeTimeoutMillis(getConfig().getHandshakeTimeoutMillis()) + .build() + ), + HuyaLiveChatClient.this, clientConnectionListener + ); + } + + @Override + protected void initChannel(SocketChannel channel) { + channel.pipeline().addLast(new HuyaLiveChatClientChannelInitializer(HuyaLiveChatClient.this)); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer failed) { + if (!checkCanSendDanmu()) { + return; + } + + if (danmu instanceof String) { + String msg = (String) danmu; + if (log.isDebugEnabled()) { + log.debug("{} huya发送弹幕 {}", getConfig().getRoomId(), danmu); + } + + WebSocketCommand webSocketCommand = null; + try { + webSocketCommand = HuyaMsgFactory.getInstance(getConfig().getRoomId()).createSendMessageReq(msg, getConfig().getVer(), getConfig().getCookie()); + } catch (Exception e) { + log.error("huya弹幕包创建失败", e); + if (failed != null) { + failed.accept(e); + } + } + if (webSocketCommand == null) { + return; + } + + send(webSocketCommand, () -> { + if (log.isDebugEnabled()) { + log.debug("huya弹幕发送成功 {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + }, throwable -> { + log.error("huya弹幕发送失败", throwable); + if (failed != null) { + failed.accept(throwable); + } + }); + } else { + super.sendDanmu(danmu); + } + } +} diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/config/HuyaLiveChatClientConfig.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/config/HuyaLiveChatClientConfig.java new file mode 100644 index 0000000..176bc74 --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/config/HuyaLiveChatClientConfig.java @@ -0,0 +1,84 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * 直播间弹幕客户端配置 + * + * @author mjz + * @date 2023/9/5 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class HuyaLiveChatClientConfig extends BaseNettyClientConfig { + + public static final String VER = "2309271152"; + + @Builder.Default +// private String websocketUri = "wss://wsapi.huya.com:443"; + private String websocketUri = "wss://cdnws.api.huya.com:443"; + + @Builder.Default + private int aggregatorMaxContentLength = 64 * 1024 * 1024; + + @Builder.Default + private int maxFramePayloadLength = 64 * 1024 * 1024; + + @Builder.Default + private String ver = VER; + + @Builder.Default + private String exp = "15547.23738,16582.25335,32083.50834"; + + @Builder.Default + private String appSrc = "HUYA&ZH&2052"; + + public void setVer(String ver) { + String oldValue = this.ver; + this.ver = ver; + super.propertyChangeSupport.firePropertyChange("ver", oldValue, ver); + } + + public void setExp(String exp) { + String oldValue = this.exp; + this.exp = exp; + super.propertyChangeSupport.firePropertyChange("exp", oldValue, exp); + } + + public void setAppSrc(String appSrc) { + String oldValue = this.appSrc; + this.appSrc = appSrc; + super.propertyChangeSupport.firePropertyChange("appSrc", oldValue, appSrc); + } +} diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaConnectionListener.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaConnectionListener.java new file mode 100644 index 0000000..caa4674 --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaConnectionListener.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaConnectionHandler; + +/** + * 连接回调 + * + * @author mjz + * @date 2023/9/5 + */ +public interface IHuyaConnectionListener extends IBaseConnectionListener { +} diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaMsgListener.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaMsgListener.java new file mode 100644 index 0000000..12f6e25 --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaMsgListener.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.listener; + +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.MessageNoticeMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.SendItemSubBroadcastPacketMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.VipEnterBannerMsg; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IDanmuMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IEnterRoomMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IGiftMsgListener; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaBinaryFrameHandler; + +/** + * @author mjz + * @date 2023/9/5 + */ +public interface IHuyaMsgListener extends IBaseMsgListener, + IDanmuMsgListener, + IGiftMsgListener, + IEnterRoomMsgListener { +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/impl/HuyaForwardMsgListener.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/impl/HuyaForwardMsgListener.java new file mode 100644 index 0000000..ef55e7f --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/impl/HuyaForwardMsgListener.java @@ -0,0 +1,90 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.listener.impl; + +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.MessageNoticeMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.SendItemSubBroadcastPacketMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.VipEnterBannerMsg; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; + +import java.nio.charset.StandardCharsets; + +/** + * @author mjz + * @date 2024/3/8 + * @since 0.3.0 + */ +public class HuyaForwardMsgListener implements IHuyaMsgListener { + + private final WebSocketLiveChatClient webSocketLiveChatClient; + + public HuyaForwardMsgListener(String webSocketUri) { + if (StrUtil.isBlank(webSocketUri)) { + throw new BaseException("转发地址不能为空"); + } + webSocketLiveChatClient = new WebSocketLiveChatClient( + WebSocketLiveChatClientConfig.builder() + .websocketUri(webSocketUri) + .build() + ); + webSocketLiveChatClient.connect(); + } + + @Override + public void onDanmuMsg(MessageNoticeMsg msg) { + forward(msg); + } + + @Override + public void onGiftMsg(SendItemSubBroadcastPacketMsg msg) { + forward(msg); + } + + @Override + public void onEnterRoomMsg(VipEnterBannerMsg msg) { + forward(msg); + } + + private void forward(IMsg msg) { + if (webSocketLiveChatClient == null) { + return; + } + ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer(); + byteBuf.writeCharSequence(msg.toString(), StandardCharsets.UTF_8); + webSocketLiveChatClient.send(new BinaryWebSocketFrame(byteBuf)); + } + + public void destroyForwardClient() { + webSocketLiveChatClient.destroy(); + } +} diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaBinaryFrameHandler.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaBinaryFrameHandler.java new file mode 100644 index 0000000..8ba668e --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaBinaryFrameHandler.java @@ -0,0 +1,192 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.netty.handler; + +import com.qq.tars.protocol.tars.TarsInputStream; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.huya.api.HuyaApis; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaWupFunctionEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.*; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.IHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.PropsItem; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.dto.WSMsgItem; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.factory.HuyaMsgFactory; +import tech.ordinaryroad.live.chat.client.codec.huya.util.HuyaCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClient; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaMsgListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.List; + + +/** + * 消息处理器 + * + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +@ChannelHandler.Sharable +public class HuyaBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler { + + /** + * 以ClientConfig为主 + */ + private final String ver; + private ChannelHandlerContext channelHandlerContext; + + public HuyaBinaryFrameHandler(List iHuyaMsgListeners, HuyaLiveChatClient client, long roomId) { + super(iHuyaMsgListeners, client, roomId); + this.ver = client.getConfig().getVer(); + } + + public HuyaBinaryFrameHandler(List iHuyaMsgListeners, HuyaLiveChatClient client) { + super(iHuyaMsgListeners, client); + this.ver = client.getConfig().getVer(); + } + + public HuyaBinaryFrameHandler(List iHuyaMsgListeners, long roomId, String ver) { + super(iHuyaMsgListeners, roomId); + this.ver = ver; + } + + @Override + public void handlerAdded(ChannelHandlerContext ctx) throws Exception { + super.handlerAdded(ctx); + channelHandlerContext = ctx; + } + + @Override + public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { + super.handlerRemoved(ctx); + channelHandlerContext = null; + } + + @Override + public void onMsg(IMsg msg) { + IHuyaMsg iHuyaMsg = (IHuyaMsg) msg; + HuyaOperationEnum operationEnum = iHuyaMsg.getOperationEnum(); + if (operationEnum == HuyaOperationEnum.EWSCmdS2C_RegisterGroupRsp) { +// channelHandlerContext.writeAndFlush(HuyaWebSocketFrameFactory.getInstance(getRoomId()).createUpdateUserInfoReq()); + // 获取礼物列表 +// if (channelHandlerContext == null) { +// log.error("channelHandlerContext is null, cannot get gift list"); +// return; +// } +// if (log.isDebugEnabled()) { +// log.debug("获取礼物列表"); +// } + channelHandlerContext.writeAndFlush(HuyaMsgFactory.getInstance(getRoomId()).createGiftListReq(getVer())); + } else if (operationEnum == HuyaOperationEnum.EWSCmd_WupRsp) { + WupRsp wupRsp = (WupRsp) msg; + String functionName = wupRsp.getTarsServantRequest().getFunctionName(); + HuyaWupFunctionEnum wupFunctionEnum = HuyaWupFunctionEnum.getByName(functionName); + if (wupFunctionEnum == null) { + if (log.isWarnEnabled()) { + log.warn("未知 function {}", functionName); + } + return; + } + + switch (wupFunctionEnum) { + case doLaunch: { +// LiveLaunchRsp liveLaunchRsp = new LiveLaunchRsp(); +// liveLaunchRsp = wupRsp.getUniAttribute().getByClass("tRsp", liveLaunchRsp); + channelHandlerContext.writeAndFlush(HuyaMsgFactory.getInstance(getRoomId()).createRegisterGroupReq()); + break; + } + case getPropsList: { + GetPropsListRsp getPropsListRsp = new GetPropsListRsp(); + getPropsListRsp = wupRsp.getUniAttribute().getByClass("tRsp", getPropsListRsp); + for (PropsItem propsItem : getPropsListRsp.getVPropsItemList()) { + HuyaApis.GIFT_ITEMS.put(propsItem.getIPropsId(), propsItem); + } + break; + } + default: { + if (log.isDebugEnabled()) { + log.debug("暂不支持 function {}", wupFunctionEnum); + } + } + } + } else { + // ignore + } + } + + @Override + public void onCmdMsg(HuyaCmdEnum cmd, ICmdMsg cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + byte[] dataBytes; + if (cmdMsg instanceof WSPushMessage) { + WSPushMessage wsPushMessage = (WSPushMessage) cmdMsg; + dataBytes = wsPushMessage.getDataBytes(); + } else if (cmdMsg instanceof WSMsgItem) { + WSMsgItem wsMsgItem = (WSMsgItem) cmdMsg; + dataBytes = wsMsgItem.getSMsg(); + } else { + if (log.isDebugEnabled()) { + log.debug("非HuyaCmdMsg {}", cmdMsg.getClass()); + } + return; + } + TarsInputStream tarsInputStream = HuyaCodecUtil.newUtf8TarsInputStream(dataBytes); + + switch (cmd) { + case MessageNotice: { + MessageNoticeMsg messageNoticeMsg = new MessageNoticeMsg(tarsInputStream); + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(HuyaBinaryFrameHandler.this, messageNoticeMsg)); + break; + } + case SendItemSubBroadcastPacket: { + SendItemSubBroadcastPacketMsg sendItemSubBroadcastPacketMsg = new SendItemSubBroadcastPacketMsg(tarsInputStream); + sendItemSubBroadcastPacketMsg.setPropsItem(HuyaApis.GIFT_ITEMS.getOrDefault(sendItemSubBroadcastPacketMsg.getIItemType(), PropsItem.DEFAULT)); + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(HuyaBinaryFrameHandler.this, sendItemSubBroadcastPacketMsg)); + break; + } + case VipEnterBanner: { + VipEnterBannerMsg vipEnterBannerMsg = new VipEnterBannerMsg(tarsInputStream); + iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(HuyaBinaryFrameHandler.this, vipEnterBannerMsg)); + break; + } + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(HuyaBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } + + public String getVer() { + return client != null ? client.getConfig().getVer() : ver; + } +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaCodecHandler.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaCodecHandler.java new file mode 100644 index 0000000..3d265df --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaCodecHandler.java @@ -0,0 +1,56 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.netty.handler; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.WebSocketCommand; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.base.IHuyaMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.util.HuyaCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BinaryWebSocketFrameToMessageCodec; + +import java.util.List; + +/** + * @author mjz + * @date 2024/3/22 + */ +public class HuyaCodecHandler extends BinaryWebSocketFrameToMessageCodec { + @Override + protected void encode(ChannelHandlerContext ctx, IHuyaMsg msg, List out) throws Exception { + if (msg instanceof WebSocketCommand) { + out.add(new BinaryWebSocketFrame(ctx.alloc().buffer().writeBytes(((WebSocketCommand) msg).toByteArray()))); + } else { + throw new BaseException("暂不支持" + msg.getClass()); + } + } + + @Override + protected void decode(ChannelHandlerContext ctx, BinaryWebSocketFrame msg, List out) throws Exception { + out.addAll(HuyaCodecUtil.decode(msg.content())); + } +} + diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaConnectionHandler.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaConnectionHandler.java new file mode 100644 index 0000000..65201b2 --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaConnectionHandler.java @@ -0,0 +1,142 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.factory.HuyaMsgFactory; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + +import java.util.function.Supplier; + + +/** + * 连接处理器 + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@ChannelHandler.Sharable +public class HuyaConnectionHandler extends BaseNettyClientConnectionHandler { + + /** + * 以ClientConfig为主 + */ + private final Object roomId; + /** + * 以ClientConfig为主 + */ + private final String ver; + /** + * 以ClientConfig为主 + */ + private String cookie; + + public HuyaConnectionHandler(Supplier webSocketProtocolHandler, HuyaLiveChatClient client, IBaseConnectionListener listener) { + super(webSocketProtocolHandler, client, listener); + this.roomId = client.getConfig().getRoomId(); + this.ver = client.getConfig().getVer(); + this.cookie = client.getConfig().getCookie(); + } + + public HuyaConnectionHandler(Supplier webSocketProtocolHandler, HuyaLiveChatClient client) { + this(webSocketProtocolHandler, client, null); + } + + public HuyaConnectionHandler(Supplier webSocketProtocolHandler, long roomId, String ver, IBaseConnectionListener listener, String cookie) { + super(webSocketProtocolHandler, listener); + this.roomId = roomId; + this.ver = ver; + this.cookie = cookie; + } + + public HuyaConnectionHandler(Supplier webSocketProtocolHandler, long roomId, String ver, IBaseConnectionListener listener) { + this(webSocketProtocolHandler, roomId, ver, listener, null); + } + + public HuyaConnectionHandler(Supplier webSocketProtocolHandler, long roomId, String ver, String cookie) { + this(webSocketProtocolHandler, roomId, ver, null, cookie); + } + + public HuyaConnectionHandler(Supplier webSocketProtocolHandler, long roomId, String ver) { + this(webSocketProtocolHandler, roomId, ver, null, null); + } + + @Override + public void sendHeartbeat(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("发送心跳包"); + } + channel.writeAndFlush(getWebSocketFrameFactory(getRoomId()).createHeartbeat(getVer(), getCookie())) + .addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("心跳包发送完成"); + } + } else { + log.error("心跳包发送失败", future.cause()); + } + }); + } + + private static HuyaMsgFactory getWebSocketFrameFactory(Object roomId) { + return HuyaMsgFactory.getInstance(roomId); + } + + @Override + public void sendAuthRequest(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("发送认证包"); + } + channel.writeAndFlush(getWebSocketFrameFactory(getRoomId()).createAuth(getVer(), getCookie())) + .addListener(future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("认证包发送完成"); + } + } else { + log.error("认证包发送失败", future.cause()); + } + }); + } + + public Object getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + public String getVer() { + return client != null ? client.getConfig().getVer() : ver; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } +} diff --git a/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaLiveChatClientChannelInitializer.java b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaLiveChatClientChannelInitializer.java new file mode 100644 index 0000000..9d3911f --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaLiveChatClientChannelInitializer.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.netty.handler; + +import io.netty.channel.ChannelPipeline; +import io.netty.channel.socket.SocketChannel; +import tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientChannelInitializer; + +/** + * @author mjz + * @date 2024/3/22 + */ +public class HuyaLiveChatClientChannelInitializer extends BaseNettyClientChannelInitializer { + + public HuyaLiveChatClientChannelInitializer(HuyaLiveChatClient client) { + super(client); + } + + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + // 添加一个编解码器 + pipeline.addLast(new HuyaCodecHandler()); + // 添加一个消息处理器 + pipeline.addLast(new HuyaBinaryFrameHandler(client.getMsgListeners(), client)); + } +} diff --git a/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClientTest.java b/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClientTest.java new file mode 100644 index 0000000..67ff3d1 --- /dev/null +++ b/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClientTest.java @@ -0,0 +1,185 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.client; + +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.codec.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.MessageNoticeMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.SendItemSubBroadcastPacketMsg; +import tech.ordinaryroad.live.chat.client.codec.huya.msg.VipEnterBannerMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.huya.config.HuyaLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaMsgListener; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaBinaryFrameHandler; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +class HuyaLiveChatClientTest { + + static Object lock = new Object(); + HuyaLiveChatClient client; + + @Test + void example() throws InterruptedException { + HuyaLiveChatClientConfig config = HuyaLiveChatClientConfig.builder() + +// .forwardWebsocketUri("ws://127.0.0.1:8080/websocket") + + .roomId(353322) + .roomId(390001) + .roomId(527988) + .roomId(1995) + .roomId(116) + // bagea + .roomId(189201) + .roomId("bagea") + + .roomId(333003) +// .roomId(575757) + + .roomId(29785782) + + .roomId("bagea") + .roomId(333003) + .build(); + + client = new HuyaLiveChatClient(config, new IHuyaMsgListener() { + @Override + public void onDanmuMsg(HuyaBinaryFrameHandler binaryFrameHandler, MessageNoticeMsg msg) { + log.info("{} 收到弹幕 {} {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(HuyaBinaryFrameHandler binaryFrameHandler, SendItemSubBroadcastPacketMsg msg) { + long lPayTotal = msg.getLPayTotal(); + if (lPayTotal != 0) { + int giftPrice = msg.getGiftPrice(); + } + log.info("{} 收到礼物 {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), "赠送", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onEnterRoomMsg(HuyaBinaryFrameHandler binaryFrameHandler, VipEnterBannerMsg msg) { + // 虎牙目前只支持监听VIP用户的入房消息 + log.info("{} {}({}) 进入直播间", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onMsg(HuyaBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.debug("{} 收到{}消息 {}", binaryFrameHandler.getRoomId(), msg.getClass(), msg); + } + + @Override + public void onCmdMsg(HuyaBinaryFrameHandler binaryFrameHandler, HuyaCmdEnum cmd, ICmdMsg cmdMsg) { + switch (cmd) { + case BeginLiveNotice: { + // 开始直播 + //18:16:59.622 [nioEventLoopGroup-2-1] INFO tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到CMD消息BeginLiveNotice {"smsg":"AmQypb8RDtEmBumfs+S5kDxABVkAAQoGAkFMHCJkMqW/MmQypb9CZDKlv1ZAMTY4MTA0MDgzMS0xNjgxMDQwODMxLTcyMjAwMTUzOTIzODU2NjI5NzYtMzM2MjIwNTExOC0xMDA1Ny1BLTAtMWYfaHR0cDovL2FsLmZsdi5odXlhLmNvbS9odXlhbGl2ZXYDZmx2hnF3c1NlY3JldD1mMGU4MzY0MjNjNDA5YzEzMzM4N2FhYzA1OGFhNzY3YiZ3c1RpbWU9NjVlZDg4OWImZm09UkZkeE9FSmpTak5vTmtSS2REWlVXVjhrTUY4a01WOGtNbDhrTXclM0QlM0QmZnM9YmdjdJYfaHR0cDovL2FsLmhscy5odXlhLmNvbS9odXlhbGl2ZaYEbTN1OLZxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3TAA9AB4GTwD2TwEGT5EQz8EvYTH2h0dHA6Ly9hbC5wMnAuaHV5YS5jb20vaHV5YWxpdmX2FAVzbGljZfYVcXdzU2VjcmV0PWYwZTgzNjQyM2M0MDljMTMzMzg3YWFjMDU4YWE3NjdiJndzVGltZT02NWVkODg5YiZmbT1SRmR4T0VKalNqTm9Oa1JLZERaVVdWOGtNRjhrTVY4a01sOGtNdyUzRCUzRCZmcz1iZ2N08BYC/Bf5GAz4GQz8GvwbC2kAAQYCQUxzZe2IluaXt0OMnKy8xhM/U3RydWdnbGXjgpvmi7zmkI8/0nIb+gbs/A/wEAH5EQABCgYG6LaF5riFHCw8QP9QAWx2AIYAlgCmALzMC/YSDOmaj+S+v+WQrOWQrPwT9hRgaHR0cDovL2h1eWFpbWcubXNzdGF0aWMuY29tL2F2YXRhci8xMDE4LzFlL2ZjYzRhMjNkZjlmOTc0NmZiNTEwNTcxOTY3NjBjY18xODBfMTM1LmpwZz8xNDgyNjYzMzI58BUG9hYA9hcA8hhl7YiX8hlkMqW/8hpkMqW/9hsA8BwB8B0I+B4ADgYKQXBwVmVyc2lvbhYHMTIuMC4yMgYIQmFzZWJhbmQWElY4MTYuMC4yNC4yLjI2LkRFVgYKRGV2aWNlTmFtZRYJTTIxMDJKMlNDBgpIVVlBX01BSVhVFgEyBhJIdXlhQXVkaW9BQ1FFbmFibGUWATEGCExpdmVNb2RlFgprU2NyZWVuQ0FQBgdOZXR3b3JrFgR3aWZpBgpTREtWZXJzaW9uFgAGDVN5c3RlbVZlcnNpb24WAjE0BghUaW1lWm9uZRYNQXNpYS9TaGFuZ2hhaQYQZW5hYmxlX211bHRpbGluaxYBMAYJZW5hYmxlX3BrFgEwBg9rZXlfY2FzdGVyX2xpdmUWATEGB3JlYWxfdWEWHGFkcl9saXZlX2tpd2kmNS40MC4zMCZ4aWFvbWn8H/IgAcZ+tvwh8CIB/CP8JPwl","lmsgId":1374002143939868673,"cmd":"8000","cmdEnum":"BeginLiveNotice","luri":8000} + //18:16:59.622 [nioEventLoopGroup-2-1] DEBUG tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到其他CMD消息 BeginLiveNotice + //18:16:59.622 [nioEventLoopGroup-2-1] INFO tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到CMD消息BeginLiveNotice {"smsg":"AmQypb8RDtEmBumfs+S5kDxABVkAAgoGAkFMHCJkMqW/MmQypb9CZDKlv1ZAMTY4MTA0MDgzMS0xNjgxMDQwODMxLTcyMjAwMTUzOTIzODU2NjI5NzYtMzM2MjIwNTExOC0xMDA1Ny1BLTAtMWYfaHR0cDovL2FsLmZsdi5odXlhLmNvbS9odXlhbGl2ZXYDZmx2hnF3c1NlY3JldD1mMGU4MzY0MjNjNDA5YzEzMzM4N2FhYzA1OGFhNzY3YiZ3c1RpbWU9NjVlZDg4OWImZm09UkZkeE9FSmpTak5vTmtSS2REWlVXVjhrTUY4a01WOGtNbDhrTXclM0QlM0QmZnM9YmdjdJYfaHR0cDovL2FsLmhscy5odXlhLmNvbS9odXlhbGl2ZaYEbTN1OLZxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3TAA9AB4GTwD2TwEGT5EQz8EvYTH2h0dHA6Ly9hbC5wMnAuaHV5YS5jb20vaHV5YWxpdmX2FAVzbGljZfYVcXdzU2VjcmV0PWYwZTgzNjQyM2M0MDljMTMzMzg3YWFjMDU4YWE3NjdiJndzVGltZT02NWVkODg5YiZmbT1SRmR4T0VKalNqTm9Oa1JLZERaVVdWOGtNRjhrTVY4a01sOGtNdyUzRCUzRCZmcz1iZ2N08BYC/Bf5GAz4GQz8GvwbCwoGAkhTHCJkMqW/MmQypb9CZDKlv1ZAMTY4MTA0MDgzMS0xNjgxMDQwODMxLTcyMjAwMTUzOTIzODU2NjI5NzYtMzM2MjIwNTExOC0xMDA1Ny1BLTAtMWYaaHR0cDovL2hzLmZsdi5odXlhLmNvbS9zcmN2A2ZsdoZxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3SWGmh0dHA6Ly9ocy5obHMuaHV5YS5jb20vc3JjpgRtM3U4tnF3c1NlY3JldD1mMGU4MzY0MjNjNDA5YzEzMzM4N2FhYzA1OGFhNzY3YiZ3c1RpbWU9NjVlZDg4OWImZm09UkZkeE9FSmpTak5vTmtSS2REWlVXVjhrTUY4a01WOGtNbDhrTXclM0QlM0QmZnM9YmdjdMAO0AHs/A/8EPkRDPwS9hMfaHR0cDovL2hzLnAycC5odXlhLmNvbS9odXlhbGl2ZfYUBXNsaWNl9hVxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3T8FvwX+RgM+BkM/Br8GwtpAAIGAkFMBgJIU3Nl7YiW5pe3Q4ycrLzGEz9TdHJ1Z2dsZeOCm+aLvOaQjz/Schv6Buz8D/AQAfkRAAEKBgbotoXmuIUcLDxA/1ABbHYAhgCWAKYAvMwL9hIM6ZqP5L6/5ZCs5ZCs/BP2FGBodHRwOi8vaHV5YWltZy5tc3N0YXRpYy5jb20vYXZhdGFyLzEwMTgvMWUvZmNjNGEyM2RmOWY5NzQ2ZmI1MTA1NzE5Njc2MGNjXzE4MF8xMzUuanBnPzE0ODI2NjMzMjnwFQb2FgD2FwDyGGXtiJfyGWQypb/yGmQypb/2GwDwHAHwHQj4HgAOBgpBcHBWZXJzaW9uFgcxMi4wLjIyBghCYXNlYmFuZBYSVjgxNi4wLjI0LjIuMjYuREVWBgpEZXZpY2VOYW1lFglNMjEwMkoyU0MGCkhVWUFfTUFJWFUWATIGEkh1eWFBdWRpb0FDUUVuYWJsZRYBMQYITGl2ZU1vZGUWCmtTY3JlZW5DQVAGB05ldHdvcmsWBHdpZmkGClNES1ZlcnNpb24WAAYNU3lzdGVtVmVyc2lvbhYCMTQGCFRpbWVab25lFg1Bc2lhL1NoYW5naGFpBhBlbmFibGVfbXVsdGlsaW5rFgEwBgllbmFibGVfcGsWATAGD2tleV9jYXN0ZXJfbGl2ZRYBMQYHcmVhbF91YRYcYWRyX2xpdmVfa2l3aSY1LjQwLjMwJnhpYW9tafwf8iABxn62/CHwIgH8I/wk/CU=","lmsgId":1374002144099236864,"cmd":"8000","cmdEnum":"BeginLiveNotice","luri":8000} + //18:16:59.623 [nioEventLoopGroup-2-1] DEBUG tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到其他CMD消息 BeginLiveNotice + //18:16:59.623 [nioEventLoopGroup-2-1] INFO tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到CMD消息BeginLiveNotice {"smsg":"AmQypb8RDtEmBumfs+S5kDxABVkAAgoGAkFMHCJkMqW/MmQypb9CZDKlv1ZAMTY4MTA0MDgzMS0xNjgxMDQwODMxLTcyMjAwMTUzOTIzODU2NjI5NzYtMzM2MjIwNTExOC0xMDA1Ny1BLTAtMWYfaHR0cDovL2FsLmZsdi5odXlhLmNvbS9odXlhbGl2ZXYDZmx2hnF3c1NlY3JldD1mMGU4MzY0MjNjNDA5YzEzMzM4N2FhYzA1OGFhNzY3YiZ3c1RpbWU9NjVlZDg4OWImZm09UkZkeE9FSmpTak5vTmtSS2REWlVXVjhrTUY4a01WOGtNbDhrTXclM0QlM0QmZnM9YmdjdJYfaHR0cDovL2FsLmhscy5odXlhLmNvbS9odXlhbGl2ZaYEbTN1OLZxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3TAA9AB4GTwD2TwEGT5EQz8EvYTH2h0dHA6Ly9hbC5wMnAuaHV5YS5jb20vaHV5YWxpdmX2FAVzbGljZfYVcXdzU2VjcmV0PWYwZTgzNjQyM2M0MDljMTMzMzg3YWFjMDU4YWE3NjdiJndzVGltZT02NWVkODg5YiZmbT1SRmR4T0VKalNqTm9Oa1JLZERaVVdWOGtNRjhrTVY4a01sOGtNdyUzRCUzRCZmcz1iZ2N08BYC/Bf5GAz4GQz8GvwbCwoGAkhTHCJkMqW/MmQypb9CZDKlv1ZAMTY4MTA0MDgzMS0xNjgxMDQwODMxLTcyMjAwMTUzOTIzODU2NjI5NzYtMzM2MjIwNTExOC0xMDA1Ny1BLTAtMWYaaHR0cDovL2hzLmZsdi5odXlhLmNvbS9zcmN2A2ZsdoZxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3SWGmh0dHA6Ly9ocy5obHMuaHV5YS5jb20vc3JjpgRtM3U4tnF3c1NlY3JldD1mMGU4MzY0MjNjNDA5YzEzMzM4N2FhYzA1OGFhNzY3YiZ3c1RpbWU9NjVlZDg4OWImZm09UkZkeE9FSmpTak5vTmtSS2REWlVXVjhrTUY4a01WOGtNbDhrTXclM0QlM0QmZnM9YmdjdMAO0AHs/A/8EPkRDPwS9hMfaHR0cDovL2hzLnAycC5odXlhLmNvbS9odXlhbGl2ZfYUBXNsaWNl9hVxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3T8FvwX+RgM+BkM/Br8GwtpAAMGAkFMBgJIVwYCSFNzZe2IluaXt0OMnKy8xhM/U3RydWdnbGXjgpvmi7zmkI8/0nIb+gbs/A/wEAH5EQABCgYG6LaF5riFHCw8QP9QAWx2AIYAlgCmALzMC/YSDOmaj+S+v+WQrOWQrPwT9hRgaHR0cDovL2h1eWFpbWcubXNzdGF0aWMuY29tL2F2YXRhci8xMDE4LzFlL2ZjYzRhMjNkZjlmOTc0NmZiNTEwNTcxOTY3NjBjY18xODBfMTM1LmpwZz8xNDgyNjYzMzI58BUG9hYA9hcA8hhl7YiX8hlkMqW/8hpkMqW/9hsA8BwB8B0I+B4ADgYKQXBwVmVyc2lvbhYHMTIuMC4yMgYIQmFzZWJhbmQWElY4MTYuMC4yNC4yLjI2LkRFVgYKRGV2aWNlTmFtZRYJTTIxMDJKMlNDBgpIVVlBX01BSVhVFgEyBhJIdXlhQXVkaW9BQ1FFbmFibGUWATEGCExpdmVNb2RlFgprU2NyZWVuQ0FQBgdOZXR3b3JrFgR3aWZpBgpTREtWZXJzaW9uFgAGDVN5c3RlbVZlcnNpb24WAjE0BghUaW1lWm9uZRYNQXNpYS9TaGFuZ2hhaQYQZW5hYmxlX211bHRpbGluaxYBMAYJZW5hYmxlX3BrFgEwBg9rZXlfY2FzdGVyX2xpdmUWATEGB3JlYWxfdWEWHGFkcl9saXZlX2tpd2kmNS40MC4zMCZ4aWFvbWn8H/IgAcZ+tvwh8CIB/CP8JPwl","lmsgId":1374002144132795392,"cmd":"8000","cmdEnum":"BeginLiveNotice","luri":8000} + //18:16:59.624 [nioEventLoopGroup-2-1] DEBUG tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到其他CMD消息 BeginLiveNotice + //18:16:59.624 [nioEventLoopGroup-2-1] INFO tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到CMD消息BeginLiveNotice {"smsg":"AmQypb8RDtEmBumfs+S5kDxABVkAAgoGAkFMHCJkMqW/MmQypb9CZDKlv1ZAMTY4MTA0MDgzMS0xNjgxMDQwODMxLTcyMjAwMTUzOTIzODU2NjI5NzYtMzM2MjIwNTExOC0xMDA1Ny1BLTAtMWYfaHR0cDovL2FsLmZsdi5odXlhLmNvbS9odXlhbGl2ZXYDZmx2hnF3c1NlY3JldD1mMGU4MzY0MjNjNDA5YzEzMzM4N2FhYzA1OGFhNzY3YiZ3c1RpbWU9NjVlZDg4OWImZm09UkZkeE9FSmpTak5vTmtSS2REWlVXVjhrTUY4a01WOGtNbDhrTXclM0QlM0QmZnM9YmdjdJYfaHR0cDovL2FsLmhscy5odXlhLmNvbS9odXlhbGl2ZaYEbTN1OLZxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3TAA9AB4GTwD2TwEGT5EQz8EvYTH2h0dHA6Ly9hbC5wMnAuaHV5YS5jb20vaHV5YWxpdmX2FAVzbGljZfYVcXdzU2VjcmV0PWYwZTgzNjQyM2M0MDljMTMzMzg3YWFjMDU4YWE3NjdiJndzVGltZT02NWVkODg5YiZmbT1SRmR4T0VKalNqTm9Oa1JLZERaVVdWOGtNRjhrTVY4a01sOGtNdyUzRCUzRCZmcz1iZ2N08BYC/Bf5GAz4GQz8GvwbCwoGAkhTHCJkMqW/MmQypb9CZDKlv1ZAMTY4MTA0MDgzMS0xNjgxMDQwODMxLTcyMjAwMTUzOTIzODU2NjI5NzYtMzM2MjIwNTExOC0xMDA1Ny1BLTAtMWYaaHR0cDovL2hzLmZsdi5odXlhLmNvbS9zcmN2A2ZsdoZxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3SWGmh0dHA6Ly9ocy5obHMuaHV5YS5jb20vc3JjpgRtM3U4tnF3c1NlY3JldD1mMGU4MzY0MjNjNDA5YzEzMzM4N2FhYzA1OGFhNzY3YiZ3c1RpbWU9NjVlZDg4OWImZm09UkZkeE9FSmpTak5vTmtSS2REWlVXVjhrTUY4a01WOGtNbDhrTXclM0QlM0QmZnM9YmdjdMAO0AHs/A/8EPkRDPwS9hMfaHR0cDovL2hzLnAycC5odXlhLmNvbS9odXlhbGl2ZfYUBXNsaWNl9hVxd3NTZWNyZXQ9ZjBlODM2NDIzYzQwOWMxMzMzODdhYWMwNThhYTc2N2Imd3NUaW1lPTY1ZWQ4ODliJmZtPVJGZHhPRUpqU2pOb05rUktkRFpVV1Y4a01GOGtNVjhrTWw4a013JTNEJTNEJmZzPWJnY3T8FvwX+RgM+BkM/Br8GwtpAAQGAkFMBgJUWAYCSFcGAkhTc2XtiJbml7dDjJysvMYTP1N0cnVnZ2xl44Kb5ou85pCPP9JyG/oG7PwP8BAB+REAAQoGBui2hea4hRwsPED/UAFsdgCGAJYApgC8zAv2Egzpmo/kvr/lkKzlkKz8E/YUYGh0dHA6Ly9odXlhaW1nLm1zc3RhdGljLmNvbS9hdmF0YXIvMTAxOC8xZS9mY2M0YTIzZGY5Zjk3NDZmYjUxMDU3MTk2NzYwY2NfMTgwXzEzNS5qcGc/MTQ4MjY2MzMyOfAVBvYWAPYXAPIYZe2Il/IZZDKlv/IaZDKlv/YbAPAcAfAdCPgeAA4GCkFwcFZlcnNpb24WBzEyLjAuMjIGCEJhc2ViYW5kFhJWODE2LjAuMjQuMi4yNi5ERVYGCkRldmljZU5hbWUWCU0yMTAySjJTQwYKSFVZQV9NQUlYVRYBMgYSSHV5YUF1ZGlvQUNRRW5hYmxlFgExBghMaXZlTW9kZRYKa1NjcmVlbkNBUAYHTmV0d29yaxYEd2lmaQYKU0RLVmVyc2lvbhYABg1TeXN0ZW1WZXJzaW9uFgIxNAYIVGltZVpvbmUWDUFzaWEvU2hhbmdoYWkGEGVuYWJsZV9tdWx0aWxpbmsWATAGCWVuYWJsZV9waxYBMAYPa2V5X2Nhc3Rlcl9saXZlFgExBgdyZWFsX3VhFhxhZHJfbGl2ZV9raXdpJjUuNDAuMzAmeGlhb21p/B/yIAHGfrb8IfAiAfwj/CT8JQ==","lmsgId":1374002144233469953,"cmd":"8000","cmdEnum":"BeginLiveNotice","luri":8000} + break; + } + case CheckRoomStatus: { + // 点击关闭直播 + //18:17:33.446 [nioEventLoopGroup-2-1] INFO tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClientTest -- 29785782 收到CMD消息CheckRoomStatus {"smsg":"CQw=","lmsgId":1374002423406325760,"cmd":"6340","cmdEnum":"CheckRoomStatus","luri":6340} + break; + } + } + log.info("{} 收到CMD消息{} {}", binaryFrameHandler.getRoomId(), cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(HuyaBinaryFrameHandler binaryFrameHandler, HuyaCmdEnum cmd, ICmdMsg cmdMsg) { + log.debug("{} 收到其他CMD消息 {}", binaryFrameHandler.getRoomId(), cmd); + } + + @Override + public void onUnknownCmd(HuyaBinaryFrameHandler binaryFrameHandler, String cmdString, IMsg msg) { + log.debug("{} 收到未知CMD消息 {}", binaryFrameHandler.getRoomId(), cmdString); + } + }); + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void sendDanmuTest() throws InterruptedException { + String cookie = System.getenv("cookie"); + assertTrue(StrUtil.isNotBlank(cookie)); + log.error("cookie: {}", cookie); + + HuyaLiveChatClientConfig config = HuyaLiveChatClientConfig.builder() + .cookie(cookie) + .roomId(189201) + .build(); + + client = new HuyaLiveChatClient(config); + client.connect(() -> { + String danmu = "66666" + RandomUtil.randomNumber(); + log.info("连接成功,5s后发送弹幕{}", danmu); + ThreadUtil.sleep(5000); + client.sendDanmu(danmu); + }); + client.addMsgListener(new IHuyaMsgListener() { + @Override + public void onMsg(IMsg msg) { +// log.info("收到消息{}", msg); + } + + @Override + public void onDanmuMsg(MessageNoticeMsg messageNoticeMsg) { + log.info("收到弹幕{}:{}", messageNoticeMsg.getUsername(), messageNoticeMsg.getContent()); + } + }); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-kuaishou/pom.xml b/live-chat-clients/live-chat-client-kuaishou/pom.xml new file mode 100644 index 0000000..c15e20b --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + + tech.ordinaryroad + live-chat-clients + 0.7.0 + + jar + + live-chat-client-kuaishou + live-chat-client-kuaishou + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-codec-kuaishou + + + + tech.ordinaryroad + live-chat-client-websocket + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClient.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClient.java new file mode 100644 index 0000000..da653fa --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClient.java @@ -0,0 +1,228 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.client; + + +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.databind.JsonNode; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCollUtil; +import tech.ordinaryroad.live.chat.client.kuaishou.config.KuaishouLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouConnectionListener; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.impl.KuaishouForwardMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouConnectionHandler; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouLiveChatClientChannelInitializer; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +public class KuaishouLiveChatClient extends BaseNettyClient< + KuaishouLiveChatClientConfig, + PayloadTypeOuterClass.PayloadType, + IKuaishouMsg, + IKuaishouMsgListener, + KuaishouConnectionHandler, + KuaishouBinaryFrameHandler> { + + @Getter + KuaishouApis.RoomInitResult roomInitResult = new KuaishouApis.RoomInitResult(); + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, List msgListeners, IKuaishouConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 初始化 + this.init(); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, IKuaishouMsgListener msgListener, IKuaishouConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 初始化 + this.init(); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, IKuaishouMsgListener msgListener, IKuaishouConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, IKuaishouMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + roomInitResult = KuaishouApis.roomInit(getConfig().getRoomId(), getConfig().getCookie()); + if (StrUtil.isNotBlank(getConfig().getForwardWebsocketUri())) { + KuaishouForwardMsgListener forwardMsgListener = new KuaishouForwardMsgListener(getConfig().getForwardWebsocketUri()); + addMsgListener(forwardMsgListener); + addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.DESTROYED) { + forwardMsgListener.destroyForwardClient(); + } + }); + } + super.init(); + } + + @Override + protected String getWebSocketUriString() { + String webSocketUriString = super.getWebSocketUriString(); + if (StrUtil.isNotBlank(webSocketUriString)) { + return webSocketUriString; + } + return OrLiveChatCollUtil.getRandom(roomInitResult.getWebsocketUrls()); + } + + @Override + public KuaishouConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + return new KuaishouConnectionHandler( + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(getWebsocketUri()) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(new DefaultHttpHeaders()) + .maxFramePayloadLength(getConfig().getMaxFramePayloadLength()) + .handshakeTimeoutMillis(getConfig().getHandshakeTimeoutMillis()) + .build() + ), + KuaishouLiveChatClient.this, clientConnectionListener + ); + } + + @Override + protected void initChannel(SocketChannel channel) { + channel.pipeline().addLast(new KuaishouLiveChatClientChannelInitializer(KuaishouLiveChatClient.this)); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer failed) { + if (!checkCanSendDanmu()) { + return; + } + if (danmu instanceof String) { + String msg = (String) danmu; + try { + if (log.isDebugEnabled()) { + log.debug("{} kuaishou发送弹幕 {}", getConfig().getRoomId(), danmu); + } + + boolean sendSuccess = false; + try { + KuaishouApis.sendComment(getConfig().getCookie(), + getConfig().getRoomId(), + KuaishouApis.SendCommentRequest.builder() + .liveStreamId(roomInitResult.getLiveStreamId()) + .content(msg) + .build() + ); + sendSuccess = true; + } catch (Exception e) { + log.error("kuaishou弹幕发送失败", e); + if (failed != null) { + failed.accept(e); + } + } + if (!sendSuccess) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("kuaishou弹幕发送成功 {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + } catch (Exception e) { + log.error("kuaishou弹幕发送失败", e); + if (failed != null) { + failed.accept(e); + } + } + } else { + super.sendDanmu(danmu, success, failed); + } + } + + @Override + public void clickLike(int count, Runnable success, Consumer failed) { + if (count <= 0) { + throw new BaseException("点赞次数必须大于0"); + } + + boolean successfullyClicked = false; + try { + JsonNode jsonNode = KuaishouApis.clickLike(getConfig().getCookie(), getConfig().getRoomId(), roomInitResult.getLiveStreamId(), count); + if (jsonNode.asBoolean()) { + successfullyClicked = true; + } + } catch (Exception e) { + log.error("kuaishou为直播间点赞失败", e); + if (failed != null) { + failed.accept(e); + } + } + if (!successfullyClicked) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("kuaishou为直播间点赞成功"); + } + if (success != null) { + success.run(); + } + } +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/config/KuaishouLiveChatClientConfig.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/config/KuaishouLiveChatClientConfig.java new file mode 100644 index 0000000..d46ad21 --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/config/KuaishouLiveChatClientConfig.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class KuaishouLiveChatClientConfig extends BaseNettyClientConfig { + + @Builder.Default + private long heartbeatPeriod = 20; + +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouConnectionListener.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouConnectionListener.java new file mode 100644 index 0000000..56a7342 --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouConnectionListener.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouConnectionHandler; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouConnectionListener extends IBaseConnectionListener { +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouMsgListener.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouMsgListener.java new file mode 100644 index 0000000..c3c020c --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouMsgListener.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.listener; + +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouDanmuMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouLikeMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouRoomStatsMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.listener.*; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouBinaryFrameHandler; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouMsgListener extends IBaseMsgListener, + IDanmuMsgListener, + IGiftMsgListener, + ILikeMsgListener, + IRoomStatsMsgListener { +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/impl/KuaishouForwardMsgListener.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/impl/KuaishouForwardMsgListener.java new file mode 100644 index 0000000..473ba32 --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/impl/KuaishouForwardMsgListener.java @@ -0,0 +1,90 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.listener.impl; + +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouDanmuMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouLikeMsg; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; + +import java.nio.charset.StandardCharsets; + +/** + * @author mjz + * @date 2024/3/8 + * @since 0.3.0 + */ +public class KuaishouForwardMsgListener implements IKuaishouMsgListener { + + private final WebSocketLiveChatClient webSocketLiveChatClient; + + public KuaishouForwardMsgListener(String webSocketUri) { + if (StrUtil.isBlank(webSocketUri)) { + throw new BaseException("转发地址不能为空"); + } + webSocketLiveChatClient = new WebSocketLiveChatClient( + WebSocketLiveChatClientConfig.builder() + .websocketUri(webSocketUri) + .build() + ); + webSocketLiveChatClient.connect(); + } + + @Override + public void onDanmuMsg(KuaishouDanmuMsg msg) { + forward(msg); + } + + @Override + public void onGiftMsg(KuaishouGiftMsg msg) { + forward(msg); + } + + @Override + public void onLikeMsg(KuaishouLikeMsg msg) { + forward(msg); + } + + private void forward(IMsg msg) { + if (webSocketLiveChatClient == null) { + return; + } + ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer(); + byteBuf.writeCharSequence(msg.toString(), StandardCharsets.UTF_8); + webSocketLiveChatClient.send(new BinaryWebSocketFrame(byteBuf)); + } + + public void destroyForwardClient() { + webSocketLiveChatClient.destroy(); + } +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouBinaryFrameHandler.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouBinaryFrameHandler.java new file mode 100644 index 0000000..9d28b22 --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouBinaryFrameHandler.java @@ -0,0 +1,113 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.netty.handler; + +import com.google.protobuf.ByteString; +import io.netty.channel.ChannelHandler; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.*; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.*; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.client.KuaishouLiveChatClient; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.List; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +@ChannelHandler.Sharable +public class KuaishouBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler { + + public KuaishouBinaryFrameHandler(List iKuaishouMsgListeners, KuaishouLiveChatClient client) { + super(iKuaishouMsgListeners, client); + } + + public KuaishouBinaryFrameHandler(List iKuaishouMsgListeners, long roomId) { + super(iKuaishouMsgListeners, roomId); + } + + @SneakyThrows + @Override + public void onCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + KuaishouCmdMsg kuaishouCmdMsg = (KuaishouCmdMsg) cmdMsg; + SocketMessageOuterClass.SocketMessage socketMessage = kuaishouCmdMsg.getMsg(); + ByteString payloadByteString = socketMessage.getPayload(); + switch (socketMessage.getPayloadType()) { + // 用户贡献名单 +// case SC_LIVE_WATCHING_LIST: { +// SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers scWebLiveWatchingUsers = SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.parseFrom(payloadByteString); +// List watchingUserList = scWebLiveWatchingUsers.getWatchingUserList(); +// String displayWatchingCount = scWebLiveWatchingUsers.getDisplayWatchingCount(); +// long pendingDuration = scWebLiveWatchingUsers.getPendingDuration(); +// break; +// } + case SC_FEED_PUSH: { + SCWebFeedPushOuterClass.SCWebFeedPush scWebFeedPush = SCWebFeedPushOuterClass.SCWebFeedPush.parseFrom(payloadByteString); + if (scWebFeedPush.getCommentFeedsCount() > 0) { + for (WebCommentFeedOuterClass.WebCommentFeed webCommentFeed : scWebFeedPush.getCommentFeedsList()) { + KuaishouDanmuMsg msg = new KuaishouDanmuMsg(webCommentFeed); + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(KuaishouBinaryFrameHandler.this, msg)); + } + } + if (scWebFeedPush.getGiftFeedsCount() > 0) { + for (WebGiftFeedOuterClass.WebGiftFeed webGiftFeed : scWebFeedPush.getGiftFeedsList()) { + KuaishouGiftMsg msg = new KuaishouGiftMsg(webGiftFeed); + // 计算礼物个数 + KuaishouApis.calculateGiftCount(msg); + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(KuaishouBinaryFrameHandler.this, msg)); + } + } + if (scWebFeedPush.getLikeFeedsCount() > 0) { + for (WebLikeFeedOuterClass.WebLikeFeed webLikeFeed : scWebFeedPush.getLikeFeedsList()) { + KuaishouLikeMsg msg = new KuaishouLikeMsg(webLikeFeed); + iteratorMsgListeners(msgListener -> msgListener.onLikeMsg(KuaishouBinaryFrameHandler.this, msg)); + } + } + + String displayLikeCount = scWebFeedPush.getDisplayLikeCount(); + String displayWatchingCount = scWebFeedPush.getDisplayWatchingCount(); + KuaishouRoomStatsMsg kuaishouRoomStatsMsg = new KuaishouRoomStatsMsg(); + kuaishouRoomStatsMsg.setLikedCount(displayLikeCount); + kuaishouRoomStatsMsg.setWatchingCount(displayWatchingCount); + iteratorMsgListeners(msgListener -> msgListener.onRoomStatsMsg(KuaishouBinaryFrameHandler.this, kuaishouRoomStatsMsg)); + break; + } + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(KuaishouBinaryFrameHandler.this, cmd, kuaishouCmdMsg)); + } + } + } +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouCodecHandler.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouCodecHandler.java new file mode 100644 index 0000000..c175b16 --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouCodecHandler.java @@ -0,0 +1,81 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.netty.handler; + +import cn.hutool.core.util.ZipUtil; +import com.google.protobuf.ByteString; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BinaryWebSocketFrameToMessageCodec; + +import java.util.List; + +/** + * @author mjz + * @date 2024/3/22 + */ +@Slf4j +public class KuaishouCodecHandler extends BinaryWebSocketFrameToMessageCodec { + @Override + protected void encode(ChannelHandlerContext ctx, IKuaishouMsg msg, List out) throws Exception { + if (msg instanceof KuaishouCmdMsg) { + out.add(new BinaryWebSocketFrame(ctx.alloc().buffer().writeBytes(((KuaishouCmdMsg) msg).getMsg().toByteArray()))); + } else { + throw new BaseException("暂不支持" + msg.getClass()); + } + } + + @Override + protected void decode(ChannelHandlerContext ctx, BinaryWebSocketFrame msg, List out) throws Exception { + ByteBuf content = msg.content(); + SocketMessageOuterClass.SocketMessage socketMessage = SocketMessageOuterClass.SocketMessage.parseFrom(content.nioBuffer()); + SocketMessageOuterClass.SocketMessage.CompressionType compressionType = socketMessage.getCompressionType(); + ByteString payloadByteString = socketMessage.getPayload(); + byte[] payload; + switch (compressionType) { + case NONE: { + payload = payloadByteString.toByteArray(); + break; + } + case GZIP: { + payload = ZipUtil.unGzip(payloadByteString.newInput()); + break; + } + default: { + if (log.isWarnEnabled()) { + log.warn("暂不支持的压缩方式 " + compressionType); + } + return; + } + } + out.add(new KuaishouCmdMsg(socketMessage.toBuilder().setPayload(ByteString.copyFrom(payload)).build())); + } +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouConnectionHandler.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouConnectionHandler.java new file mode 100644 index 0000000..1ef7b40 --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouConnectionHandler.java @@ -0,0 +1,147 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.netty.handler; + +import cn.hutool.core.util.RandomUtil; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouCmdMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSHeartbeatOuterClass; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.CSWebEnterRoomOuterClass; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.SocketMessageOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.kuaishou.client.KuaishouLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + +import java.util.function.Supplier; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +@ChannelHandler.Sharable +public class KuaishouConnectionHandler extends BaseNettyClientConnectionHandler { + + /** + * 以ClientConfig为主 + */ + private final Object roomId; + /** + * 以ClientConfig为主 + */ + private String cookie; + private final KuaishouApis.RoomInitResult roomInitResult; + + public KuaishouConnectionHandler(Supplier webSocketProtocolHandler, KuaishouLiveChatClient client, IBaseConnectionListener listener) { + super(webSocketProtocolHandler, client, listener); + this.roomId = client.getConfig().getRoomId(); + this.cookie = client.getConfig().getCookie(); + this.roomInitResult = client.getRoomInitResult(); + } + + public KuaishouConnectionHandler(Supplier webSocketProtocolHandler, KuaishouLiveChatClient client) { + this(webSocketProtocolHandler, client, null); + } + + public KuaishouConnectionHandler(Supplier webSocketProtocolHandler, long roomId, KuaishouApis.RoomInitResult roomInitResult, IBaseConnectionListener listener, String cookie) { + super(webSocketProtocolHandler, listener); + this.roomId = roomId; + this.cookie = cookie; + this.roomInitResult = roomInitResult; + } + + public KuaishouConnectionHandler(Supplier webSocketProtocolHandler, long roomId, KuaishouApis.RoomInitResult roomInitResult, IBaseConnectionListener listener) { + this(webSocketProtocolHandler, roomId, roomInitResult, listener, null); + } + + public KuaishouConnectionHandler(Supplier webSocketProtocolHandler, long roomId, KuaishouApis.RoomInitResult roomInitResult, String cookie) { + this(webSocketProtocolHandler, roomId, roomInitResult, null, cookie); + } + + public KuaishouConnectionHandler(Supplier webSocketProtocolHandler, KuaishouApis.RoomInitResult roomInitResult, long roomId) { + this(webSocketProtocolHandler, roomId, roomInitResult, null, null); + } + + @Override + public void sendHeartbeat(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("发送心跳包"); + } + channel.writeAndFlush( + new KuaishouCmdMsg( + SocketMessageOuterClass.SocketMessage.newBuilder() + .setPayloadType(PayloadTypeOuterClass.PayloadType.CS_HEARTBEAT) + .setPayload( + CSHeartbeatOuterClass.CSHeartbeat.newBuilder() + .setTimestamp(System.currentTimeMillis()) + .build() + .toByteString() + ) + .build() + ) + ).addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("心跳包发送完成"); + } + } else { + log.error("心跳包发送失败", future.cause()); + } + }); + } + + @Override + public void sendAuthRequest(Channel channel) { + channel.writeAndFlush( + new KuaishouCmdMsg( + SocketMessageOuterClass.SocketMessage.newBuilder() + .setPayloadType(PayloadTypeOuterClass.PayloadType.CS_ENTER_ROOM) + .setPayload( + CSWebEnterRoomOuterClass.CSWebEnterRoom.newBuilder() + .setToken(roomInitResult.getToken()) + .setLiveStreamId(roomInitResult.getLiveStreamId()) + .setPageId(RandomUtil.randomString(16) + System.currentTimeMillis()) + .build() + .toByteString() + ) + .build() + ) + ); + } + + public Object getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouLiveChatClientChannelInitializer.java b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouLiveChatClientChannelInitializer.java new file mode 100644 index 0000000..0573c3d --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouLiveChatClientChannelInitializer.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.netty.handler; + +import io.netty.channel.ChannelPipeline; +import io.netty.channel.socket.SocketChannel; +import tech.ordinaryroad.live.chat.client.kuaishou.client.KuaishouLiveChatClient; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientChannelInitializer; + +/** + * @author mjz + * @date 2024/3/23 + */ +public class KuaishouLiveChatClientChannelInitializer extends BaseNettyClientChannelInitializer { + + public KuaishouLiveChatClientChannelInitializer(KuaishouLiveChatClient client) { + super(client); + } + + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + // 添加一个编解码器 + pipeline.addLast(new KuaishouCodecHandler()); + // 添加一个消息处理器 + pipeline.addLast(new KuaishouBinaryFrameHandler(client.getMsgListeners(), client)); + } +} diff --git a/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClientTest.java b/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClientTest.java new file mode 100644 index 0000000..68c4432 --- /dev/null +++ b/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClientTest.java @@ -0,0 +1,261 @@ +package tech.ordinaryroad.live.chat.client.kuaishou.client; + +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.StrUtil; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouDanmuMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouLikeMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.msg.KuaishouRoomStatsMsg; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.codec.kuaishou.protobuf.WebGiftFeedOuterClass; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.kuaishou.config.KuaishouLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouBinaryFrameHandler; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +class KuaishouLiveChatClientTest { + + Map> map = new HashMap<>(); + + static Object lock = new Object(); + KuaishouLiveChatClient client; + + @Test + void example() throws InterruptedException { +// String cookie = System.getenv("cookie"); + String cookie = "ttwid=1%7CU6YHr6wKj_WHHXYfelzk5jc7uAg-yN0k2k4yTm1Uo-s%7C1704965821%7Cf48a7874351c69357f4f5f531416c9ad43385f9059fe7c57a5bbb9732b5f5add; store-region-src=uid; live_use_vvc=%22false%22; xgplayer_user_id=657157399276; passport_csrf_token=8be74ec699ab18095dca4f5702e616f9; passport_csrf_token_default=8be74ec699ab18095dca4f5702e616f9; bd_ticket_guard_client_web_domain=2; _bd_ticket_crypt_doamin=2; __security_server_data_status=1; my_rd=2; publish_badge_show_info=%220%2C0%2C0%2C1715773185377%22; FORCE_LOGIN=%7B%22videoConsumedRemainSeconds%22%3A180%2C%22isForcePopClose%22%3A1%7D; strategyABtestKey=%221715821889.956%22; store-region=cn-bj; csrf_session_id=c0e8a5e872a6f46fc9f680d648d0506c; stream_player_status_params=%22%7B%5C%22is_auto_play%5C%22%3A0%2C%5C%22is_full_screen%5C%22%3A0%2C%5C%22is_full_webscreen%5C%22%3A0%2C%5C%22is_mute%5C%22%3A1%2C%5C%22is_speed%5C%22%3A1%2C%5C%22is_visible%5C%22%3A0%7D%22; SEARCH_RESULT_LIST_TYPE=%22single%22; __live_version__=%221.1.2.203%22; has_avx2=null; device_web_cpu_core=12; device_web_memory_size=8; webcast_leading_last_show_time=1715822008405; webcast_leading_total_show_times=1; webcast_local_quality=ld; __ac_nonce=066458bba00b63700528c; __ac_signature=_02B4Z6wo00f01S9DfowAAIDAJWWlJx8hwJUvY3oAAC2Y7f; FOLLOW_LIVE_POINT_INFO=%22MS4wLjABAAAAvEwT2-7B6l8pKDXdn2oF3JI55tETWwC-ggL0L3riB2EOQFSap64K-5-mWT9lAyD3%2F1715875200000%2F0%2F0%2F1715834445002%22; stream_recommend_feed_params=%22%7B%5C%22cookie_enabled%5C%22%3Atrue%2C%5C%22screen_width%5C%22%3A1920%2C%5C%22screen_height%5C%22%3A1080%2C%5C%22browser_online%5C%22%3Atrue%2C%5C%22cpu_core_num%5C%22%3A12%2C%5C%22device_memory%5C%22%3A8%2C%5C%22downlink%5C%22%3A9.05%2C%5C%22effective_type%5C%22%3A%5C%224g%5C%22%2C%5C%22round_trip_time%5C%22%3A100%7D%22; FOLLOW_NUMBER_YELLOW_POINT_INFO=%22MS4wLjABAAAAvEwT2-7B6l8pKDXdn2oF3JI55tETWwC-ggL0L3riB2EOQFSap64K-5-mWT9lAyD3%2F1715875200000%2F0%2F0%2F1715835060476%22; home_can_add_dy_2_desktop=%221%22; volume_info=%7B%22isUserMute%22%3Afalse%2C%22isMute%22%3Afalse%2C%22volume%22%3A0.298%7D; pwa2=%220%7C0%7C1%7C0%22; WallpaperGuide=%7B%22showTime%22%3A1715773828584%2C%22closeTime%22%3A0%2C%22showCount%22%3A1%2C%22cursor1%22%3A19%2C%22cursor2%22%3A0%7D; LOGIN_STATUS=0; download_guide=%222%2F20240516%2F0%22; passport_assist_user=CjwjtEjeQtOp4Cv_wosZ7DtwEtUwHH_jeTuTFOAtl41NpaLgvp2vuqX2CWO8YRW4bl6ZpT1kW82jgLbqhEwaSgo8h_8os20HEgPmVLztaUEVY3DIXJl6lwetx9-JB8jtD-t7ahjgNTdRxNvpnIDNT25jXl2fvzM2MCy1iZRYENq10Q0Yia_WVCABIgEDb4YVGQ%3D%3D; n_mh=q7yfwiSq87rdYvSKcxHn_fwIoPyQ2pa_2oa26gtgGnE; sso_uid_tt=d83cddbc4b03a4e3071260ecfaa00567; sso_uid_tt_ss=d83cddbc4b03a4e3071260ecfaa00567; toutiao_sso_user=7e856d5dcbe9b55fbfea27ab9abfa141; toutiao_sso_user_ss=7e856d5dcbe9b55fbfea27ab9abfa141; sid_ucp_sso_v1=1.0.0-KDY5YTIyNTlkMTk5MGQ5ZDEyZGZmMjc1NGVlMWVjNDVkNWEwNGI0MjgKHQjAnsTM_AEQpJmWsgYY7zEgDDCioaDNBTgGQPQHGgJscSIgN2U4NTZkNWRjYmU5YjU1ZmJmZWEyN2FiOWFiZmExNDE; ssid_ucp_sso_v1=1.0.0-KDY5YTIyNTlkMTk5MGQ5ZDEyZGZmMjc1NGVlMWVjNDVkNWEwNGI0MjgKHQjAnsTM_AEQpJmWsgYY7zEgDDCioaDNBTgGQPQHGgJscSIgN2U4NTZkNWRjYmU5YjU1ZmJmZWEyN2FiOWFiZmExNDE; passport_auth_status=fba0b2a35313b10a9e2e6c5d8f4d0f5f%2Cf3f2fbe505be6e05bcbc18118e5eb692; passport_auth_status_ss=fba0b2a35313b10a9e2e6c5d8f4d0f5f%2Cf3f2fbe505be6e05bcbc18118e5eb692; uid_tt=fc7b8cb7c4319654ef8da389ae142402; uid_tt_ss=fc7b8cb7c4319654ef8da389ae142402; sid_tt=8001e5f3e7a8f1222572de448a3bcc44; sessionid=8001e5f3e7a8f1222572de448a3bcc44; sessionid_ss=8001e5f3e7a8f1222572de448a3bcc44; _bd_ticket_crypt_cookie=f2e36f6fdf947c3c48887c1df24b34a5; sid_guard=8001e5f3e7a8f1222572de448a3bcc44%7C1715834032%7C5183991%7CMon%2C+15-Jul-2024+04%3A33%3A43+GMT; sid_ucp_v1=1.0.0-KDc0MjFmYzUzMzM1ZThkNjhmY2U2MGRhZDMxNGRkM2NiM2ZiZTA1MzcKGQjAnsTM_AEQsJmWsgYY7zEgDDgGQPQHSAQaAmxxIiA4MDAxZTVmM2U3YThmMTIyMjU3MmRlNDQ4YTNiY2M0NA; ssid_ucp_v1=1.0.0-KDc0MjFmYzUzMzM1ZThkNjhmY2U2MGRhZDMxNGRkM2NiM2ZiZTA1MzcKGQjAnsTM_AEQsJmWsgYY7zEgDDgGQPQHSAQaAmxxIiA4MDAxZTVmM2U3YThmMTIyMjU3MmRlNDQ4YTNiY2M0NA; xg_device_score=6.62943996770508; live_can_add_dy_2_desktop=%221%22; bd_ticket_guard_client_data=eyJiZC10aWNrZXQtZ3VhcmQtdmVyc2lvbiI6MiwiYmQtdGlja2V0LWd1YXJkLWl0ZXJhdGlvbi12ZXJzaW9uIjoxLCJiZC10aWNrZXQtZ3VhcmQtcmVlLXB1YmxpYy1rZXkiOiJCR1NCbXBuQWhMRFg3TERDUVZqZnRDSHJXa1FTNzZNR1ZPcDI4YXB1WmhTd3B0YnArM1NKRCt1b2lZTFFacENDS2JaMEZkaFZUcEtyei9sU0ZzNTlWNUk9IiwiYmQtdGlja2V0LWd1YXJkLXdlYi12ZXJzaW9uIjoxfQ%3D%3D; passport_fe_beating_status=true; msToken=7d467z-CkPmndMX68KOftgLFntlzNNj5YSWxKVCVHo1kMx6Dbnw2A7KxEm1GXlLRGFgzeYr83bqPOnLLMK8gKPwXj0GUzGAHPpIhNx-DCLv1szemDk0Ox5gGLAT-; odin_tt=991a8e40a6c3cd731240e08ef0b3bc872ab70f6ba0175ea4cbe01489f1904c1a62c7d51b94e69d31368eb12c69b246efc3ccb505c1e35e8d7f8d6d485ae59386; IsDouyinActive=false"; + log.error("cookie: {}", cookie); + KuaishouLiveChatClientConfig config = KuaishouLiveChatClientConfig.builder() + + // .forwardWebsocketUri("ws://127.0.0.1:8080/websocket") + + // TODO 浏览器Cookie + .cookie(cookie) + .roomId("677287189658") + .build(); + + client = new KuaishouLiveChatClient(config, new IKuaishouMsgListener() { + @Override + public void onMsg(IMsg msg) { + // log.debug("收到{}消息 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg cmdMsg) { + // log.debug("收到CMD消息{}", cmd); + } + + @Override + public void onOtherCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg cmdMsg) { + log.debug("收到其他CMD消息 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("收到未知CMD消息 {}", cmdString); + } + + @Override + public void onDanmuMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouDanmuMsg msg) { + if (msg.getBadgeLevel() > 0) { + String badgeName = msg.getBadgeName(); + if (StrUtil.isBlank(badgeName)) { + msg.getBadgeName(); + } + } + + log.info("{} 收到弹幕 [{}] {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouGiftMsg msg) { + if (msg.getBadgeLevel() > 0) { + String badgeName = msg.getBadgeName(); + if (StrUtil.isBlank(badgeName)) { + msg.getBadgeName(); + } + } + + String mergeKey = msg.getMsg().getMergeKey(); + map.computeIfAbsent(mergeKey, s -> new ArrayList<>()).add(msg.getMsg()); + + if (msg.getGiftCount() > 0) { + log.info("{} 收到礼物 [{}] {}({}) {} {}({})x{}({}) mergeKey:{},comboCount:{}, batchSize:{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "赠送", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice(), msg.getMsg().getMergeKey(), msg.getMsg().getComboCount(), msg.getMsg().getBatchSize()); + } + } + + @Override + public void onLikeMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouLikeMsg msg) { + if (msg.getBadgeLevel() > 0) { + String badgeName = msg.getBadgeName(); + if (StrUtil.isBlank(badgeName)) { + msg.getBadgeName(); + } + } + log.info("{} 收到点赞 [{}] {}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onRoomStatsMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouRoomStatsMsg msg) { + IKuaishouMsgListener.super.onRoomStatsMsg(binaryFrameHandler, msg); + log.info("{} 统计信息 累计点赞数: {}, 当前观看人数: {}, 累计观看人数: {}", binaryFrameHandler.getRoomId(), msg.getLikedCount(), msg.getWatchingCount(), msg.getWatchedCount()); + } + }); + + client.addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.CONNECTED) { + // 连接成功10秒后发送弹幕 + ThreadUtil.execAsync(() -> { + ThreadUtil.sleep(10000); + client.sendDanmu("666666", new Runnable() { + @Override + public void run() { + log.warn("弹幕发送成功"); + } + }); + }); + } + }); + + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void clickLike() throws Exception { + String cookie = System.getenv("cookie"); +// String cookie =""; + log.error("cookie: {}", cookie); + KuaishouLiveChatClientConfig config = KuaishouLiveChatClientConfig.builder() + .cookie(cookie) + .roomId("K6866676") + .roomId("xinsang_") + .roomId("lollaopu") + .roomId("YTC2844073618") + .build(); + + client = new KuaishouLiveChatClient(config, new IKuaishouMsgListener() { + @Override + public void onMsg(IMsg msg) { +// log.debug("收到{}消息 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg cmdMsg) { +// log.debug("收到CMD消息{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg cmdMsg) { +// log.debug("收到其他CMD消息 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { +// log.debug("收到未知CMD消息 {}", cmdString); + } + + @Override + public void onDanmuMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouDanmuMsg msg) { + log.info("{} 收到弹幕 [{}] {}({}):{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouGiftMsg msg) { + log.info("{} 收到礼物 [{}] {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "赠送", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onLikeMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouLikeMsg msg) { + log.info("{} 收到点赞 [{}] {}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + }); + + client.addStatusChangeListener((evt, oldStatus, newStatus) -> { + if (newStatus == ClientStatusEnums.CONNECTED) { + // 连接成功10秒后发送弹幕 + ThreadUtil.execAsync(() -> { + ThreadUtil.sleep(10000); + client.sendDanmu("6666a", () -> { + log.warn("弹幕发送成功"); + client.clickLike(13, () -> { + log.warn("为直播间点赞成功"); + }); + }); + }); + } + }); + + client.connect(); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + +// public static void chineseToCode() throws UnsupportedEncodingException { +// //1.url编码出字符串 +// //str = %E5%A4%A7%E5%AE%B6%E5%A5%BD%E3%80%82 +// String str = URLEncoder.encode("欧皇粉", "UTF-8"); +// //2.获取十六进制表示的字符串 +// String[] s = str.substring(1).split("%"); +// StringBuffer s8 = new StringBuffer(); +// //3.把每个十六进制字符串转换成八进制字符串,形式为:\+数字 +// for (int i = 0; i < s.length; i++) { +// s8.append("\\" + Integer.toOctalString(Integer.valueOf(s[i], 16))); +// } +// System.out.println(s8.toString()); +// } +// +// public static void codeToChinese() throws UnsupportedEncodingException { +// //\345\244\247\345\256\266\345\245\275\343\200\202 +// String code = "\\347\\210\\271\\345\\246\\210\\345\\233\\242"; +// //1.获取八进制数据 +// String[] split = code.substring(1).split("\\\\"); +// +// StringBuffer s16 = new StringBuffer(); +// +// //2.把八进制转换成格式为:%+十六进制 +// for (String s : split) { +// s16.append("%" + Integer.toHexString(Integer.valueOf(s, 8)).toString().toUpperCase()); +// } +// +// //3.解码 +// String decode = URLDecoder.decode(s16.toString(), "UTF-8"); +// System.out.println("decode = " + decode); +// +// System.out.println(s16); +//// +// } +// +// +// public static void main(String[] args) throws UnsupportedEncodingException { +//// chineseToCode(); +// codeToChinese(); +// } + + +} \ No newline at end of file diff --git a/live-chat-clients/live-chat-client-websocket/pom.xml b/live-chat-clients/live-chat-client-websocket/pom.xml new file mode 100644 index 0000000..e2f92ba --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/pom.xml @@ -0,0 +1,67 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-clients + 0.7.0 + + jar + + live-chat-client-websocket + live-chat-client-websocket + + + UTF-8 + + + + + tech.ordinaryroad + live-chat-client-servers-netty-client + + + + ch.qos.logback + logback-classic + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + + org.bouncycastle + bcpkix-jdk15on + 1.70 + test + + + diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/client/WebSocketLiveChatClient.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/client/WebSocketLiveChatClient.java new file mode 100644 index 0000000..c12dc34 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/client/WebSocketLiveChatClient.java @@ -0,0 +1,156 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.client; + +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.IBaseConnectionHandler; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.websocket.constant.WebSocketCmdEnum; +import tech.ordinaryroad.live.chat.client.websocket.listener.IWebSocketConnectionListener; +import tech.ordinaryroad.live.chat.client.websocket.listener.IWebSocketMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.msg.base.IWebSocketMsg; +import tech.ordinaryroad.live.chat.client.websocket.netty.handler.WebSocketBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.websocket.netty.handler.WebSocketChannelInitializer; +import tech.ordinaryroad.live.chat.client.websocket.netty.handler.WebSocketConnectionHandler; + +import java.nio.charset.StandardCharsets; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2024/3/8 + */ +@Slf4j +public class WebSocketLiveChatClient extends BaseNettyClient< + WebSocketLiveChatClientConfig, + WebSocketCmdEnum, + IWebSocketMsg, + IWebSocketMsgListener, + WebSocketConnectionHandler, + WebSocketBinaryFrameHandler + > { + + private WebSocketLiveChatClient forwardClient; + private final IBaseConnectionHandler connectionHandler; + + public WebSocketLiveChatClient(WebSocketLiveChatClientConfig config, IBaseConnectionHandler connectionHandler, IWebSocketMsgListener msgListener, IWebSocketConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + this.connectionHandler = connectionHandler; + + // 初始化 + this.init(); + } + + public WebSocketLiveChatClient(WebSocketLiveChatClientConfig config, IBaseConnectionHandler connectionHandler, IWebSocketMsgListener msgListener, IWebSocketConnectionListener connectionListener) { + this(config, connectionHandler, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public WebSocketLiveChatClient(WebSocketLiveChatClientConfig config, IBaseConnectionHandler connectionHandler, IWebSocketMsgListener msgListener) { + this(config, connectionHandler, msgListener, null, new NioEventLoopGroup()); + } + + public WebSocketLiveChatClient(WebSocketLiveChatClientConfig config, IBaseConnectionHandler connectionHandler) { + this(config, connectionHandler, null); + } + + public WebSocketLiveChatClient(WebSocketLiveChatClientConfig config) { + this(config, null, null); + } + + @Override + public WebSocketConnectionHandler initConnectionHandler(IBaseConnectionListener clientConnectionListener) { + return new WebSocketConnectionHandler( + () -> new WebSocketClientProtocolHandler( + WebSocketClientProtocolConfig.newBuilder() + .webSocketUri(getWebsocketUri()) + .version(WebSocketVersion.V13) + .subprotocol(null) + .allowExtensions(true) + .customHeaders(new DefaultHttpHeaders()) + .maxFramePayloadLength(getConfig().getMaxFramePayloadLength()) + .handshakeTimeoutMillis(getConfig().getHandshakeTimeoutMillis()) + .build() + ), + connectionHandler, WebSocketLiveChatClient.this, clientConnectionListener); + } + + @Override + protected void initChannel(SocketChannel channel) { + channel.pipeline().addLast(new WebSocketChannelInitializer(this)); + } + + @Override + public void init() { + if (StrUtil.isNotBlank(getConfig().getForwardWebsocketUri())) { + forwardClient = new WebSocketLiveChatClient( + WebSocketLiveChatClientConfig.builder() + .websocketUri(getConfig().getForwardWebsocketUri()) + .build() + ); + forwardClient.connect(); + addMsgListener(new IWebSocketMsgListener() { + @Override + public void onMsg(IMsg msg) { + ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer(); + buffer.writeCharSequence(msg.toString(), StandardCharsets.UTF_8); + forwardClient.send(new BinaryWebSocketFrame(buffer)); + } + }); + } + super.init(); + } + + @Override + public void send(Object msg, Runnable success, Consumer failed) { + if (!(msg instanceof BinaryWebSocketFrame)) { + throw new BaseException("WebSocketLiveChatClient.send 仅支持 BinaryWebSocketFrame类型的消息"); + } + super.send(msg, success, failed); + } + + @Override + public void destroy() { + if (forwardClient != null) { + forwardClient.destroy(); + } + super.destroy(); + } +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/config/WebSocketLiveChatClientConfig.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/config/WebSocketLiveChatClientConfig.java new file mode 100644 index 0000000..3902ea2 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/config/WebSocketLiveChatClientConfig.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.config; + +import lombok.Data; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * @author mjz + * @date 2024/3/8 + */ +@Data +//@NoArgsConstructor +//@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class WebSocketLiveChatClientConfig extends BaseNettyClientConfig { + +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/constant/WebSocketCmdEnum.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/constant/WebSocketCmdEnum.java new file mode 100644 index 0000000..db31c63 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/constant/WebSocketCmdEnum.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.constant; + +/** + * @author mjz + * @date 2024/3/8 + */ +public enum WebSocketCmdEnum { +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/listener/IWebSocketConnectionListener.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/listener/IWebSocketConnectionListener.java new file mode 100644 index 0000000..35bd667 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/listener/IWebSocketConnectionListener.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.websocket.netty.handler.WebSocketConnectionHandler; + +/** + * 连接回调 + * + * @author mjz + * @date 2024/3/8 + */ +public interface IWebSocketConnectionListener extends IBaseConnectionListener { +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/listener/IWebSocketMsgListener.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/listener/IWebSocketMsgListener.java new file mode 100644 index 0000000..1181478 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/listener/IWebSocketMsgListener.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.constant.WebSocketCmdEnum; +import tech.ordinaryroad.live.chat.client.websocket.netty.handler.WebSocketBinaryFrameHandler; + +/** + * 消息回调 + * + * @author mjz + * @date 2024/3/8 + */ +public interface IWebSocketMsgListener extends IBaseMsgListener { +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/msg/WebSocketMsg.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/msg/WebSocketMsg.java new file mode 100644 index 0000000..7573b12 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/msg/WebSocketMsg.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.msg; + +import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.websocket.msg.base.IWebSocketMsg; + +import java.nio.charset.StandardCharsets; + +/** + * @author mjz + * @date 2024/3/8 + */ +public class WebSocketMsg extends BinaryWebSocketFrame implements IWebSocketMsg { + + public WebSocketMsg() { + } + + public WebSocketMsg(ByteBuf binaryData) { + super(binaryData); + } + + public WebSocketMsg(boolean finalFragment, int rsv, ByteBuf binaryData) { + super(finalFragment, rsv, binaryData); + } + + @Override + public String toString() { + return content().toString(StandardCharsets.UTF_8); + } +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/msg/base/IWebSocketMsg.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/msg/base/IWebSocketMsg.java new file mode 100644 index 0000000..f1cecb5 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/msg/base/IWebSocketMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2024/3/8 + */ +public interface IWebSocketMsg extends IMsg { +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketBinaryFrameHandler.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketBinaryFrameHandler.java new file mode 100644 index 0000000..4b2fd58 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketBinaryFrameHandler.java @@ -0,0 +1,55 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.netty.handler; + +import io.netty.channel.ChannelHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; +import tech.ordinaryroad.live.chat.client.websocket.constant.WebSocketCmdEnum; +import tech.ordinaryroad.live.chat.client.websocket.listener.IWebSocketMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.msg.base.IWebSocketMsg; + +import java.util.List; + + +/** + * 消息处理器 + * + * @author mjz + * @date 2024/3/8 + */ +@Slf4j +@ChannelHandler.Sharable +public class WebSocketBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler { + + public WebSocketBinaryFrameHandler(List msgListeners, WebSocketLiveChatClient client) { + super(msgListeners, client); + } + + public WebSocketBinaryFrameHandler(List msgListeners, long roomId) { + super(msgListeners, roomId); + } +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketChannelInitializer.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketChannelInitializer.java new file mode 100644 index 0000000..bfa4fc5 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketChannelInitializer.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.netty.handler; + +import io.netty.channel.ChannelPipeline; +import io.netty.channel.socket.SocketChannel; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientChannelInitializer; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; + +/** + * @author mjz + * @date 2024/3/23 + */ +public class WebSocketChannelInitializer extends BaseNettyClientChannelInitializer { + + public WebSocketChannelInitializer(WebSocketLiveChatClient client) { + super(client); + } + + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + + pipeline.addLast(new WebSocketCodecHandler()); + pipeline.addLast(new WebSocketBinaryFrameHandler(client.getMsgListeners(), client)); + } +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketCodecHandler.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketCodecHandler.java new file mode 100644 index 0000000..6f2a438 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketCodecHandler.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.netty.handler; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BinaryWebSocketFrameToMessageCodec; +import tech.ordinaryroad.live.chat.client.websocket.msg.WebSocketMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2024/3/23 + */ +public class WebSocketCodecHandler extends BinaryWebSocketFrameToMessageCodec { + @Override + protected void encode(ChannelHandlerContext ctx, WebSocketMsg msg, List out) throws Exception { + out.add(msg); + } + + @Override + protected void decode(ChannelHandlerContext ctx, BinaryWebSocketFrame msg, List out) throws Exception { + out.add(new WebSocketMsg(msg.content().copy())); + } +} diff --git a/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketConnectionHandler.java b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketConnectionHandler.java new file mode 100644 index 0000000..6b6e95e --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/main/java/tech/ordinaryroad/live/chat/client/websocket/netty/handler/WebSocketConnectionHandler.java @@ -0,0 +1,83 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandler; +import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.IBaseConnectionHandler; +import tech.ordinaryroad.live.chat.client.websocket.client.WebSocketLiveChatClient; + +import java.util.function.Supplier; + + +/** + * 连接处理器 + * + * @author mjz + * @date 2024/3/8 + */ +@Slf4j +@ChannelHandler.Sharable +public class WebSocketConnectionHandler extends BaseNettyClientConnectionHandler { + + private final IBaseConnectionHandler connectionHandler; + + public WebSocketConnectionHandler(Supplier webSocketProtocolHandler, IBaseConnectionHandler connectionHandler, WebSocketLiveChatClient client, IBaseConnectionListener listener) { + super(webSocketProtocolHandler, client, listener); + this.connectionHandler = connectionHandler; + } + + public WebSocketConnectionHandler(Supplier webSocketProtocolHandler, IBaseConnectionHandler connectionHandler, WebSocketLiveChatClient client) { + this(webSocketProtocolHandler, connectionHandler, client, null); + } + + public WebSocketConnectionHandler(Supplier webSocketProtocolHandler, IBaseConnectionHandler connectionHandler) { + this(webSocketProtocolHandler, connectionHandler, null); + } + + public WebSocketConnectionHandler(Supplier webSocketProtocolHandler) { + this(webSocketProtocolHandler, null); + } + + @Override + public void sendHeartbeat(Channel channel) { + if (connectionHandler == null) { + return; + } + connectionHandler.sendHeartbeat(channel); + } + + @Override + public void sendAuthRequest(Channel channel) { + if (connectionHandler == null) { + return; + } + connectionHandler.sendAuthRequest(channel); + } +} diff --git a/live-chat-clients/live-chat-client-websocket/src/test/java/tech/ordinaryroad/live/chat/client/websocket/client/WebSocketLiveChatClientTest.java b/live-chat-clients/live-chat-client-websocket/src/test/java/tech/ordinaryroad/live/chat/client/websocket/client/WebSocketLiveChatClientTest.java new file mode 100644 index 0000000..7661116 --- /dev/null +++ b/live-chat-clients/live-chat-client-websocket/src/test/java/tech/ordinaryroad/live/chat/client/websocket/client/WebSocketLiveChatClientTest.java @@ -0,0 +1,188 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.websocket.client; + +import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.thread.ThreadUtil; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.channel.*; +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.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; +import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler; +import io.netty.handler.logging.LogLevel; +import io.netty.handler.logging.LoggingHandler; +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslContextBuilder; +import io.netty.handler.ssl.util.SelfSignedCertificate; +import io.netty.handler.stream.ChunkedWriteHandler; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.IBaseConnectionHandler; +import tech.ordinaryroad.live.chat.client.websocket.config.WebSocketLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.websocket.listener.IWebSocketMsgListener; +import tech.ordinaryroad.live.chat.client.websocket.msg.WebSocketMsg; + +import java.nio.charset.StandardCharsets; +import java.util.Locale; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Slf4j +class WebSocketLiveChatClientTest { + + static Object lock = new Object(); + WebSocketLiveChatClient client; + + /** + * 先运行main方法启动WebSocketServer,再运行该测试类 + */ + @Test + void example() throws InterruptedException { + WebSocketLiveChatClientConfig config = WebSocketLiveChatClientConfig.builder() +// .websocketUri("wss://localhost:8443/websocket") +// .websocketUri("wss://broadcastlv.chat.bilibili.com:443/sub") + .websocketUri("ws://127.0.0.1:8080/websocket") +// .forwardWebsocketUri("ws://127.0.0.1:8765") + .build(); + + client = new WebSocketLiveChatClient(config, new IBaseConnectionHandler() { + @Override + public void sendHeartbeat(Channel channel) { + log.debug("忽略发送心跳包"); + } + + @Override + public void sendAuthRequest(Channel channel) { + log.debug("忽略发送认证包"); + } + }, new IWebSocketMsgListener() { + @Override + public void onMsg(IMsg msg) { + ByteBuf content = ((WebSocketMsg) msg).content(); + String string = content.toString(StandardCharsets.UTF_8); + log.debug("收到消息 {}", string); + } + }); + client.connect(() -> { + ScheduledThreadPoolExecutor scheduledExecutor = ThreadUtil.createScheduledExecutor(1); + scheduledExecutor.scheduleAtFixedRate(() -> { + client.send(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(LocalDateTimeUtil.now().toString().getBytes(StandardCharsets.UTF_8)))); + }, 0, 5, TimeUnit.SECONDS); + }); + + // 防止测试时直接退出 + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + static final boolean SSL = System.getenv("ssl") != null; + /** + * ws://127.0.0.1:8080/websocket + * wss://127.0.0.1:8443/websocket + */ + static final int PORT = Integer.parseInt(System.getProperty("port", SSL ? "8443" : "8080")); + static final String WEBSOCKET_PATH = "/websocket"; + + public static void main(String[] args) throws Exception { + EventLoopGroup bossGroup = new NioEventLoopGroup(1); + EventLoopGroup workerGroup = new NioEventLoopGroup(); + try { + ServerBootstrap b = new ServerBootstrap(); + b.group(bossGroup, workerGroup) + .channel(NioServerSocketChannel.class) + .handler(new LoggingHandler(LogLevel.INFO)) + .childHandler(new ChannelInitializer() { + @Override + protected void initChannel(SocketChannel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); + + if (SSL) { + // Configure SSL. + SelfSignedCertificate ssc = new SelfSignedCertificate(); + final SslContext sslCtx = SslContextBuilder + .forServer(ssc.certificate(), ssc.privateKey()) + .build(); + pipeline.addLast(sslCtx.newHandler(ch.alloc())); + } + + pipeline.addLast(new HttpServerCodec()); + // 添加一个用于支持大数据流的支持 + pipeline.addLast(new ChunkedWriteHandler()); + pipeline.addLast(new HttpObjectAggregator(65536)); + pipeline.addLast(new WebSocketServerCompressionHandler()); + pipeline.addLast(new WebSocketServerProtocolHandler(WEBSOCKET_PATH, null, true)); + pipeline.addLast(new SimpleChannelInboundHandler() { + @Override + protected void channelRead0(ChannelHandlerContext ctx, WebSocketFrame frame) throws Exception { + // ping and pong frames already handled + + if (frame instanceof TextWebSocketFrame) { + // Send the uppercase string back. + String request = ((TextWebSocketFrame) frame).text(); + ctx.channel().writeAndFlush(new TextWebSocketFrame("from server:" + request.toUpperCase(Locale.US))); + ctx.channel().writeAndFlush(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(("from server:" + request.toUpperCase(Locale.US)).getBytes(StandardCharsets.UTF_8)))); + System.out.println("收到TextWebSocketFrame消息 " + request); + } else if (frame instanceof BinaryWebSocketFrame) { + ByteBuf content = frame.content(); + byte[] bytes = new byte[content.readableBytes()]; + content.readBytes(bytes); + System.out.println("收到BinaryWebSocketFrame消息 " + new String(bytes)); + ctx.channel().writeAndFlush(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(("from server:" + new String(bytes)).getBytes(StandardCharsets.UTF_8)))); + } else { + String message = "unsupported frame type: " + frame.getClass().getName(); + throw new UnsupportedOperationException(message); + } + } + }); + } + }); + + Channel ch = b.bind(PORT).sync().channel(); + + ch.closeFuture().sync(); + } finally { + bossGroup.shutdownGracefully(); + workerGroup.shutdownGracefully(); + } + } + +} \ No newline at end of file diff --git a/live-chat-clients/pom.xml b/live-chat-clients/pom.xml new file mode 100644 index 0000000..21cfa27 --- /dev/null +++ b/live-chat-clients/pom.xml @@ -0,0 +1,46 @@ + + + + 4.0.0 + + tech.ordinaryroad + live-chat-client + 0.7.0 + + pom + + live-chat-clients + live-chat-client + + + live-chat-client-websocket + live-chat-client-bilibili + live-chat-client-douyu + live-chat-client-huya + live-chat-client-douyin + live-chat-client-kuaishou + + diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..51dbbeb --- /dev/null +++ b/mvnw @@ -0,0 +1,321 @@ +#!/bin/sh +# +# MIT License +# +# Copyright (c) 2023 OrdinaryRoad +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`\\unset -f command; \\command -v java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..1d8ab01 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,188 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..8c4bc99 --- /dev/null +++ b/pom.xml @@ -0,0 +1,353 @@ + + + + 4.0.0 + tech.ordinaryroad + live-chat-client + 0.7.0 + pom + ordinaryroad-live-chat-client + Live room WebSocket chat client + https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client + + + The MIT License + https://opensource.org/license/mit/ + repo + + + + https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client + scm:git:https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client.git + scm:git:https://github.com/OrdinaryRoad-Project/ordinaryroad-live-chat-client + + + + OrdinaryRoad + or-mjz@qq.com + https://github.com/1962247851 + UTC+08:00 + + + + + live-chat-client-commons + live-chat-client-servers + live-chat-client-codec + live-chat-clients + + + + 8 + 8 + UTF-8 + 3.2.1 + 3.5.0 + 3.1.0 + 1.6.13 + + 1.16.0 + 2.16.1 + 5.8.26 + 4.1.107.Final + + 1.3.14 + 1.18.30 + 5.10.2 + + 3.25.3 + 1.7.3 + + + + + + tech.ordinaryroad + live-chat-client-commons-base + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-commons-util + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-commons-client + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-servers-netty + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-servers-netty-client + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-websocket + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-bilibili + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-douyu + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-huya + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-douyin + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-kuaishou + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-codec-bilibili + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-codec-douyu + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-codec-huya + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-codec-douyin + 0.7.0 + + + + tech.ordinaryroad + live-chat-client-codec-kuaishou + 0.7.0 + + + + com.aayushatharva.brotli4j + brotli4j + ${brotli4j.version} + + + + com.google.protobuf + protobuf-java + ${protobuf-java.version} + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind.version} + + + + cn.hutool + hutool-all + ${hutool-all.version} + + + + io.netty + netty-all + ${netty-all.version} + + + + io.netty + netty-codec + ${netty-all.version} + + + + com.tencent.tars + tars-core + ${tars-core.version} + + + + ch.qos.logback + logback-classic + ${logback-classic.version} + + + + org.projectlombok + lombok + ${lombok.version} + compile + + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + + + + + org.projectlombok + lombok + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${maven.compiler.source} + ${maven.compiler.target} + ${project.build.sourceEncoding} + + + org.projectlombok + lombok + ${lombok.version} + + + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + UTF-8 + UTF-8 + UTF-8 + + + + attach-javadocs + + jar + + + ${javadoc.opts} + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + sign-artifacts + verify + + sign + + + ${gpg.keyname} + ${gpg.keyname} + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus-staging-maven-plugin.version} + true + + ossrh + https://s01.oss.sonatype.org/ + ${auto-release-after-close} + + + + + + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + +